Makefile.in
changeset 5345 0202f62906ca
parent 5341 fcde22671032
child 5346 437e54382293
--- a/Makefile.in	Fri Feb 18 09:30:09 2011 -0800
+++ b/Makefile.in	Fri Feb 18 11:19:34 2011 -0800
@@ -108,15 +108,12 @@
 $(objects):
 	$(SHELL) $(auxdir)/mkinstalldirs $@
 
-# To make sure parallel builds will not fail
-include/SDL_revision.h: update-revision
-
 update-revision:
 	$(SHELL) $(auxdir)/updaterev.sh
 
-.PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
+.PHONY: all install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
 
-$(objects)/$(TARGET): update-revision $(OBJECTS) $(VERSION_OBJECTS)
+$(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS)
 	$(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS)
 
 $(objects)/$(SDLMAIN_TARGET): $(SDLMAIN_OBJECTS)
@@ -127,13 +124,18 @@
 install-bin:
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
 	$(INSTALL) -m 755 sdl-config $(DESTDIR)$(bindir)/sdl-config
-install-hdrs: include/SDL_revision.h
+install-hdrs: update-revision
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL
 	for file in $(HDRS); do \
 	    $(INSTALL) -m 644 $(srcdir)/include/$$file $(DESTDIR)$(includedir)/SDL/$$file; \
 	done
 	$(INSTALL) -m 644 include/SDL_config.h $(DESTDIR)$(includedir)/SDL/SDL_config.h
-	$(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h
+	if test -f include/SDL_revision.h; then \
+	    $(INSTALL) -m 644 include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
+	else \
+	    $(INSTALL) -m 644 $(srcdir)/include/SDL_revision.h $(DESTDIR)$(includedir)/SDL/SDL_revision.h; \
+	fi
+
 install-lib: $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET)
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)
 	$(LIBTOOL) --mode=install $(INSTALL) $(objects)/$(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
@@ -167,7 +169,7 @@
 	if test -f test/Makefile; then (cd test; $(MAKE) $@); fi
 
 distclean: clean
-	rm -f Makefile sdl-config
+	rm -f Makefile Makefile.rules sdl-config
 	rm -f SDL.qpg
 	rm -f config.status config.cache config.log libtool
 	rm -rf $(srcdir)/autom4te*