[FFmpeg-devel] [PATCH] Non-recursive makefiles
Sat Mar 29 00:32:11 CET 2008
Balatoni Denes <dbalatoni at interware.hu> writes:
> Friday 28 March 2008 19:19-kor M?ns Rullg?rd ezt ?rta:
>> Balatoni Denes wrote:
>> > Hi!
>> > Maybe I misunderstand something, but ...
>> > Friday 28 March 2008 03:02-kor M?ns Rullg?rd ezt ?rta:
>> >> +$(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
>> >> + $(LN_S) $(SLIBNAME_WITH_MAJOR) $$@
>> > if I am not mistaken, things like this won't work, when this rule is
>> > included several times in the toplevel Makefile, because only the last
>> > value of $(NAME) at the end of parsing the makefile - and hence
>> > $(SLIBNAME_WITH_MAJOR) - will be used in the command -- and not the value
>> > of $(NAME) and $(SLIBNAME_WITH_MAJOR) at the time of parsing the
>> > rule&command.
>> Why don't you try it out? It works.
> Okay, so it indeed works. I have a question though - maybe you can answer it,
> because I can't quite figure out the reason. So if you apply the attached
> patch than the symlinking will fail the way I described. So why does it
> happen with this - supposedly harmless (although pointless) - patch, but not
> diff -Naur ffmpeg/subdir.mak ffmpeg2/subdir.mak
> --- ffmpeg/subdir.mak 2008-03-29 00:22:40.000000000 +0100
> +++ ffmpeg2/subdir.mak 2008-03-29 00:23:01.000000000 +0100
> @@ -19,8 +19,9 @@
> define RULES
> ifeq ($(BUILD_SHARED),yes)
> $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
> - cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
> + cd ./$(SUBDIR) && $(LN_S) $(BREAK) $(SLIBNAME)
Hmm, good question. How does it fail? Does it make a difference if
you use BREAK:=$(SLIBNAME_WITH_MAJOR) instead (note the colon)?
mans at mansr.com
More information about the ffmpeg-devel