[DVDnav-discuss] r1131 - in trunk: libdvdnav/Makefile libdvdnav/configure2 libdvdread/Makefile libdvdread/configure2

rathann subversion at mplayerhq.hu
Sun Aug 31 11:27:38 CEST 2008


Author: rathann
Date: Sun Aug 31 11:27:37 2008
New Revision: 1131

Log:
Fix parallel make builds and set proper dependencies
on generated files.


Modified:
   trunk/libdvdnav/Makefile
   trunk/libdvdnav/configure2
   trunk/libdvdread/Makefile
   trunk/libdvdread/configure2

Modified: trunk/libdvdnav/Makefile
==============================================================================
--- trunk/libdvdnav/Makefile	(original)
+++ trunk/libdvdnav/Makefile	Sun Aug 31 11:27:37 2008
@@ -63,14 +63,11 @@ $(SRCS): version.h
 
 # General targets
 
-$(.OBJDIR):
-	mkdir $(.OBJDIR)
-
-${LIB}: version.h $(.OBJDIR) $(OBJS) $(BUILDDEPS)
+${LIB}: version.h $(OBJS) $(BUILDDEPS)
 	cd $(.OBJDIR) && $(AR) rc $@ $(OBJS)
 	cd $(.OBJDIR) && $(RANLIB) $@
 
-${SHLIB}: version.h $(.OBJDIR) $(SHOBJS) $(BUILDDEPS)
+${SHLIB}: version.h $(SHOBJS) $(BUILDDEPS)
 	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -Wl,-soname=$(SHLIB).$(SHLIB_MAJOR) -o $@ $(SHOBJS) $(DVDREAD_LIBS) $(THREADLIB)
 ${MINI_SHLIB}: version.h $(.OBJDIR) $(SHOBJS) $(BUILDDEPS)
 	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) -Wl,-soname=$(MINI_SHLIB).$(SHLIB_MAJOR) -o $@ $(SHOBJS) $(THREADLIB)
@@ -115,7 +112,7 @@ install-static: $(LIB)
 # Clean targets
 
 clean:
