Skip to content

man: create parent directories in install recipe#48388

Merged
tianon merged 1 commit intomoby:masterfrom
corhere:dockerd-manpage-install
Aug 29, 2024
Merged

man: create parent directories in install recipe#48388
tianon merged 1 commit intomoby:masterfrom
corhere:dockerd-manpage-install

Conversation

@corhere
Copy link
Copy Markdown
Contributor

@corhere corhere commented Aug 27, 2024

- What I did
Support the use of make install in packaging scripts, where the $mandir tree might not exist under $DESTDIR.

- How I did it
For portability, create the parent directories using a separate install command instead of relying on the non-portable -D flag.

- How to verify it

$ rm -r fakeroot
$ make -C man DESTDIR=$(pwd)/fakeroot install

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread man/Makefile
@@ -36,6 +36,7 @@ man%:
.PHONY: install
install: all
for sec in $(sections); do \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it occurs to me that we should probably include set -e here too because that's only the default in POSIX compliant mode, apparently? https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! Yes I recall that indeed; I recall I had a PR once to consider explicitly enabling posix mode for that reason;

Copy link
Copy Markdown
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although with a related note/suggestion 🙈

Support the use of `make install` in packaging scripts, where the
$mandir tree might not exist under $DESTDIR.

For portability, create the parent directories using a separate install
command instead of relying on the non-portable `-D` flag.

Set errexit so the install target fails if any install step fails.

Signed-off-by: Cory Snider <[email protected]>
@corhere corhere force-pushed the dockerd-manpage-install branch from 63090bf to 88b1186 Compare August 29, 2024 19:39
Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants