From b95733310900e86679fce5cbc37e2e18d299f9ca Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 7 Nov 2004 20:33:32 +0000 Subject: [project @ 2004-11-07 20:33:32 by jmb] Use scandeps for dependency checking Fixup include path in riscos/options.h Lose commented out include in riscos/gui.c (It broke scandeps <- we may wish to fix this too ;) svn path=/import/nstheme/; revision=2437 --- makefile | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'makefile') diff --git a/makefile b/makefile index 71bb865..402360c 100644 --- a/makefile +++ b/makefile @@ -49,7 +49,7 @@ riscos: $(RUNIMAGE) $(RUNIMAGE) : $(OBJS_RISCOS) $(CC) -o $@ $(LDFLAGS_RISCOS) $^ -netsurf.zip: $(RUNIMAGE) +nstheme.zip: $(RUNIMAGE) rm nstheme.zip; riscos-zip -9vr, nstheme.zip !NSTheme # pattern rule for c source @@ -57,15 +57,19 @@ $(OBJDIR_RISCOS)/%.o : %.c @echo "==> $<" @$(CC) -o $@ -c $(CFLAGS_RISCOS) $< -# generate dependencies -depend : $(SOURCES_RISCOS) - -mkdir $(OBJDIR_RISCOS) - $(CC) -MM -MG $(CFLAGS_RISCOS) $^ | sed 's|.*\.o:|$(OBJDIR_RISCOS)/&|g' > depend +# Generate dependencies. +# To disable automatic regeneration of dependencies (eg. if perl is not +# available), remove */*.[ch] from the line below. +# Under RISC OS, you may require *Set UnixFS$sfix "", if perl gives +# "No such file or directory" errors. +depend: */*.[ch] + @echo "--> modified files $?" + @echo "--> updating dependencies" + @-mkdir -p $(OBJDIR_RISCOS) + @perl scandeps nstheme $(OBJDIR_RISCOS) -- $^ > depend + +include depend # remove generated files clean : - -rm $(OBJDIR_RISCOS) - -ifneq ($(OS),riscos) -include depend -endif + -rm $(OBJDIR_RISCOS)/* -- cgit v1.2.3