Module Name: src
Committed By: rillig
Date: Thu Apr 8 06:44:55 UTC 2021
Modified Files:
src/libexec/httpd/small: Makefile
Log Message:
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 '['.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/libexec/httpd/small/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/libexec/httpd/small/Makefile
diff -u src/libexec/httpd/small/Makefile:1.4 src/libexec/httpd/small/Makefile:1.5
--- src/libexec/httpd/small/Makefile:1.4 Mon Jul 13 10:35:17 2020
+++ src/libexec/httpd/small/Makefile Thu Apr 8 06:44:55 2021
@@ -14,13 +14,21 @@ LEAN_IFDEF_FLAGS= -UDEBUG -DNO_USER_SUPP
CFLAGS= -I$(.CURDIR)/.. ${LEAN_IFDEF_FLAGS}
bozohttpd-small.c: bozohttpd.c
- unifdef $(LEAN_IFDEF_FLAGS) < $> > [email protected] ;\
- if [ $$? -ne 1 ]; then echo "unifdef returned $?, expecting 1" 2>&1; false; fi
+ unifdef $(LEAN_IFDEF_FLAGS) < $> > [email protected]; \
+ status=$$?; \
+ if [ $$status -ne 1 ]; then \
+ echo "unifdef returned $$status, expecting 1" 2>&1; \
+ false; \
+ fi
mv -f [email protected] $@
content-bozo-small.c: content-bozo.c
- unifdef $(LEAN_IFDEF_FLAGS) < $> > [email protected] ;\
- if [ $$? -ne 1 ]; then echo "unifdef returned $?, expecting 1" 2>&1; false; fi
+ unifdef $(LEAN_IFDEF_FLAGS) < $> > [email protected]; \
+ status=$$?; \
+ if [ $$status -ne 1 ]; then \
+ echo "unifdef returned $$status, expecting 1" 2>&1; \
+ false; \
+ fi
mv -f [email protected] $@
CLEANFILES+= content-bozo-small.c bozohttpd-small.c