diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/configure | 2 | ||||
-rw-r--r-- | tools/make.inc | 18 |
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: | |||
689 | clean: | 689 | clean: |
690 | @\$(MAKE) -C \$(FIRMDIR) clean OBJDIR=\$(BUILDDIR)/firmware | 690 | @\$(MAKE) -C \$(FIRMDIR) clean OBJDIR=\$(BUILDDIR)/firmware |
691 | @\$(MAKE) -C \$(APPSDIR) clean OBJDIR=\$(BUILDDIR)/@APPS@ | 691 | @\$(MAKE) -C \$(APPSDIR) clean OBJDIR=\$(BUILDDIR)/@APPS@ |
692 | @rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim | 692 | @rm -rf rockbox.zip TAGS @APPS@ firmware comsim sim lang.h |
693 | 693 | ||
694 | tags: | 694 | tags: |
695 | @rm -f TAGS | 695 | @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 | |||
14 | @echo "CC $<" | 14 | @echo "CC $<" |
15 | $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ | 15 | $(SILENT)$(CC) $(CFLAGS) -c $< -o $@ |
16 | 16 | ||
17 | # the lame echo stuff down here is to prevent any compiler errors/warnings | 17 | # The echo stuff last in the dep update shell magic is to prevent any compiler |
18 | # to cause an error code to get returned and thus stop the build | 18 | # errors/warnings to cause an error code to get returned and thus stop the |
19 | # build | ||
20 | # | ||
21 | # This script checks for the presence of $(BUILDDIR)/lang.h and if it doesn't | ||
22 | # alreay exist, it is created. This is because lots of files include this | ||
23 | # *generated* file and if it doesn't exist when we generate the deps it is no | ||
24 | # good. There's a -MG compiler option to cover for this case, but it doesn't | ||
25 | # play nicely into this as it then adds a dependency to the lang.h file | ||
26 | # without the proper path. | ||
27 | # | ||
19 | $(DEPFILE): $(SOURCES) | 28 | $(DEPFILE): $(SOURCES) |
20 | $(SILENT)mkdir -p `dirname $(DEPFILE)` | 29 | $(SILENT)mkdir -p `dirname $(DEPFILE)` |
21 | $(SILENT)rm -f $(DEPFILE) | 30 | $(SILENT)rm -f $(DEPFILE) |
22 | $(SILENT)(for each in $(SOURCES) x; do \ | 31 | $(SILENT)(if test ! -f $(BUILDDIR)/lang.h; then \ |
32 | touch $(BUILDDIR)/lang.h; \ | ||
33 | fi; \ | ||
34 | for each in $(SOURCES) x; do \ | ||
23 | if test "x" != "$$each"; then \ | 35 | if test "x" != "$$each"; then \ |
24 | obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \ | 36 | obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \ |
25 | $(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \ | 37 | $(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \ |