diff options
author | bwarken <bwarken> | 2013-04-29 19:13:54 +0000 |
---|---|---|
committer | bwarken <bwarken> | 2013-04-29 19:13:54 +0000 |
commit | 0c1afde695837e60afff35b5a2be65259a29d7ec (patch) | |
tree | 261a8f646a73768600d97425f866d55152f0be01 /src | |
parent | dc487ba651f881c76bd9dc30184a002b5419003e (diff) | |
download | groff-0c1afde695837e60afff35b5a2be65259a29d7ec.tar.gz |
src/roff/groff/Makefile.sub: Replace some variables by shell
commands. Improve the output for the `make' runs.
Diffstat (limited to 'src')
-rw-r--r-- | src/roff/groff/Makefile.sub | 25 |
1 files changed, 13 insertions, 12 deletions
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 $@ |