From 0c1afde695837e60afff35b5a2be65259a29d7ec Mon Sep 17 00:00:00 2001 From: bwarken Date: Mon, 29 Apr 2013 19:13:54 +0000 Subject: src/roff/groff/Makefile.sub: Replace some variables by shell commands. Improve the output for the `make' runs. --- src/roff/groff/Makefile.sub | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/roff/groff/Makefile.sub b/src/roff/groff/Makefile.sub index 67439c65..94e2f09e 100644 --- a/src/roff/groff/Makefile.sub +++ b/src/roff/groff/Makefile.sub @@ -37,30 +37,31 @@ HDRS=$(srcdir)/pipeline.h GROFF_OPTS_OUTPUT=groff_opts_no_arg.txt \ groff_opts_with_arg.txt -MOSTLYCLEANADD=$(GROFF_OPTS_OUTPUT) +MOSTLYCLEANADD=groff_opts.tmp $(GROFF_OPTS_OUTPUT) RM=rm -f - -opts=`$(EGREP) -e ':.*:.*:' groff.cpp \ - | sed -e 's/[ \t",]//g')` - -opts_no_arg=`cat groff_opts_no_arg.txt` +EGREP=egrep .PHONY: all -all: groff.cpp $(GROFF_OPTS_OUTPUT) +all: groff.cpp groff_opts.tmp $(GROFF_OPTS_OUTPUT) + +groff_opts.tmp: groff.cpp + @$(EGREP) -e ':.*:.*:' $< \ + | sed -e 's/[ \t",]//g' > $@ + @echo -n 'groff options: ' + @cat $@ -groff_opts_no_arg.txt: groff.cpp +groff_opts_no_arg.txt: groff_opts.tmp @$(RM) $@ - @echo groff options: $(opts) - @echo $(opts) \ + @cat $< \ | sed -e 's/[a-zA-Z]://g' > $@ @echo -n 'no arg: ' @cat $@ groff_opts_with_arg.txt: groff_opts_no_arg.txt @$(RM) $@ - @echo $(opts) \ - | sed "s/[$(opts_no_arg):]//g" > $@ + @cat groff_opts.tmp \ + | sed "s/[`cat $<`:]//g" > $@ @echo -n 'with arg: ' @cat $@ -- cgit v1.2.1