[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/02: * src/roff/groff/Makefile.sub: POSIX conformance.
From: |
Werner LEMBERG |
Subject: |
[groff] 02/02: * src/roff/groff/Makefile.sub: POSIX conformance. |
Date: |
Tue, 11 Mar 2014 04:54:19 +0000 |
wl pushed a commit to branch master
in repository groff.
commit 4222909df5d4af12441551c20262aaea504765aa
Author: Ingo Schwarze <address@hidden>
Date: Tue Mar 11 05:53:15 2014 +0100
* src/roff/groff/Makefile.sub: POSIX conformance.
- POSIX says that the meaning of the make(1) `$<' macro shall be
unspecified except in inference rules. Consequently, use `$?'
for portability.
That's safe because the rules have only one prerequisite and are
not `.PHONY', so `$?' will always expand to one item.
- While here, clean up two instances of superfluous use of cat(1).
---
ChangeLog | 13 +++++++++++++
src/roff/groff/Makefile.sub | 8 +++-----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index b718254..ec67c4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2014-03-11 Ingo Schwarze <address@hidden> (tiny change)
+ * src/roff/groff/Makefile.sub: POSIX conformance.
+
+ - POSIX says that the meaning of the make(1) `$<' macro shall be
+ unspecified except in inference rules. Consequently, use `$?'
+ for portability.
+
+ That's safe because the rules have only one prerequisite and are
+ not `.PHONY', so `$?' will always expand to one item.
+
+ - While here, clean up two instances of superfluous use of cat(1).
+
+2014-03-11 Ingo Schwarze <address@hidden> (tiny change)
+
* Makefile.in (dist): Improve.
- Bugfix: Do not error out if one of the DISTDIRS
diff --git a/src/roff/groff/Makefile.sub b/src/roff/groff/Makefile.sub
index 0fff2cb..6b56c3d 100644
--- a/src/roff/groff/Makefile.sub
+++ b/src/roff/groff/Makefile.sub
@@ -44,22 +44,20 @@ RM=rm -f
all: $(srcdir)/groff.cpp groff_opts.tmp $(GROFF_OPTS_OUTPUT)
groff_opts.tmp: $(srcdir)/groff.cpp
- @$(GREP) -e ':.*:.*:' $< \
+ @$(GREP) -e ':.*:.*:' $? \
| sed -e 's/[ \t",]//g' > $@
@echo -n 'groff options: '
@cat $@
groff_opts_no_arg.txt: groff_opts.tmp
@$(RM) $@
- @cat $< \
- | sed -e 's/[a-zA-Z]://g' > $@
+ @sed -e 's/[a-zA-Z]://g' $? > $@
@echo -n 'no arg: '
@cat $@
groff_opts_with_arg.txt: groff_opts_no_arg.txt
@$(RM) $@
- @cat groff_opts.tmp \
- | sed "s/[`cat $<`:]//g" > $@
+ @sed "s/[`cat $?`:]//g" groff_opts.tmp > $@
@echo -n 'with arg: '
@cat $@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/02: * src/roff/groff/Makefile.sub: POSIX conformance.,
Werner LEMBERG <=