diff options
Diffstat (limited to 'tools/make.inc')
-rw-r--r-- | tools/make.inc | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/tools/make.inc b/tools/make.inc index 5a2ed800a6..344fa23543 100644 --- a/tools/make.inc +++ b/tools/make.inc @@ -28,25 +28,21 @@ $(OBJDIR)/%.o: %.S $(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 ) + $(SILENT)(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) -MG -MM -MT "$(OBJDIR)/$$obj" $(CFLAGS) $$each 2>/dev/null; \ + fi; \ + if test -n "$$del"; then \ + rm $$del; \ + del=""; \ + fi \ + done | sed -e "s:[^[:space:]]*lang.h:$(OBJDIR)/lang.o:" > $(DEPFILE); \ + echo "oo" > /dev/null ) tags: $(SILENT)(for d in $(DIRS); do \ |