On Thu, May 19, 2011 at 06:45:11PM +0100, Måns Rullgård wrote: > Diego Biurrun <[email protected]> writes: > > > On Thu, May 19, 2011 at 06:33:46PM +0100, Måns Rullgård wrote: > >> Diego Biurrun <[email protected]> writes: > >> > >> > On Thu, May 19, 2011 at 05:39:00PM +0100, Måns Rullgård wrote: > >> >> Diego Biurrun <[email protected]> writes: > >> >> > >> >> > --- a/libavcodec/Makefile > >> >> > +++ b/libavcodec/Makefile > >> >> > @@ -676,14 +676,10 @@ include $(SUBDIR)../subdir.mak > >> >> > > >> >> > -$(SUBDIR)cos_tables.c: $(SUBDIR)cos_tablegen$(HOSTEXESUF) > >> >> > - $(M)./$< > $@ > >> >> > - > >> >> > -$(SUBDIR)cos_fixed_tables.c: $(SUBDIR)cos_tablegen$(HOSTEXESUF) > >> >> > - $(M)./$< cos fixed > $@ > >> >> > +$(SUBDIR)%_tables.c: $(SUBDIR)cos_tablegen$(HOSTEXESUF) > >> >> > + $(M)./$< $* > $@ > >> >> > > >> >> > -$(SUBDIR)sin_tables.c: $(SUBDIR)cos_tablegen$(HOSTEXESUF) > >> >> > - $(M)./$< sin > $@ > >> >> > +.SECONDARY: $(SUBDIR)cos_tables.c $(SUBDIR)cos_fixed_tables.c > >> >> > $(SUBDIR)sin_tables.c > >> >> > >> >> Using .SECONDARY is fragile and almost always wrong. In fact, I have > >> >> never yet seen a case where using it did the right thing. Thus I am > >> >> highly sceptical to this patch. > >> > > >> > It has always worked fine for me > >> > >> But you don't know why. Never do things you do not understand why they > >> appear to work. > > > > I have read and understood the GNU Make manual, thanks for asking. > > It doesn't seem that way.
Well, you are wrong - I read it cover to cover. > For example, you were unaware of the changes in GNU make 3.82. I read the manual for 3.81. 3.82 is recent and I had no time to study it sufficiently. No distro I use regularly has picked it up yet, so I saw no need for hurry. You know that GNU Make releases happen once or twice per decade and take some time to trickle down into standard toolchains. > >> > - what do you suggest instead .PRECIOUS? > >> > >> That one has the same issues. I've never managed to get it behaving > >> consistently. > > > > So what were the problems you encountered? I never had issues. > > "Intermediate" files being randomly deleted, same files not always being > rebuilt when they should etc, etc. It is much better to write makefiles > such that no files are considered "intermediate" and subjected to > bizarre rules. I'm not a fan of .SECONDARY or .PRECIOUS myself (there's no way to specify patterns for them for example), but I found them to work as advertised. Diego _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
