X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=inline;f=stepmake%2Fstepmake%2Fhelp2man-rules.make;h=10b668d36a5e820685341b6efa7a0f024b7e10a7;hb=723545fd108d20edfb41c01b14df5962192cc226;hp=493d7acff5f7620d3e2e0ad5109e10f471f98c16;hpb=c9455da804fb51b18194a6df8b65f6443bdb1bea;p=lilypond.git diff --git a/stepmake/stepmake/help2man-rules.make b/stepmake/stepmake/help2man-rules.make index 493d7acff5..10b668d36a 100644 --- a/stepmake/stepmake/help2man-rules.make +++ b/stepmake/stepmake/help2man-rules.make @@ -1,18 +1,26 @@ -# ugh. -# Man-page: +ifneq ($(outdir),./out) +$(outdir)/%.1: out/%.1 + cp $< $@ +endif + +# We must invoke the generated $(outdir)/help2man script instead of +# the help2man.pl source, which means that the buildscripts directory +# must be built first. +# +# From the perlrun man-page: +# # If the #! line does not contain the word "perl", the # program named after the #! is executed instead of the Perl # interpreter. This is slightly bizarre, but it helps -# Indeed it is. Perl sucks. # +# Indeed it is. Perl sucks. +# +# Two screenfulls explaining that the otherwise standard #! is broken +# for perl, and arguing that this broken magic is better in some +# cases. Four more explaining what a line comment is, and that it may +# be parsed, same here. -ifneq ($(outdir),./out) -$(outdir)/%.1: out/%.1 - cp $< $@ -endif +HELP2MAN_COMMAND = $(PERL) $(builddir)/buildscripts/$(outbase)/help2man $< > $@ $(outdir)/%.1: $(outdir)/% - $(PERL) $(depth)/$(builddir)/buildscripts/$(outbase)/help2man $< > $@ || \ - (echo ""; echo "Apparently the man pages failed to build. This is";\ - echo "no problem, since they don't contain any information anyway.";\ - echo "Please run make again, and be prepared for NO manual pages.") + $(HELP2MAN_COMMAND)