Re: gmake help with removing duplicate files

Jonathan <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization http://groups.google.com
Message-ID <[email protected]>
Ralf,

Thanks for you response.  Unfortunately, your suggestion is does not
work.

> > 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

> > LIST1 := file1.o file2.o file3.o
> > LIST2 := path/file3.o path/file4.o path/file5.o
> >
> > Desired result of:
> >
> > LIST := file1.o file2.o file3.o path/file4.o path/file5.o
>
> 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.