[matroska] r947 - trunk/libmatroska/make/mingw32

[email protected]
Newsgroups gmane.comp.multimedia.matroska.cvs
Message-ID <[email protected]>
Author: mosu
Date: 2004-11-14 00:15:08 +0300 (Sun, 14 Nov 2004)
New Revision: 947

Modified:
   trunk/libmatroska/make/mingw32/
   trunk/libmatroska/make/mingw32/Makefile
Log:
Fixed "make depend". Ignore a couple of files.


Property changes on: trunk/libmatroska/make/mingw32
___________________________________________________________________
Name: svn:ignore
   + test6
test8
test9
*.exe
libmatroska.dll
libmatroska.dll.a
libmatroska.a
.depend


Modified: trunk/libmatroska/make/mingw32/Makefile
===================================================================
--- trunk/libmatroska/make/mingw32/Makefile	2004-11-13 21:11:29 UTC (rev 946)
+++ trunk/libmatroska/make/mingw32/Makefile	2004-11-13 21:15:08 UTC (rev 947)
@@ -54,7 +54,7 @@
 tests: $(TESTS)
 
 clean:
-	rm -f $(OBJ) libmatroska.* *.exe ../../test/mux/*.o ../../test/tags/*.o
+	rm -f $(OBJ) libmatroska.* *.exe ../../test/mux/*.o ../../test/tags/*.o .depend
 
 libmatroska.a: $(OBJ)
 	ar r $@ $(OBJ)
@@ -85,7 +85,14 @@
 	$(LD) -o $@ $(LDFLAGS) $< -lmatroska -lebml
 
 depend:
-	$(CXX) $(CXXFLAGS) -MM $(SRC) > .depend
+	@echo Calculating dependecies:
+	@rm -f .depend
+	@touch .depend
+	@for i in $(SRC); do \
+		o="`echo $$i | sed -e 's/\.c$$/.o/' -e 's/\.cpp$$/.o/'`" ; \
+		echo '  ' $$i: $$o ; \
+		$(CXX) $(CXXFLAGS) -MM -MT $$o $$i >> .depend ; \
+	done
 
 #
 # include dependency files if they exist
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.