X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=m4%2Fgengetopt%2Fmakefile;h=ada70d198b496abc98fb5ed462180f81d4c0d99a;hp=79e101a3e4e88f3e55b096b90780615b82b2e602;hb=aab667adba868be9e9038a8686dc4919a5a8e96d;hpb=a29e6451e79365af6dce8d14f3056fc107b059fb diff --git a/m4/gengetopt/makefile b/m4/gengetopt/makefile index 79e101a3..ada70d19 100644 --- a/m4/gengetopt/makefile +++ b/m4/gengetopt/makefile @@ -25,3 +25,14 @@ $(m4depdir)/%.m4d: $(m4_ggo_dir)/%.m4 | $(m4depdir) $(ggo_dir)/%.ggo: $(m4_ggo_dir)/%.m4 $(m4_ggo_dir)/header.m4 | $(ggo_dir) @[ -z "$(Q)" ] || echo 'M4 $<' $(Q) m4 -I $(m4_ggo_dir) $< > $@ + +$(help2man_dir)/para_%: $(ggo_dir)/%.ggo | $(help2man_dir) + @[ -z "$(Q)" ] || echo 'G2X $<' + $(Q) printf "#!/bin/sh\nif [ \"\$$1\" = '--version' ]; then \ + $(GENGETOPT) $(ggo_opts) --show-version < $<; \ + elif [ \"\$$1\" = '--help' ]; then \ + $(GENGETOPT) $(ggo_opts) --show-detailed-help < $<; \ + else \ + exit 1; \ + fi\n" > $@.tmp + $(Q) chmod 755 $@.tmp && mv $@.tmp $@