summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2021-04-08 06:44:55 +0000
committerrillig <rillig@NetBSD.org>2021-04-08 06:44:55 +0000
commitc28b4f86443a9e64f2cb2c7f4361bd6cffcc827f (patch)
tree627e002db8bf2a514792760dd512fc04f1479fe5 /libexec
parent808913a462b8d972cec911d0174c73439f4e7971 (diff)
bozohttpd-small: fix error handling for unifdef
The second of the '$$?' was spelled only '$?'. At the time where this shell expression was evaluated, it had already been overwritten by the preceding command '['.
Diffstat (limited to 'libexec')
-rw-r--r--libexec/httpd/small/Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/libexec/httpd/small/Makefile b/libexec/httpd/small/Makefile
index 9c8b175df7b..1f284ee187e 100644
--- a/libexec/httpd/small/Makefile
+++ b/libexec/httpd/small/Makefile
@@ -14,13 +14,21 @@ LEAN_IFDEF_FLAGS= -UDEBUG -DNO_USER_SUPPORT \
CFLAGS= -I$(.CURDIR)/.. ${LEAN_IFDEF_FLAGS}
bozohttpd-small.c: bozohttpd.c
- unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp ;\
- if [ $$? -ne 1 ]; then echo "unifdef returned $?, expecting 1" 2>&1; false; fi
+ unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp; \
+ status=$$?; \
+ if [ $$status -ne 1 ]; then \
+ echo "unifdef returned $$status, expecting 1" 2>&1; \
+ false; \
+ fi
mv -f $@.tmp $@
content-bozo-small.c: content-bozo.c
- unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp ;\
- if [ $$? -ne 1 ]; then echo "unifdef returned $?, expecting 1" 2>&1; false; fi
+ unifdef $(LEAN_IFDEF_FLAGS) < $> > $@.tmp; \
+ status=$$?; \
+ if [ $$status -ne 1 ]; then \
+ echo "unifdef returned $$status, expecting 1" 2>&1; \
+ false; \
+ fi
mv -f $@.tmp $@
CLEANFILES+= content-bozo-small.c bozohttpd-small.c