summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorFreeyorp <TheFreeYorp+git@gmail.com>2024-06-05 22:06:13 +0000
committerFreeyorp <TheFreeYorp+git@gmail.com>2024-06-05 23:57:13 +0000
commitdd024fdf9ca01c02b79371512672f6798468020d (patch)
treed097b70b264bf954d3c1ecd46abacfb0ce95cdec /Makefile.in
parentbf14f1b157333c53cc0578f20627529e5fd3e539 (diff)
downloadtmwa-dd024fdf9ca01c02b79371512672f6798468020d.tar.gz
tmwa-dd024fdf9ca01c02b79371512672f6798468020d.tar.bz2
tmwa-dd024fdf9ca01c02b79371512672f6798468020d.tar.xz
tmwa-dd024fdf9ca01c02b79371512672f6798468020d.zip
Create generated files in the build directory
Also, just require the use of full paths when #including a generated file. This fixes fresh out-of-tree builds using attoconf, and gets rid of a lot of annoying terminal output when attoconf is tracing dependencies.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in10
1 files changed, 3 insertions, 7 deletions
diff --git a/Makefile.in b/Makefile.in
index d4334eb..2f62baf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -488,12 +488,8 @@ obj/%.d: src/%.cpp | stamp/generated.stamp
-MF $@ $<
# -MG takes the include parameter as-is without prepending the path whenever
# it's not found, and presumed to be a not-yet generated file.
-# This is troublesome, since real.make tends not to be in the same directory.
-# We work around this by checking to see if a file doesn't exist, and if it
-# doesn't, we prepend the path.
- for f in $$(sed -e '1s@$(patsubst obj/%.d,%,$@) := \(.*\)@\1@' $@ | tr ' ' \\n | grep -vFx -e : -e \\); do \
- test -f "$${f}" || sed -i "s|\($${f}\)|src/$(dir $*)\1|" $@; \
- done
+# #include statements for generated files should always be relative to the
+# source (or build) directory.
endif
# the above SRC_DIR replacement is not really safe, but it works okayish.
obj/%.ii: src/%.cpp
@@ -742,7 +738,7 @@ conf-raw/str-%.h: FORCE
FORCE:: ;
.PHONY: FORCE
-override CPPFLAGS += -I . -I ${SRC_DIR}/include
+override CPPFLAGS += -I. -I${SRC_DIR}/include
# distribution tarballs
# this only works from within a git checkout