summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-03-31 05:50:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-03-31 05:50:57 -0700
commit8a6c10b30d493ddd15fa24f8ac81744ccee85104 (patch)
treef6b349b266063fb49f34f797b615519bcc502ecb
parente81e489cec32d4b68b3042fa61ff2580d0fb5ec2 (diff)
downloadtxr-8a6c10b30d493ddd15fa24f8ac81744ccee85104.tar.gz
txr-8a6c10b30d493ddd15fa24f8ac81744ccee85104.tar.bz2
txr-8a6c10b30d493ddd15fa24f8ac81744ccee85104.zip
Fix broken out-of-tree build.
Reported by Marco Wahl. When building in a separate directory, the y.tab.h file isn't found because the current directory is not searched by the compiler. It searches only the original source tree and the local config directory. * Makefile (TXR_CFLAGS): We must have . in the include file search path otherwise files can only find y.tab.h when it's in the same directory where they are.
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index a3026e1e..fce8e628 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,8 @@
VERBOSE :=
TXR_CFLAGS := $(CFLAGS)
-TXR_CFLAGS += -iquote $(conf_dir) $(if $(top_srcdir),-iquote $(top_srcdir)) \
+TXR_CFLAGS += -iquote $(conf_dir) \
+ -iquote . $(if $(top_srcdir), -iquote $(top_srcdir)) \
$(LANG_FLAGS) $(DIAG_FLAGS) \
$(DBG_FLAGS) $(PLATFORM_CFLAGS) $(EXTRA_FLAGS)
TXR_CFLAGS += $(filter-out $(REMOVE_FLAGS),$(TXR_CFLAGS))