diff --git a/Makefile.in b/Makefile.in index 40a87c069..0e758396e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -136,13 +136,24 @@ MIME_OBJS := mimedb.o print_help.o xdgmimealias.o xdgmime.o \ # Files containing user documentation # -HDR_FILES := doc_src/index.hdr doc_src/commands.hdr doc_src/design.hdr doc_src/license.hdr doc_src/faq.hdr +# +# These files are the source files, they contain a few @FOO@-style substitutions +# + +HDR_FILES_SRC := doc_src/index.hdr.in doc_src/commands.hdr.in doc_src/design.hdr doc_src/license.hdr doc_src/faq.hdr + + +# +# These are the generated result files +# + +HDR_FILES := $(subst .hdr.in,.hdr,$(HDR_FILES_SRC)) # # Files containing documentation for external commands. # -DOC_SRC := $(wildcard doc_src/*.txt) +HELP_SRC := $(wildcard doc_src/*.txt) # @@ -160,23 +171,29 @@ TEST_IN := $(wildcard tests/test*.in) # Files in ./doc_src/ # -DOC_SRC_DIR_FILES := doc_src/index.hdr doc_src/license.hdr \ - doc_src/faq.hdr doc_src/design.hdr $(DOC_SRC) +DOC_SRC_DIR_FILES := $(HDR_FILES_SRC) $(HELP_SRC) # -# Files in ./. There is some overlap between the variables in the -# list, so when copying these files, cp will complain that some files -# are specified more than once. +# Files in ./ # -MAIN_DIR_FILES := Doxyfile Doxyfile.user Doxyfile.help.in Makefile.in \ - configure configure.ac config.h.in install-sh set_color.c count.c \ - key_reader.c $(MIME_OBJS:.o=.h) $(MIME_OBJS:.o=.c) \ - $(FISH_OBJS:.o=.h) $(BUILTIN_FILES) $(COMMON_FILES) \ - $(COMMON_FILES:.c=.h) $(FISH_OBJS:.o=.c) fish.spec.in INSTALL \ - README user_doc.head.html xsel-0.9.6.tar ChangeLog config.sub \ - config.guess fish_tests.c main.c fish_pager.c fishd.c seq.in +MAIN_DIR_FILES_UNSORTED := Doxyfile Doxyfile.user Doxyfile.help.in \ + Makefile.in configure configure.ac config.h.in install-sh \ + set_color.c count.c key_reader.c $(MIME_OBJS:.o=.h) \ + $(MIME_OBJS:.o=.c) $(FISH_OBJS:.o=.h) $(BUILTIN_FILES) \ + $(COMMON_FILES) $(COMMON_FILES:.c=.h) $(FISH_OBJS:.o=.c) \ + fish.spec.in INSTALL README user_doc.head.html xsel-0.9.6.tar \ + ChangeLog config.sub config.guess fish_tests.c main.c fish_pager.c \ + fishd.c seq.in + +# +# The sorting is not meaningful in itself, but it has the side effect +# of removing duplicates, which means there will be fewer warnings +# during building. +# + +MAIN_DIR_FILES := $(sort $(MAIN_DIR_FILES_UNSORTED)) # @@ -219,16 +236,16 @@ FUNCTIONS_DIR_FILES := $(wildcard share/functions/*.fish) # Programs to install # -PROGRAMS:=fish set_color @XSEL@ @SEQ_FALLBACK@ mimedb count fish_pager fishd +SIMPLE_PROGRAMS := fish set_color mimedb count fish_pager fishd +PROGRAMS := $(SIMPLE_PROGRAMS) @XSEL@ @SEQ_FALLBACK@ # -# Manual pagess to install +# Manual pages to install # -MANUALS:=share/man/fish.1 @XSEL_MAN_PATH@ share/man/mimedb.1 \ - share/man/set_color.1 share/man/count.1 share/man/fishd.1 \ - share/man/fish_pager.1 +MANUALS := $(addsuffix .1, $(addprefix share/man/, \ + $(SIMPLE_PROGRAMS))) @XSEL_MAN_PATH@ # @@ -276,8 +293,8 @@ debug: # -user_doc: doc_src/index.hdr doc_src/design.hdr doc_src/license.hdr doc_src/faq.hdr Doxyfile.user user_doc.head.html $(DOC_SRC) - $(MAKE) doc.h # Depend on the sources (*.hdr) and manually make the intermediate as needed +user_doc: $(HDR_FILES) Doxyfile.user user_doc.head.html + $(MAKE) doc.h # Depend on the sources (*.hdr) and manually make the intermediate doc.h file if needed doxygen Doxyfile.user touch user_doc @@ -327,19 +344,32 @@ xsel-0.9.6/xsel: xsel-0.9.6 # builtins # -doc_src/commands.hdr:$(DOC_SRC) - rm -f commands.tmp; - echo "/** \page commands Commands, functions and builtins bundled with fish" >>commands.tmp; - echo "Fish ships with a large number of builtin commands, shellscript functions and external commands. These are all described below. " >>commands.tmp; - for i in `printf "%s\n" $(DOC_SRC)|sort`; do \ - echo "