Skip to content

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

Merged
merged 1 commit into from
Apr 11, 2020

Conversation

DerDakon
Copy link
Member

@DerDakon DerDakon commented Jan 8, 2020

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.

@DerDakon DerDakon added the build label Jan 8, 2020
@DerDakon DerDakon added this to the 1.09 milestone Jan 8, 2020
…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.
@DerDakon DerDakon merged commit 83cba28 into master Apr 11, 2020
@DerDakon DerDakon deleted the Dakon-catman branch April 11, 2020 12:56
Copy link

@josuah josuah left a 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.

Comment on lines +10 to +12
%.0:
$(NROFF) -man $^ > $@

Copy link

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) $< >$@

Copy link
Member Author

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?

Copy link
Member Author

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.

Comment on lines 13 to -11
addresses.0: \
addresses.5
nroff -man addresses.5 > addresses.0
Copy link

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.

@DerDakon DerDakon modified the milestones: 1.09, 1.08 May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants