]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/help2man-rules.make
($(outdir)/%.1): build man
[lilypond.git] / stepmake / stepmake / help2man-rules.make
1 ifneq ($(outdir),./out)
2 $(outdir)/%.1: out/%.1
3         cp $< $@
4 endif
5
6 # We must invoke the generated $(outdir)/help2man script instead of
7 # the help2man.pl source, which means that the buildscripts directory
8 # must be built first.
9 #
10 # From the perlrun man-page:
11 #
12 #       If the #! line does not contain the word "perl", the
13 #       program named after the #! is executed instead of the Perl
14 #       interpreter.  This is slightly bizarre, but it helps
15 #
16 # Indeed it is.  Perl sucks.
17 #
18 # Two screenfulls explaining that the otherwise standard #! is broken
19 # for perl, and arguing that this broken magic is better in some
20 # cases.  Four more explaining what a line comment is, and that it may
21 # be parsed, same here.
22
23 HELP2MAN_COMMAND = $(PERL) $(builddir)/buildscripts/$(outbase)/help2man $< > $@
24
25 $(outdir)/%.1: $(outdir)/%
26         $(HELP2MAN_COMMAND)