Cleaner solution for echoing the SOURCES variable.

This commit is contained in:
Sam Hocevar
2009-11-26 01:19:08 +00:00
committed by sam
parent b9f9327716
commit f8c30fa9c0
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -20,3 +20,5 @@ libzzuf_la_CFLAGS = -DLIBZZUF
libzzuf_la_LDFLAGS = -avoid-version -no-undefined $(DLL_LDFLAGS)
libzzuf_la_LIBADD = $(GETOPT_LIBS) $(DL_LIBS) $(MATH_LIBS) $(WINSOCK2_LIBS)
echo-sources: ; echo $(SOURCES)
+2
View File
@@ -6,3 +6,5 @@ noinst_PROGRAMS = zzcat zzero zznop bug-overflow bug-memory bug-div0
TESTS = check-build check-md5 check-overflow check-memory check-div0 \
check-rng check-utils
echo-sources: ; echo $(SOURCES)
+1 -3
View File
@@ -29,9 +29,7 @@ fi
failure=0
for dir in src test; do
pushd ../$dir >/dev/null
# Dirty hack to print the $(SOURCES) variable
for x in $(make -s ID SHELL='echo @@$(SOURCES)@@' | tr -d '\n' | sed 's/.*@@\([^@]*\)@@.*/\1/');
do
for x in $(make echo-sources); do
if grep '[[:space:]]$' "$x" >/dev/null 2>&1; then
echo "error: $dir/$x contains trailing spaces"
failure=1