[syslinux] lua: Modernize the Makefile

Jim Cromie jim.cromie at gmail.com
Mon Jul 12 23:50:42 PDT 2010


On Fri, Jul 9, 2010 at 3:43 AM, Geert Stappers <stappers at stappers.nl> wrote:
> Op 20100702 om 11:50 schreef H. Peter Anvin:
>> On 07/02/2010 11:38 AM, Geert Stappers wrote:
>> > Op 20100702 om 11:21 schreef syslinux-bot for H. Peter Anvin:
>> >>
>> >> lua: Modernize the Makefile
>> >       <bigsnip/>
>> >> -liblua.a: $(LIBLUA_OBJS)
>> >> +$(LIBLUA) : $(LIBLUA_OBJS)
>> >> +  rm -f $@
>> >>    $(AR) cq $@ $^
>> >>    $(RANLIB) $@
>> >
>> > FWIW: Today I also found that missing `rm -f $@`
>> >
>>
>> It's a common problem; a lot of people don't even know that "ar" was
>> designed as a file archive, not as a library manager.
>
>
> For me it did mean that when I updated dmi.o
> I did NOT get my changes in lua.c32.
>
> What I understand from it, is that my new dmi.o was added to a liblua.a
> that had allready a dmi.o. The linker choose a previous dmi.o and ignored
> the new one ...
>
> With the `rm -f $@` I had dmi working in lua.c32.
> I had it probably working a longer time, but didn't see it due the
> "build error".


It appears your ar options are the reason why you had to delete
the archive

       q   Quick append; Historically, add the files member... to the
end of archive, without checking
           for replacement.

  r   Insert the files member... into archive (with replacement). This
operation differs from q in
           that any previously existing members are deleted if their
names match those being added.

also
Running ar s on an archive is equivalent to running ranlib on it.

I dunno if this is a gnu extension, ranlib should work anyway.

>
> My 'FIXME' warning in com32/lua/src/dmi.c is no longer needed.
> Patch attached.
>
>
> Stappers
>
>
> _______________________________________________
> Syslinux mailing list
> Submissions to Syslinux at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>
>




More information about the Syslinux mailing list