]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 21 Nov 2009 00:56:13 +0000 (13:56 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 21 Nov 2009 00:56:13 +0000 (13:56 +1300)
Style Makefile.am to use variable expansion instead of @ AUTOMAKEVAR

@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.

Also:
 * Cleanup our big sed rule to avoid automake collisions
 * Odd REPL_POLICIES comment reference in repl/Makefile.am

scripts/srcformat.sh
src/Makefile.am
src/repl/Makefile.am

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
index 8e792992dccf384384b073a62dc35f5729b2b328..e5de0d1fb31bd227fbd1b4bab9a56eb11fde1814 100644 (file)
@@ -40,8 +40,6 @@ if USE_ADAPTATION
 SUBDIRS += adaptation
 endif
 
-ADAPTATION_LIBS = @ADAPTATION_LIBS@
-
 if USE_ESI
 SUBDIRS += esi
 ESI_LOCAL_LIBS = \
@@ -764,26 +762,26 @@ cf_gen_defines.h: $(srcdir)/cf_gen_defines $(srcdir)/cf.data.pre
 ## depend on the Makefile.
 cf.data: cf.data.pre Makefile
        sed "\
-       s%@DEFAULT_HTTP_PORT@%$(DEFAULT_HTTP_PORT)%g;\
-       s%@DEFAULT_ICP_PORT@%$(DEFAULT_ICP_PORT)%g;\
-       s%@DEFAULT_CACHE_EFFECTIVE_USER@%${CACHE_EFFECTIVE_USER}%g;\
-       s%@DEFAULT_MIME_TABLE@%$(DEFAULT_MIME_TABLE)%g;\
-       s%@DEFAULT_DNSSERVER@%$(DEFAULT_DNSSERVER)%g;\
-       s%@DEFAULT_UNLINKD@%$(DEFAULT_UNLINKD)%g;\
-       s%@DEFAULT_PINGER@%$(DEFAULT_PINGER)%g;\
-       s%@DEFAULT_DISKD@%$(DEFAULT_DISKD)%g;\
-       s%@DEFAULT_CACHE_LOG@%$(DEFAULT_CACHE_LOG)%g;\
-       s%@DEFAULT_ACCESS_LOG@%$(DEFAULT_ACCESS_LOG)%g;\
-       s%@DEFAULT_STORE_LOG@%$(DEFAULT_STORE_LOG)%g;\
-       s%@DEFAULT_PID_FILE@%$(DEFAULT_PID_FILE)%g;\
-       s%@DEFAULT_NETDB_FILE@%$(DEFAULT_NETDB_FILE)%g;\
-       s%@DEFAULT_SWAP_DIR@%$(DEFAULT_SWAP_DIR)%g;\
-       s%@DEFAULT_ICON_DIR@%$(DEFAULT_ICON_DIR)%g;\
-       s%@DEFAULT_CONFIG_DIR@%$(DEFAULT_CONFIG_DIR)%g;\
-       s%@DEFAULT_PREFIX@%$(DEFAULT_PREFIX)%g;\
-       s%@DEFAULT_HOSTS@%$(DEFAULT_HOSTS)%g;\
-       s%@IPV6_ONLY_SETTING@%$(SET_IPV6_SETTINGS)%g;\
-       s%@SQUID@%SQUID\ $(VERSION)%g;"\
+       s%[@]DEFAULT_HTTP_PORT[@]%$(DEFAULT_HTTP_PORT)%g;\
+       s%[@]DEFAULT_ICP_PORT[@]%$(DEFAULT_ICP_PORT)%g;\
+       s%[@]DEFAULT_CACHE_EFFECTIVE_USER[@]%${CACHE_EFFECTIVE_USER}%g;\
+       s%[@]DEFAULT_MIME_TABLE[@]%$(DEFAULT_MIME_TABLE)%g;\
+       s%[@]DEFAULT_DNSSERVER[@]%$(DEFAULT_DNSSERVER)%g;\
+       s%[@]DEFAULT_UNLINKD[@]%$(DEFAULT_UNLINKD)%g;\
+       s%[@]DEFAULT_PINGER[@]%$(DEFAULT_PINGER)%g;\
+       s%[@]DEFAULT_DISKD[@]%$(DEFAULT_DISKD)%g;\
+       s%[@]DEFAULT_CACHE_LOG[@]%$(DEFAULT_CACHE_LOG)%g;\
+       s%[@]DEFAULT_ACCESS_LOG[@]%$(DEFAULT_ACCESS_LOG)%g;\
+       s%[@]DEFAULT_STORE_LOG[@]%$(DEFAULT_STORE_LOG)%g;\
+       s%[@]DEFAULT_PID_FILE[@]%$(DEFAULT_PID_FILE)%g;\
+       s%[@]DEFAULT_NETDB_FILE[@]%$(DEFAULT_NETDB_FILE)%g;\
+       s%[@]DEFAULT_SWAP_DIR[@]%$(DEFAULT_SWAP_DIR)%g;\
+       s%[@]DEFAULT_ICON_DIR[@]%$(DEFAULT_ICON_DIR)%g;\
+       s%[@]DEFAULT_CONFIG_DIR[@]%$(DEFAULT_CONFIG_DIR)%g;\
+       s%[@]DEFAULT_PREFIX[@]%$(DEFAULT_PREFIX)%g;\
+       s%[@]DEFAULT_HOSTS[@]%$(DEFAULT_HOSTS)%g;\
+       s%[@]IPV6_ONLY_SETTING[@]%$(SET_IPV6_SETTINGS)%g;\
+       s%[@]SQUID[@]%SQUID\ $(VERSION)%g;"\
        < $(srcdir)/cf.data.pre >$@
 
 repl_modules.cc: repl_modules.sh Makefile
index 9aa0342bc5693219c178bd0ff4e7cfc6e9eadb46..9fe09a5692145a8b04591312d30e72a4b37bb783 100644 (file)
@@ -10,7 +10,7 @@ INCLUDES += -I$(srcdir)
 
 AUTOMAKE_OPTIONS = subdir-objects
 
-# No recursion is needed for the subdirs, we build from here. // @REPL_POLICIES@
+# No recursion is needed for the subdirs, we build from here.
 
 EXTRA_LIBRARIES = liblru.a libheap.a
 noinst_LIBRARIES = @REPL_LIBS@