allow to override nroff during build, and optionally skip installing cat man pages#116
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.
josuah
left a comment
There was a problem hiding this comment.
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.
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.
The FreeBSD build has not complained about this. Does the OpenBSD build fail with this syntax?
There was a problem hiding this comment.
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.
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.