This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help with complex build


>>>>> ">" == othman  <othman@cs.wustl.edu> writes:

>> 	IDL_SRCS = ImplRepo  ...etc...

>> 	IDL_FILES = \
>> 		$(addsuffix S, $(IDL_SRCS)) \
>> 		$(addsuffix C, $(IDL_SRCS))

It's a little known fact that automake supports make's $(foo:a=b)
syntax.  This is due to poor documentation :-(

Automake also supports suffix rules in a limited sense.  Combine these
and I think it is possible to do what you want.

Unfortunately you can't write a suffix rule to generate "fooX.cpp"
from "foo.idl", or you'd be all set with something like this:

    IDL = ImplRepoS.idl ...
    libwhatever_SOURCES = $(IDL:.idl=S.cpp) $(IDL:.idl=C.cpp)

    SUFFIXES = .idl

    <suffix rule>:
	.. whatever ..


You could try to introduce some sort of hack to get around this, but
that might be hard.

Maybe renaming the IDL compiler output is your best bet.

>> Also, some of the sources are found in subdirectories (e.g.
>> Naming/NamingContext).  What is a good strategy to compile the
>> sources in the subdirectories without having to resort to using
>> VPATHs?

I think this is prohibited in 1.4, but I don't remember.

In the cvs repo, you can do this, but the code is largely untested.
If your objects have unique basenames, you can just list them and they
will be built in the current directory.  If you want the objects to
end up in the appropriate subdir, you must putu "subdir-objects" in
AUTOMAKE_OPTIONS.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]