* Jonathan wrote on Wed, Feb 20, 2008 at 07:25:12PM CET:
>
> > > I have an interesting filter problem (I
think). I would like to
> > > remove duplicate filenames
> >
> > Why would you need that?
>
> The short answer is the final list is for a linker and
the linker
> complains of multiply defined symbols. The long answer
is that final
> list is constructed from a small set of local objects
and a very large
> set of remote objects to allow a user to link an
application without
> recompile of the entire project (or even ownership of
the entire pr
I think you want to use an archive (a static library) for
your "remote
objects".
> > With GNU make, use $(sort $(LIST1) $(LIST2)).
>
> This will return:
>
> file1.o file2.o file3.o path/file3.o path/file4.o
path/file5.o
>
> which has the duplicates file3.o and path/file3.o. The
sort function
> uses the entire filepath/name string rather than just
the filename.
I'm sure GNU make's functions can be hacked to provide this,
but I don't
think it's worth it, see above.
Cheers,
Ralf
|