]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Style Makefile.am to use instead of @AUTOMAKEVAR
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Wed, 11 Nov 2009 11:44:58 +0000 (12:44 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Wed, 11 Nov 2009 11:44:58 +0000 (12:44 +0100)
@AUTOMAKEVAR@ is troublesome when used in \ constructs as it may expand
to empty and the last line in a \ construct must not be empty or some
make versions will fail.

thankfully automake adds all variables for us, so using
is preferred.

scripts/srcformat.sh

index 659c8a4c5dbb8df9d452b27ca3ccbedbc9caadcd..ae031c65f6cf26c9f56ef7f728e28e07fd10846e 100755 (executable)
@@ -36,8 +36,16 @@ for FILENAME in `ls -1`; do
                else
                        rm $FILENAME.astylebak
                fi
-               continue;
+               continue
         fi
+       ;;
+
+    Makefile.am)
+
+       perl -i -p -e 's/@([A-Z0-9_]+)@/\$($1)/g' <${FILENAME} >${FILENAME}.styled
+       mv ${FILENAME}.styled ${FILENAME}
+       ;;
+
     esac
 
     if test -d $FILENAME ; then