Dear John,

John Graham-Cumming wrote:

Specifically this happens in your case 1 (in the current directory) which you can get around by using $(CURDIR):

    bar: -lfoo ; touch $@
    $(CURDIR)/libfoo.so: ; touch $@
    vpath lib%.so $(CURDIR)

Thank you very much. It's a bright idea. It seems it can help with another my problem too:

Maxim Nikulin wrote:
3. Let's consider deep complicated recursive build (I wouldn't argue
about non-recursive approach and its advantages). Every package install
headers and libraries into intermediate directories so they are
available for other packages. I tried to speed up rebuilding by
minimizing of copy operations. The aim is not to copy a file in the
intermediate directory if it's not outdated. The rule

/intermediate/dir/libfoo.so: libfoo.so
    $(INSTALL) $< $@

leads to complains on circular dependence if /intermediate/dir is in vpath.
(To clarify I should add 'if libfoo.so isn't built yet')

If the absolute path is specified before libfoo.so the problem disappears. However real life is more complicated. I have to invoke alien makefiles during the build. They don't know about intermediate installation so I use 'cp --preserve=timestamps' as INSTALL. In case of such INSTALL in my rules make sometimes decides that it should reinstall file although it hasn't been updated. I think it's due Linux Virtual File System has subsecond precision of timestamps, but ext3 file system stores second only.

--
Maxim Nikulin


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to