[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to specify 2 stage build in Makefile.am
From: |
Duncan Gibson |
Subject: |
Re: How to specify 2 stage build in Makefile.am |
Date: |
Mon, 28 Oct 2002 16:29:38 +0100 |
Apologies for not replying sooner, but I've been away for a week.
Duncan Gibson wrote:
DG> bin_PROGRAMS = CubeView
DG>
DG> CubeView_SOURCES = \
DG> CubeMain.cxx \
DG> CubeView.cxx CubeView.h \
DG> CubeViewUI.fl
DG>
DG> SUFFIXES = .cxx .h .fl
DG>
DG> .fl.cxx .fl.h:
DG> fluid -c $<
Alexandre Duret-Lutz replied:
AD> Automake won't understand this (looks like a bug to me). That's
AD> why you later had to add
AD> nodist_CubeView_SOURCES = CubeViewUI.cxx CubeViewUI.h
AD> If you rewrite your implicit rules as
AD> .fl.cxx:
AD> fluid -c $<
AD> .fl.h:
AD> fluid -c $<
AD> Automake should be able to figure that CubeViewUI.fl can be
AD> transformed into CubeViewUI.cxx which in turn needs to be compiled,
AD> without the help of a nodist_CubeView_SOURCES variable. (You don't
AD> even need to define SUFFIXES if you do that.)
Thanks, that works. It's not obvious (or necessarily documented) that
some common 'make' constructions don't convert directly to 'automake'.
DG> Now 'make' still fails when it tries to build
DG> CubeMain.o because it wants to #include CubeViewUI.h
DG> which has not yet been built. However, if I say 'make
DG> CubeViewUI.cxx' then 'fluid -c CubeViewUI.fl' is called
DG> as expected.
AD> The simplest answer is
AD> BUILT_SOURCES = CubeViewUI.h
AD> this will cause CubeViewUI.h to be built before anything else.
I was hunting through the documentation trying to find something like
this, but I obviously missed it. I will try to incorporate it during
the next round of changes.
Cheers
Duncan