Remove some GNU-makeisms from the Makefile to try to get us to build with BSD make. Not quite there yet.

This commit is contained in:
ridiculousfish 2013-03-30 12:21:49 -07:00
parent 9762a8ca1e
commit 3a2c3c2288

View file

@ -157,7 +157,7 @@ HDR_FILES_SRC := doc_src/index.hdr.in doc_src/commands.hdr.in doc_src/design.hdr
# These are the generated result files # These are the generated result files
# #
HDR_FILES := $(subst .hdr.in,.hdr,$(HDR_FILES_SRC)) HDR_FILES := $(HDR_FILES_SRC:.hdr.in=.hdr)
# Use a pattern rule so that Make knows to only issue one invocation # Use a pattern rule so that Make knows to only issue one invocation
# per http://www.gnu.org/software/make/manual/make.html#Pattern-Intro # per http://www.gnu.org/software/make/manual/make.html#Pattern-Intro
@ -350,9 +350,9 @@ doc_src/commands.hdr:$(HELP_SRC) doc_src/commands.hdr.in
cat $@.in | awk '{if ($$0 ~ /@command_list@/){ system("cat command_list.txt");} else{ print $$0;}}' >$@ cat $@.in | awk '{if ($$0 ~ /@command_list@/){ system("cat command_list.txt");} else{ print $$0;}}' >$@
toc.txt: $(subst index.hdr,index.hdr.in,$(HDR_FILES)) toc.txt: $(HDR_FILES:index.hdr=index.hdr.in)
-rm toc.tmp $@ -rm toc.tmp $@
for i in $(subst index.hdr,index.hdr.in,$(HDR_FILES)); do\ for i in $(HDR_FILES:index.hdr=index.hdr.in); do\
NAME=`basename $$i .hdr`; \ NAME=`basename $$i .hdr`; \
NAME=`basename $$NAME .hdr.in`; \ NAME=`basename $$NAME .hdr.in`; \
sed <$$i >>toc.tmp -n \ sed <$$i >>toc.tmp -n \