[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automatic linking links too many files

From: Federico Poloni
Subject: Re: automatic linking links too many files
Date: Mon, 25 May 2009 14:56:43 +0200
User-agent: Thunderbird (X11/20090409)

James Coleman wrote:
The intent of the default rule is to make it easy to handle object files or libs I think. So it makes sense that for you the file is assumed to be an object file and is passed to the link line.

For anything other than very simple cases you will make your own rules.

Thanks for the advice. I was not reporting this behavior as erroneous, but warning that it differs significantly from the documentation ("Each kind of file automatically made into `.o' object files will be
automatically linked").

In fact, there is this neat workaround:
-----Makefile contents
$(phony foo):   textfile
executable: $(phony foo)
but that was not my point.

Additional remark:
An executable depending from a text file may actually be needed in real life: e.g. in order to use the Gtk+ component GtkBuilder, the executable must read a `foo.ui' xml file which should be built from a `foo.glade' file.

--federico poloni

reply via email to

[Prev in Thread] Current Thread [Next in Thread]