1 # We must invoke the generated $(outdir)/help2man script instead of
2 # the help2man.pl source, which means that the scripts/build directory
5 # From the perlrun man-page:
7 # If the #! line does not contain the word "perl", the
8 # program named after the #! is executed instead of the Perl
9 # interpreter. This is slightly bizarre, but it helps
11 # Indeed it is. Perl sucks.
13 # Two screenfulls explaining that the otherwise standard #! is broken
14 # for perl, and arguing that this broken magic is better in some
15 # cases. Four more explaining what a line comment is, and that it may
16 # be parsed, same here.
18 HELP2MAN_COMMAND = $(buildscript-dir)/help2man $< > $@
20 ifeq ($(strip $(CROSS)),no)
21 $(outdir)/%.1: $(outdir)/% $(buildscript-dir)/help2man
24 # When cross building, some manpages will not build because the
25 # executable does not run. We assume the manpages to be generated
26 # during a previous compile for the build host, with config=for-build,
27 # in the directory $(outdir)-for-build.
28 $(outdir)/%.1: $(outdir:%=%-for-build)/%.1
32 ifneq ($(outdir),./out)
33 $(outdir)/%.1: out/%.1
37 $(buildscript-dir)/help2man:
38 $(MAKE) -C $(depth)/scripts/build