summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Makefile7
-rwxr-xr-xconfigure15
3 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 9f3d4a38..2fc9fba7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-11-23 Kaz Kylheku <kkylheku@gmail.com>
+ * configure (platform_flags, remove_flags): New config variables.
+
+ * Makefile (CFLAGS): Take into account new flags.
+
+2009-11-23 Kaz Kylheku <kkylheku@gmail.com>
+
Follow up on 64 bit compilation warnings.
* lib.c (chr, chrp): Do not convert directly between wchar_t and
diff --git a/Makefile b/Makefile
index 05f2d19c..1f9fe8e0 100644
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,8 @@
-include config.make
CFLAGS := -I. -I$(top_srcdir) $(LANG_FLAGS) $(DIAG_FLAGS) \
- $(OPT_FLAGS) $(INLINE_FLAGS) $(DBG_FLAGS)
+ $(OPT_FLAGS) $(INLINE_FLAGS) $(DBG_FLAGS) $(PLATFORM_FLAGS)
+CFLAGS := $(filter-out $(REMOVE_FLAGS),$(CFLAGS))
OBJS := txr.o lex.yy.o y.tab.o match.o lib.o regex.o gc.o unwind.o stream.o
OBJS += hash.o utf8.o
@@ -98,8 +99,8 @@ install: $(PROG)
cp txr $(install_prefix)$(bindir)
cp $(top_srcdir)/txr.1 $(install_prefix)$(mandir)/man1
-config.make:
- @echo "config.make missing: you didn't run ./configure"
+config.make config.h:
+ @echo "$@ missing: you didn't run ./configure"
@exit 1
#
diff --git a/configure b/configure
index d8445345..fbd89b87 100755
--- a/configure
+++ b/configure
@@ -115,6 +115,8 @@ lang_flags=${lang_flags--ansi -std=c89 -D_POSIX_C_SOURCE=2}
diag_flags=${diag_flags--Wall}
debug_flags=${debug_flags--g}
inline_flags=${inline_flags--Dinline=\"static __inline\"}
+platform_flags=${platform_flags-}
+remove_flags=${remove_flags-}
lex_dbg_flags=${lex_dbg_flags-}
txr_dbg_opts=${txr_dbg_opts---gc-debug}
#
@@ -263,6 +265,17 @@ inline_flags [$inline_flags]
Specifies flag for defining a macro that expands to a suitable
compiler-specific inline specifier.
+platform_flags [$platform_flags]
+
+ Specify additional compiler flags for anything else, such as CPU tuning,
+ target ABI selection, code generation options, et cetera.
+
+remove_flags [$remove_flags]
+
+ This is a negative otpion. Any flags mentioned in this variable
+ will be removed from any of the other compiler flags options above.
+ The flags may contain GNU Make patterns.
+
lex_dbg_flags [$lex_dbg_flags]
Specifies debug flags to be passed to lex, perhaps to generate a debugging
@@ -462,6 +475,8 @@ LANG_FLAGS := $lang_flags
DIAG_FLAGS := $diag_flags
DBG_FLAGS := $debug_flags
INLINE_FLAGS := $inline_flags
+PLATFORM_FLAGS := $platform_flags
+REMOVE_FLAGS := $remove_flags
LEX_DBG_FLAGS := $lex_dbg_flags
TXR_DBG_OPTS := $txr_dbg_opts
!