On Saturday, 30 August 2008 at 19:19, Dan Nicholson wrote:
> On Sat, Aug 30, 2008 at 10:03 AM, Dominik 'Rathann' Mierzejewski
> <[EMAIL PROTECTED]> wrote:
> > On Saturday, 30 August 2008 at 17:30, Dan Nicholson wrote:
> >> On Sat, Aug 30, 2008 at 7:05 AM, Dominik 'Rathann' Mierzejewski
> >> <[EMAIL PROTECTED]> wrote:
> >> > I'm experiencing a problem with make -j2:
> > [...]
> >> > But I'd rather have a proper fix instead of workarounds.
> >> > Ideas?
> >>
> >> You really don't want to have a target dependent on a directory
> >> because make will always think the target is out of date.
> >
> > On second thought, why? If it's created by that rule, it should behave
> > just like any other file.
> >
> >> That prevents doing the right thing:
> >>
> >> $(OBJS) $(DVDREAD_OBJS) $(SHOBJS) $(DVDREAD_SHOBJS): $(.OBJDIR)
> >
> > Actually this seems to work fine.
>
> Run `make' again. Because the timestamp of the directory doesn't get
> updated, make will always think the directory is out of date. This
> leads to everything always been rebuilt. If that's something you can
> deal with, then this is the way to go.
Ah, I see what you mean. It wouldn't be a problem for one-time builds,
but it's not acceptable in general.
How about we drop this obj dir creation alltogether and just keep an
empty dir in the sources?
Patch attached (along with svn mkdir obj).
Regards,
R.
--
Fedora http://fedoraproject.org/wiki/User:Rathann
Livna http://rpm.livna.org | MPlayer http://mplayerhq.hu
"Faith manages."
-- Delenn to Lennier in Babylon 5:"Confessions and Lamentations"
Index: Makefile
===================================================================
--- Makefile (revision 1122)
+++ Makefile (working copy)
@@ -75,14 +75,11 @@
# 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)
@@ -126,14 +123,15 @@
# Clean targets
clean:
- rm -rf *~ $(.OBJDIR) version.h
+ rm -rf *~ $(.OBJDIR)/* version.h
distclean: clean
find . -name "*~" | xargs rm -rf
rm -rf config.mak
-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
@@ -154,7 +152,7 @@
-e 's,@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
_______________________________________________
DVDnav-discuss mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/dvdnav-discuss