-
Notifications
You must be signed in to change notification settings - Fork 236
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
Add a more sensible install target in Makefile #939
Conversation
Makefile
Outdated
@@ -37,16 +37,42 @@ clean: | |||
$(MAKE) -C man clean | |||
$(MAKE) -C src clean | |||
|
|||
INSTALL=install | |||
INSTALL_PROGRAM=$(INSTALL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a 755? maybe that's defined by default, and can be skipped, but if that's what we mean, it's a nice declaration of intent that makes this easier to understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would go after examples from some common projects. Any suggestions as to what those might be?
Makefile
Outdated
install: all | ||
$(INSTALL) -d "$(DESTDIR)$(bindir)" | ||
ifneq ($(wildcard src/unison),) | ||
$(INSTALL_PROGRAM) src/unison "$(DESTDIR)$(bindir)/unison" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bindir is not mkdir -d'd. I know that sounds funny, but I think it's normal to install a program into its own prefix for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$(INSTALL) -d
on line 54 is supposed to do that here. (Also tested precisely as you describe.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unsaid in micro comments is that this seems otherwise fine.
9864476
to
dc237c8
Compare
Rebased and updated. Now all variables should be env-able. In fact, variables from env will override GNU-style lowercase variables. |
Is there anything blocking this PR? Should we merge? It seems like no reviewer raised any issue, and, as far as I can tell, the target is doing what is needed ;) Also, this PR is a dependency for #845, which I'm trying to push. |
I tested on NetBSD and was able to control PREFIX and MANDIR from the environment, so I'm now ok with this. |
Provide a basic install target. Not intended to work on Windows but should work on most POSIX-y systems that have a BSD- or GNU-compatible
install
.@gdt could you review if this works for packagers?