summaryrefslogtreecommitdiff
path: root/Makefile.src.in
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-02-19 19:59:19 +0000
committertruelight <truelight@openttd.org>2007-02-19 19:59:19 +0000
commitb528cede6dba77a4152d6eb5916cf03075d0d65d (patch)
tree3d623702ad6d93e071f0dba8b774e20560e6fde6 /Makefile.src.in
parent67c3b649d897ea9566ed2685a8c8591174970a6b (diff)
downloadopenttd-b528cede6dba77a4152d6eb5916cf03075d0d65d.tar.xz
(svn r8814) [Config] -Add: added --awk and detect_awk. We now try to find an awk on the user system which allows gsub(). If not found, you can define one yourself, or it tells you versions you might want to install
Diffstat (limited to 'Makefile.src.in')
-rw-r--r--Makefile.src.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile.src.in b/Makefile.src.in
index 9d0980d9a..ca96f16c9 100644
--- a/Makefile.src.in
+++ b/Makefile.src.in
@@ -27,6 +27,7 @@ MAKEDEPEND = !!MAKEDEPEND!!
CFLAGS_MAKEDEP= !!CFLAGS_MAKEDEP!!
SORT = !!SORT!!
REVISION = !!REVISION!!
+AWK = !!AWK!!
CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!!
CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!!
CONFIG_CACHE_ENDIAN = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_ENDIAN!!
@@ -82,7 +83,7 @@ ifeq ($(shell if test -d $(SRC_DIR)/.svn; then echo 1; fi), 1)
# Find if the local source if modified
REV_MODIFIED := $(shell svnversion $(SRC_DIR) | sed -n 's/.*\(M\).*/\1/p' )
# Find the revision like: rXXXX-branch
-REV := $(shell LC_ALL=C svn info $(SRC_DIR) | awk '/^URL:.*branch/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
+REV := $(shell LC_ALL=C svn info $(SRC_DIR) | $(AWK) '/^URL:.*branch/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }')
endif
endif
# Make sure we have something in REV
@@ -166,7 +167,7 @@ endif
# Remove all comments and includes that don't start with $(SRC_DIR)
# Remove $(SRC_DIR) from object-file-name
- @awk ' \
+ @$(AWK) ' \
/^# DO NOT/ { print $$0 ; next} \
/^#/ {next} \
/:/ { \