The dependency generation for credits.c failed since it includes a file
that does't exist when gcc -MM is used. Thus we do one more work-around that creates the file before depedency generation and then removes it again afterwards... git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8355 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
ffb0cdc426
commit
137501b9ac
2 changed files with 11 additions and 2 deletions
|
@ -52,11 +52,11 @@ endif
|
|||
.PHONY: $(SUBDIRS)
|
||||
all: $(BUILDDIR)/libplugin.a $(ROCKS) $(SUBDIRS) $(DEPFILE)
|
||||
|
||||
$(OBJDIR)/credits.raw: $(DOCSDIR)/CREDITS
|
||||
$(BUILDDIR)/credits.raw: $(DOCSDIR)/CREDITS
|
||||
@echo "create credits.raw"
|
||||
@perl credits.pl < $< > $@
|
||||
|
||||
$(OBJDIR)/credits.o: credits.c $(OBJDIR)/credits.raw
|
||||
$(OBJDIR)/credits.o: credits.c $(BUILDDIR)/credits.raw
|
||||
@mkdir -p `dirname $@`
|
||||
@echo "CC $<"
|
||||
@$(CC) $(CFLAGS) -I$(OBJDIR) -c $< -o $@
|
||||
|
|
|
@ -29,13 +29,22 @@ $(DEPFILE): $(SOURCES)
|
|||
$(SILENT)mkdir -p `dirname $(DEPFILE)`
|
||||
$(SILENT)rm -f $(DEPFILE)
|
||||
$(SILENT)(if test ! -f $(BUILDDIR)/lang.h; then \
|
||||
del="$(BUILDDIR)/lang.h"; \
|
||||
touch $(BUILDDIR)/lang.h; \
|
||||
fi; \
|
||||
for each in $(SOURCES) x; do \
|
||||
if test "$$each" = "credits.c"; then \
|
||||
del="$$del$(BUILDDIR)/credits.raw"; \
|
||||
touch $(BUILDDIR)/credits.raw; \
|
||||
fi; \
|
||||
if test "x" != "$$each"; then \
|
||||
obj=`echo $$each | sed -e 's/\.[cS]/.o/'`; \
|
||||
$(CC) -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each >> $(DEPFILE) 2>/dev/null; \
|
||||
fi; \
|
||||
if test -n "$$del"; then \
|
||||
rm $$del; \
|
||||
del=""; \
|
||||
fi \
|
||||
done; \
|
||||
echo "oo" >/dev/null )
|
||||
|
||||
|
|
Loading…
Reference in a new issue