Hi,
One of the reasons I tried automake 1.4b was to see if the support for
compiling sources from other directories had been included. I was
delighted to see that some work has been done in this area. Using my
previous example, the directory structure is something like:
src/main -- most of the source files are here
src/host -- a few host-specific source files here
In src/main, I have a Makefile.am containing something like this:
lib_LTLIBRARIES = libfred.la
libfred_la_SOURCES = src1.cpp src2.cpp ../host/h1.cpp
automake now correctly generates:
am_libfred_la_OBJECTS = src1.lo src2.lo h1.lo
It also generates:
hl.lo: ../host/h1.cpp
This needed but the problem is that hl.lo does not seem to pick up the
default rule for building specified by
.cpp.lo:
$(LTCXXCOMPILE) -c -o $@ $<
make seems to think that the specification of a dependency for hl.lo
means that there is nothing to do to make it. I verified this using
'make -d'
To work around the problem I have to change the generated dependency to:
h1.lo: ../host/h1.cpp
$(LTCXXCOMPILE) -c -o $@ $<
Is this a make bug, or should automake be generating a rule for making
hl.lo? My version of make is 3.79.1.
Thanks,
Dave