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 ifeq ($(PYTHON),$(TARGET_PYTHON))
19 HELP2MAN_COMMAND = $(buildscript-dir)/help2man $< > $@
21 HELP2MAN_COMMAND = $(buildscript-dir)/help2man "env $$(basename $$(head -1 $<)) $<" > $@
24 ifeq ($(strip $(CROSS)),no)
25 $(outdir)/%.1: $(outdir)/% $(buildscript-dir)/help2man
26 echo $(buildscript-dir)/help2man
29 # When cross building, some manpages will not build because the
30 # executable does not run. We assume the manpages to be generated
31 # during a previous compile for the build host, with config=for-build,
32 # in the directory $(outdir)-for-build.
33 $(outdir)/%.1: $(outdir:%=%-for-build)/%.1
37 ifneq ($(outdir),./out)
38 $(outdir)/%.1: out/%.1
42 $(buildscript-dir)/help2man:
43 $(MAKE) -C $(depth)/scripts/build