summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbwarken <bwarken>2013-04-28 15:52:51 +0000
committerbwarken <bwarken>2013-04-28 15:52:51 +0000
commitdc487ba651f881c76bd9dc30184a002b5419003e (patch)
tree7826ad0dd7bae12a782c84e36d6a5ad3a3043a3b /src
parent99fc5bfc992eb56491c2750eb4a2503d1a7e93a8 (diff)
downloadgroff-dc487ba651f881c76bd9dc30184a002b5419003e.tar.gz
src/roff/groff/Makefile.sub: Make this file a compatible Makefile.
Diffstat (limited to 'src')
-rw-r--r--src/roff/groff/Makefile.sub43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/roff/groff/Makefile.sub b/src/roff/groff/Makefile.sub
index f345c642..67439c65 100644
--- a/src/roff/groff/Makefile.sub
+++ b/src/roff/groff/Makefile.sub
@@ -5,6 +5,9 @@
# Copyright (C) 1993-2013
# Free Software Foundation, Inc.
+# Rewritten by Bernd Warken <groff-bernd.warken-72@web.de> and
+# Werner LEMBERG <wl@gnu.org>
+
# Last update: 28 Apr 2013
# `groff' is free software; you can redistribute it and/or modify it
@@ -31,37 +34,35 @@ CCSRCS=$(srcdir)/groff.cpp
CSRCS=$(srcdir)/pipeline.c
HDRS=$(srcdir)/pipeline.h
-GROFF_OPTS_OUTPUT := groff_opts_no_arg.txt \
+GROFF_OPTS_OUTPUT=groff_opts_no_arg.txt \
groff_opts_with_arg.txt
-MOSTLYCLEANADD := $(GROFF_OPTS_OUTPUT)
+MOSTLYCLEANADD=$(GROFF_OPTS_OUTPUT)
RM=rm -f
-OPTS := $(shell $(EGREP) -e ':.*:.*:' groff.cpp \
- | sed -e 's/[ \t",]//g')
-
-OPTS_NO_ARG := $(shell echo $(OPTS) \
- | sed -e 's/[a-zA-Z]://g')
+opts=`$(EGREP) -e ':.*:.*:' groff.cpp \
+ | sed -e 's/[ \t",]//g')`
-OPTS_WITH_ARG := $(shell echo $(OPTS) \
- | sed "s/[$(OPTS_NO_ARG):]//g")
-
-show:
- @echo opts: $(OPTS)
- @echo no: $(OPTS_NO_ARG)
- @echo optarg: $(OPTS_WITH_ARG)
+opts_no_arg=`cat groff_opts_no_arg.txt`
.PHONY: all
all: groff.cpp $(GROFF_OPTS_OUTPUT)
-groff_opts_no_arg.txt:
- $(RM) $@
- echo $(OPTS_NO_ARG) > $@
-
-groff_opts_with_arg.txt:
- $(RM) $@
- echo $(OPTS_WITH_ARG) > $@
+groff_opts_no_arg.txt: groff.cpp
+ @$(RM) $@
+ @echo groff options: $(opts)
+ @echo $(opts) \
+ | 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" > $@
+ @echo -n 'with arg: '
+ @cat $@
.PHONY: install_data
install_data: $(GROFF_OPTS_OUTPUT)