diff --git a/Makefile.mingw b/Makefile.mingw index 1f299ee74..f1b2e9302 100644 --- a/Makefile.mingw +++ b/Makefile.mingw @@ -16,14 +16,7 @@ endif # And now the targets. .PHONY: config.h -all: config.h subdirs - -config.h: - if [ ! -f config.h ]; then \ - cp config.h.mingw config.h ; \ - else \ - true; \ - fi +all: subdirs subdirs: list='$(SUBDIRS)'; \ @@ -39,6 +32,10 @@ clean: (cd $$subdir && make -f Makefile.mingw clean) || exit 1; \ done +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: list='$(SUBDIRS)'; \ for subdir in $$list; do \ diff --git a/autogen.sh b/autogen.sh index fa27f3fef..0fc8d9be5 100755 --- a/autogen.sh +++ b/autogen.sh @@ -29,8 +29,10 @@ if gcc -v 2>&1 | grep -i mingw > /dev/null 2> /dev/null; then for i in `find -name Makefile.mingw`; do n=`echo $i | sed 's/\.mingw$//'` echo "Creating $n from $i" - sed "s/Makefile\.mingw\([^\.]\)/Makefile\1/g" < $i > $n + sed "s/-f Makefile\.mingw//g" < $i > $n done + echo "Creating config.h from config.h.mingw" + cp config.h.mingw config.h echo '' echo 'Creating dependencies (calling "make depend")' diff --git a/aviclasses/Makefile.mingw b/aviclasses/Makefile.mingw index 27f763105..6458d3504 100644 --- a/aviclasses/Makefile.mingw +++ b/aviclasses/Makefile.mingw @@ -30,6 +30,10 @@ libaviclasses.a: $(libaviclasses_OBJECTS) clean: rm -f *.o $(LIBRARIES) +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ $(libaviclasses_SOURCES) > .depend diff --git a/avilib-0.6.10/Makefile.mingw b/avilib-0.6.10/Makefile.mingw index d0ff46927..73d7cd0f2 100644 --- a/avilib-0.6.10/Makefile.mingw +++ b/avilib-0.6.10/Makefile.mingw @@ -28,6 +28,10 @@ libavi.a: $(libavi_OBJECTS) clean: rm -f *.o $(LIBRARIES) .depend +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: $(CC) $(CFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ $(libavi_SOURCES) > .depend diff --git a/src/Makefile.mingw b/src/Makefile.mingw index a89012623..ccc801bae 100644 --- a/src/Makefile.mingw +++ b/src/Makefile.mingw @@ -87,6 +87,10 @@ clean: done rm -f *.o $(PROGRAMS) +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: list='$(SUBDIRS)'; \ for subdir in $$list; do \ diff --git a/src/common/Makefile.mingw b/src/common/Makefile.mingw index 9c95457f0..47a950a1f 100644 --- a/src/common/Makefile.mingw +++ b/src/common/Makefile.mingw @@ -63,6 +63,10 @@ libmtxcomp.a: $(libmtxcomp_OBJECTS) clean: rm -f *.o $(LIBRARIES) +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ $(libmtxcommon_SOURCES) $(libmtxebmlcommon_SOURCES) \ diff --git a/src/input/Makefile.mingw b/src/input/Makefile.mingw index 8a77114ee..e7d422397 100644 --- a/src/input/Makefile.mingw +++ b/src/input/Makefile.mingw @@ -43,6 +43,10 @@ libmtxinput.a: $(libmtxinput_OBJECTS) clean: rm -f *.o $(LIBRARIES) +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ $(libmtxinput_SOURCES) > .depend diff --git a/src/mmg/Makefile.mingw b/src/mmg/Makefile.mingw index 79fba134c..9cf666ace 100644 --- a/src/mmg/Makefile.mingw +++ b/src/mmg/Makefile.mingw @@ -40,6 +40,10 @@ mmg: $(mmg_OBJECTS) $(mmg_DEPENDENCIES) clean: rm -f *.o $(PROGRAMS) +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ $(mmg_SOURCES) > .depend diff --git a/src/output/Makefile.mingw b/src/output/Makefile.mingw index b407a7e41..d531aaa32 100644 --- a/src/output/Makefile.mingw +++ b/src/output/Makefile.mingw @@ -39,6 +39,10 @@ libmtxoutput.a: $(libmtxoutput_OBJECTS) clean: rm -f *.o $(LIBRARIES) +Makefile: Makefile.mingw + @echo Re-copying Makefile from Makefile.mingw + sed "s/-f Makefile\.mingw//g" < $< > $@ + depend: $(CXX) $(CXXFLAGS) $(INCLUDES) $(SYSTEM_INCLUDES) -MM \ $(libmtxoutput_SOURCES) > .depend