-
Notifications
You must be signed in to change notification settings - Fork 30
allow to override nroff during build, and optionally skip installing cat man pages #116
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
Conversation
2a22944
to
bb1bf91
Compare
…cat pages If nroff is overridden with e.g. /bin/true no output will be produced. Teach the install and check programs to ignore empty catman pages and silently ignore their absence.
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.
If we go with a ROFF =
variable, we shift the configuration model from generating tools which have the correct parameters, to us variables inline into the Makefile.
This breaks a property of the makefile: it is entirely static and has no configuration going through it.
On the other hand, this makes it much more conventional, and removes the need for ./compile, ./load and ./makelib.
I suggest going the same way for configuring eventual catpages, and make a separate request to bring everything to ${CC}, ${LD}, ${AR}, ${RANLIB}, ... if that is what we want.
For instance, a ./catpage script generated from make-catpage.sh.
%.0: | ||
$(NROFF) -man $^ > $@ | ||
|
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.
While I prefer this syntax, this is not POSIX, so will require gmake on BSDs (which have their different extensions).
Same goes for $^
.
If we want an automatic make rule with a variable, we can go with this syntax which is portable (tested with OpenBSD make and GNU make):
.SUFFIXES: .0 .1 .3 .5 .7 .8
.1.0:
$(ROFF) $< >$@
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.
The FreeBSD build has not complained about this. Does the OpenBSD build fail with this syntax?
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.
Looks like we have not detected that FreeBSD does not work because the tests were entirely broken.
addresses.0: \ | ||
addresses.5 | ||
nroff -man addresses.5 > addresses.0 |
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.
With the syntax above, make will deduce addresses.0 depends on addresses.5, so we can remove the dependency rules altogether.
If nroff is overridden with e.g. /bin/true no output will be produced. Teach the install and check programs to ignore empty catman pages and silently ignore their absence.
This is an alternative implementation to #56.