-	rm -rf  *~ $(.OBJDIR) version.h
+	rm -rf  *~ $(.OBJDIR)/* version.h
 
 pcedit = sed \
 	-e 's, at prefix@,$(PREFIX),' \
@@ -128,9 +125,9 @@ pcedit = sed \
 	-e 's, at DVDREAD_CFLAGS@,$(DVDREAD_CFLAGS),'
 
 pkgconfig: $(.OBJDIR)/dvdnav.pc $(.OBJDIR)/dvdnavmini.pc
-$(.OBJDIR)/dvdnav.pc: misc/dvdnav.pc.in $(.OBJDIR)
+$(.OBJDIR)/dvdnav.pc: misc/dvdnav.pc.in $(BUILDDEPS)
 	$(pcedit) $< > $@
-$(.OBJDIR)/dvdnavmini.pc: misc/dvdnavmini.pc.in $(.OBJDIR)
+$(.OBJDIR)/dvdnavmini.pc: misc/dvdnavmini.pc.in $(BUILDDEPS)
 	$(pcedit) $< > $@
 
 install-pkgconfig: $(.OBJDIR)/dvdnav.pc $(.OBJDIR)/dvdnavmini.pc
@@ -141,9 +138,10 @@ install-pkgconfig: $(.OBJDIR)/dvdnav.pc 
 
 distclean: clean
 	find . -name "*~" | xargs rm -rf
-	rm -rf config.mak
+	rm -rf config.mak $(.OBJDIR)
 
-dvdnav-config: $(.OBJDIR)
+dvdnav-config: $(.OBJDIR)/dvdnav-config
+$(.OBJDIR)/dvdnav-config: $(BUILDDEPS)
 	@echo '#!/bin/sh' > $(.OBJDIR)/dvdnav-config
 	@echo 'prefix='$(PREFIX) >> $(.OBJDIR)/dvdnav-config
 	@echo 'libdir='$(shlibdir) >> $(.OBJDIR)/dvdnav-config

Modified: trunk/libdvdnav/configure2
==============================================================================
--- trunk/libdvdnav/configure2	(original)
+++ trunk/libdvdnav/configure2	Sun Aug 31 11:27:37 2008
@@ -165,6 +165,8 @@ if test "$source_path_used" != "no"; the
     done
 fi
 
+[ -d obj ] || mkdir -p obj
+
 echo
 echo "Done, type 'make install' to build and install"
 

Modified: trunk/libdvdread/Makefile
==============================================================================
--- trunk/libdvdread/Makefile	(original)
+++ trunk/libdvdread/Makefile	Sun Aug 31 11:27:37 2008
@@ -73,14 +73,11 @@ $(SRCS) $(DVDREAD_SRCS): version.h
 
 # General targets
 
-$(.OBJDIR):
-	mkdir $(.OBJDIR)
-
-${DVDREAD_LIB}: version.h $(.OBJDIR) $(DVDREAD_OBJS) $(BUILDDEPS)
+${DVDREAD_LIB}: version.h $(DVDREAD_OBJS) $(BUILDDEPS)
 	cd $(.OBJDIR) && $(AR) rc $@ $(DVDREAD_OBJS)
 	cd $(.OBJDIR) && $(RANLIB) $@
 
-${DVDREAD_SHLIB}: version.h $(.OBJDIR) $(DVDREAD_SHOBJS) $(BUILDDEPS)
+${DVDREAD_SHLIB}: version.h $(DVDREAD_SHOBJS) $(BUILDDEPS)
 	cd $(.OBJDIR) && $(CC) $(SHLDFLAGS) $(LDFLAGS) -ldl -Wl,-soname=$(DVDREAD_SHLIB).$(SHLIB_MAJOR) -o $@ $(DVDREAD_SHOBJS)
 
 .c.so:	$(BUILDDEPS)
@@ -124,14 +121,15 @@ install-static: $(LIB)
 # Clean targets
 
 clean:
-	rm -rf  *~ $(.OBJDIR) version.h
+	rm -rf  *~ $(.OBJDIR)/* version.h
 
 
 distclean: clean
 	find . -name "*~" | xargs rm -rf
-	rm -rf config.mak
+	rm -rf config.mak $(.OBJDIR)
 
-dvdread-config: $(.OBJDIR)
+dvdread-config: $(.OBJDIR)/dvdread-config
+$(.OBJDIR)/dvdread-config: $(BUILDDEPS)
 	@echo '#!/bin/sh' > $(.OBJDIR)/dvdread-config
 	@echo 'prefix='$(PREFIX) >> $(.OBJDIR)/dvdread-config
 	@echo 'libdir='$(shlibdir) >> $(.OBJDIR)/dvdread-config
@@ -152,7 +150,7 @@ pcedit = sed \
 	-e 's, at VERSION@,$(SHLIB_VERSION),'
 
 pkgconfig: $(.OBJDIR)/dvdread.pc
-$(.OBJDIR)/dvdread.pc: misc/dvdread.pc.in $(.OBJDIR)
+$(.OBJDIR)/dvdread.pc: misc/dvdread.pc.in $(BUILDDEPS)
 	$(pcedit) $< > $@
 
 install-pkgconfig: $(.OBJDIR)/dvdread.pc

Modified: trunk/libdvdread/configure2
==============================================================================
--- trunk/libdvdread/configure2	(original)
+++ trunk/libdvdread/configure2	Sun Aug 31 11:27:37 2008
@@ -148,6 +148,8 @@ if test "$source_path_used" != "no"; the
     done
 fi
 
+[ -d obj ] || mkdir -p obj
+
 echo
 echo "Done, type 'make install' to build and install"
 



More information about the DVDnav-discuss mailing list