Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a Makefile that does a more portable installation. #130

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

ltratt
Copy link
Member

@ltratt ltratt commented Jan 8, 2024

This is based on recent changes to pizauth's Makefile. It respects $DESTDIR and also installs man pages in the correct (different!) location on both BSD and Linux. The downside is that the Makefile is now GNU make only.

This is based on recent changes to pizauth's Makefile. It respects
`$DESTDIR` and also installs man pages in the correct (different!)
location on both BSD and Linux. The downside is that the Makefile is now
GNU make only.
MANDIR.${PREFIX} = ${PREFIX}/share/man
MANDIR./usr/local = /usr/local/man
MANDIR. = /usr/share/man
MANDIR ?= ${MANDIR.${PREFIX}}
Copy link
Member

Choose a reason for hiding this comment

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

Your GNU foo is better than mine. How does this alter the man directory based on platform? Does it rely on one of the platforms passing ${PREFIX} at build time?

Copy link
Member Author

Choose a reason for hiding this comment

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

It was a suggestion by someone else -- I wouldn't have thought of this! Basically if you pass PREFIX=/usr/local then MANDIR is set to /usr/local/man, otherwise it's set to /usr/share/man. It's very cunning!

Copy link
Member

Choose a reason for hiding this comment

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

I bet there's a platform where PREFIX=/usr/local/, but the manuals go into /usr/local/share/man, but let's not worry about it until we see it.

I thought FreeBSD did it this way, but I just check and I was wrong.

@vext01 vext01 added this pull request to the merge queue Jan 8, 2024
Merged via the queue into softdevteam:master with commit feaa503 Jan 8, 2024
2 checks passed
@ltratt ltratt deleted the portable_makefile branch April 2, 2024 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants