summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/roff/groff/Makefile.sub43
2 files changed, 26 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 86e025a4..e9891aad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
2013-04-28 Bernd Warken <groff-bernd.warken-72@web.de>
+
+ * src/roff/groff/Makefile.sub: Make this Makefile compatible.
+
+2013-04-28 Bernd Warken <groff-bernd.warken-72@web.de>
2013-04-28 Werner LEMBERG <wl@gnu.org>
* src/roff/groff/Makefile.sub: Use `make' variables to get
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)