mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Fixed bad dependency generation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6490 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
34232596e9
commit
1b9ea4e19c
2 changed files with 16 additions and 4 deletions
2
tools/configure
vendored
2
tools/configure
vendored
|
@ -689,7 +689,7 @@ all:
|
||||||
clean:
|
clean:
|
||||||
@\$(MAKE) -C \$(FIRMDIR) clean OBJDIR=\$(BUILDDIR)/firmware
|
@\$(MAKE) -C \$(FIRMDIR) clean OBJDIR=\$(BUILDDIR)/firmware
|
||||||
@\$(MAKE) -C \$(APPSDIR) clean OBJDIR=\$(BUILDDIR)/@APPS@
|
@\$(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:
|
tags:
|
||||||
@rm -f TAGS
|
@rm -f TAGS
|
||||||
|
|
|
@ -14,12 +14,24 @@ $(OBJDIR)/%.o: %.S
|
||||||
@echo "CC $<"
|
@echo "CC $<"
|
||||||
$(SILENT)$(CC) $(CFLAGS) -c $< -o $@
|
$(SILENT)$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
# the lame echo stuff down here is to prevent any compiler errors/warnings
|
# The echo stuff last in the dep update shell magic is to prevent any compiler
|
||||||
# to cause an error code to get returned and thus stop the build
|
# 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)
|
$(DEPFILE): $(SOURCES)
|
||||||
$(SILENT)mkdir -p `dirname $(DEPFILE)`
|
$(SILENT)mkdir -p `dirname $(DEPFILE)`
|
||||||
$(SILENT)rm -f $(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 \
|
if test "x" != "$$each"; then \
|
||||||
obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \
|
obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \
|
||||||
$(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \
|
$(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue