bug-make
[Top][All Lists]
Advanced

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

Re: Automake: Compiling sources in other directories


From: Dave Brolley
Subject: Re: Automake: Compiling sources in other directories
Date: Fri, 12 Jan 2001 18:04:05 -0500
User-agent: Mozilla/5.0 (Windows; U; Win95; en-US; m18) Gecko/20001108 Netscape6/6.0

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




reply via email to

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