Fix Makefile as per #66 #76
No reviewers
Labels
No Label
blocked
bug
build
documentation
duplicate
enhancement
finger
gemini
gopher
help wanted
http
in progress
invalid
local
needs-info
non-code
non-functional
non-urgent
question
release
rendering
suggestion
telnet
terminal
urgent
wontfix
No Milestone
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sloum/bombadillo#76
Loading…
Reference in New Issue
No description provided.
Delete Branch "extend-makefile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Updated Makefile as requested for #66
The install step for the binary has changed too. Previously it was like
install binary /path/to/binary
but now it isinstall binary /path/to
which seems more correct?README.md will probably need to be amended too, but maybe only to suggest PREFIX instead of DESTDIR for the custom install, and to check the Makefile for further customisation options. But please let me know what you think about this.
This looks good. I believe, though am not certain, that if
BINDIR
is set by?=
that gives flexibility for someone to override, which is my desired outcome (I think people should be able to install to wherever they want, with reasonable defaults). That said, I am still shaky on the reasons behind makefile conventions.@ -4,0 +3,4 @@
EXEC_PREFIX := ${PREFIX}
BINDIR := ${EXEC_PREFIX}/bin
DATAROOTDIR := ${PREFIX}/share
MANDIR := ${DATAROOTDIR}/share/man
If
DATAROOTDIR
is$prefix/share
andMANDIR
is$datarootdir/share/man
wont that lead to/usr/local/share/share/man
? I think MANDIR should not have/share
in it, unless I am thinking about this incorrectly.No, that was a mistake. Thanks for picking that up!
Yeah I do have to say that I'm finding make confusing, or maybe just too permissive or non-specific or ambiguous...that's a beginner's perspective though.
The variables we have set can be overridden from the command line, and the assignment operator has no impact in our case. See Overriding in the manual.
With this many variables, there are a lot of options available to people to customise their install, and it should be pretty standard. I think the most usable options are PREFIX as a convention, or BINDIR and MAN1DIR for complete control. I don't really know though, so let me know if you have other ideas on this. I'll update the readme accordingly.
Yeah, I also find it strangely loose and a bit confusing.
So long as those can still be set then I am fine with this as is/it looks good. It is strange that they have an assignment operator
?=
that sets something only if it has not already been set, if you can just override anyway, lol. Thanks for the link, it was helpful. There are so many docs for make I feel like I read some and get a handle on things, but then it is blown out of the water by more doc reading.I approve this pull :) Thanks for putting it together!
Some small final changes - corrected the error in the makefile that you pointed out. I've also amended the README slightly, and removed some text that was erroneously included earlier.