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
commit788535debf6999c03a434a3ccad91f45d741db58 (patch)
tree3d623702ad6d93e071f0dba8b774e20560e6fde6 /Makefile.src.in
parent8b97c5f240e1485d20802f21f1d96e3508cbf046 (diff)
downloadopenttd-788535debf6999c03a434a3ccad91f45d741db58.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} \
/:/ { \