[Top][All Lists]

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

GNU make 3.79.1, bug(?)

From: Carlo Wood
Subject: GNU make 3.79.1, bug(?)
Date: Mon, 12 May 2003 16:52:16 +0200
User-agent: Mutt/1.4.1i

Having the following targets:

tst_%_static.o: libcwd.tst/%.cc Makefile $(top_builddir)/include/libcwd/*.h
        $(CXXCOMPILE) -DSTATIC -c $< -o $@

tst_%.o: libcwd.tst/%.cc Makefile $(top_builddir)/include/libcwd/*.h
        $(CXXCOMPILE) -c $< -o $@

tst_dlopen_static: tst_dlopen_static.o $(top_builddir)/.libs/libcwd.a
        $(CXXLINK) $< -o $@ $(STATICLIBS)

tst_%_static: tst_%.o $(top_builddir)/.libs/libcwd.a
        $(CXXLINK) $< -o $@ $(STATICLIBS)

Typing 'make tst_dlopen_static' works as expected (uses -DSTATIC),
but typing 'make /home/carlo/c++/libcwd/testsuite/tst_dlopen_static'
in the same directory (/home/carlo/c++/libcwd/testsuite) results
in using tst_%_static: as target, and thus compiles without

I fail to see the rationale behind that - I think that make should
not be influenced by a path that may or not may be prepended to a
target if that target is a file.  In both cases it is the same file,
and thus the same target, and thus the same rules should apply.


Carlo Wood <address@hidden>

reply via email to

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