summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-05-19 08:51:52 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-05-19 08:51:52 +0000
commit1b9ea4e19cc42824e3b44f2bdfd1c149656eb8a8 (patch)
tree9414f8010eb9785dff27b660f7ebbcceb2fff079
parent34232596e9b25bf69edb451a5f6d6366ac7912cf (diff)
downloadrockbox-1b9ea4e19cc42824e3b44f2bdfd1c149656eb8a8.tar.gz
rockbox-1b9ea4e19cc42824e3b44f2bdfd1c149656eb8a8.zip
Fixed bad dependency generation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6490 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-xtools/configure2
-rw-r--r--tools/make.inc18
2 files changed, 16 insertions, 4 deletions
diff --git a/tools/configure b/tools/configure
index cab737393b..346465c175 100755
--- a/tools/configure
+++ b/tools/configure
@@ -689,7 +689,7 @@ all:
clean:
@\$(MAKE) -C \$(FIRMDIR) clean OBJDIR=\$(BUILDDIR)/firmware
@\$(MAKE) -C \$(APPSDIR) clean OBJDIR=\$(BUILDDIR)/@APPS@
- @rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim
+ @rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.h
tags:
@rm -f TAGS
diff --git a/tools/make.inc b/tools/make.inc
index ea9815b6d2..b5eae4430e 100644
--- a/tools/make.inc
+++ b/tools/make.inc
@@ -14,12 +14,24 @@ $(OBJDIR)/%.o: %.S
@echo "CC $<"
$(SILENT)$(CC) $(CFLAGS) -c $< -o $@
-# the lame echo stuff down here is to prevent any compiler errors/warnings
-# to cause an error code to get returned and thus stop the build
+# The echo stuff last in the dep update shell magic is to prevent any compiler
+# errors/warnings to cause an error code to get returned and thus stop the
+# build
+#
+# This script checks for the presence of $(BUILDDIR)/lang.h and if it doesn't
+# alreay exist, it is created. This is because lots of files include this
+# *generated* file and if it doesn't exist when we generate the deps it is no
+# good. There's a -MG compiler option to cover for this case, but it doesn't
+# play nicely into this as it then adds a dependency to the lang.h file
+# without the proper path.
+#
$(DEPFILE): $(SOURCES)
$(SILENT)mkdir -p `dirname $(DEPFILE)`
$(SILENT)rm -f $(DEPFILE)
- $(SILENT)(for each in $(SOURCES) x; do \
+ $(SILENT)(if test ! -f $(BUILDDIR)/lang.h; then \
+ touch $(BUILDDIR)/lang.h; \
+ fi; \
+ for each in $(SOURCES) x; do \
if test "x" != "$$each"; then \
obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \
$(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \