Alexander Mai wrote:
>
> On Wed, Dec 20, 2000 at 10:57:35AM +0100, Ralf Corsepius wrote:
> > Ti Kan wrote:
> >
> >
> > > 1. Using UnixWare's 'make' command instead of GNU make, I now get this
> > > error:
> > >
> > > --------------------
> > > $ make
> > > UX:make: WARNING: No suffix list.
> > > Making all in include
> > > UX:make: ERROR: Must be a separator on rules line 359 (bu39).
> > > *** Error code 1 (bu21)
> > > UX:make: ERROR: fatal error.
> > > --------------------
> > >
> > > Looking in include/Makefile, these are the offending lines near
> > > the end of the file:
> > >
> > > --------------------
> > > SUBDIRS += Motif-2.0
> > > # SUBDIRS += Motif-2.1
> > > --------------------
> > >
> > > I think the += operator is a GNU make extension that is not universally
> > > supported by all 'make' programs.
> >
> > The actual cause is this fragment from include/Makefile.am, which
> > miss-uses automake conditionals (Rsp. trips a weakness of automake,
> > depending on your POV).
> >
> > SUBDIRS = Motif-1.2
> > if Version_2_0
> > SUBDIRS += Motif-2.0
> > endif
> > if Version_2_1
> > SUBDIRS += Motif-2.1
> > endif
> >
> > With gnumake this remains functional, because then SUBDIRS += .. is
> > functional, with makes not supporting += this will fail.
> >
> > A portable solution would be to apply something similar to this:
> >
> > if Version_2_0
> > MOTIF20 = Motif-2.0
> > endif
> > if Version_2_1
> > MOTIF21 = Motif-2.1
> > endif
> >
> > SUBDIRS = Motif-1.2 $(MOTIF20) $(MOTIF21)
> >
> > Ralf
>
> See my other mail WRT this topic. Your snippet did not work for me - I got an
> auto* error.
An include/Makefile.am containing this:
if Version_2_1
M21SUBDIRS = Motif-2.1
endif
if Version_2_0
M20SUBDIRS = Motif-2.0
endif
SUBDIRS = Motif-1.2 $(M20SUBDIRS) $(M21SUBDIRS)
Produces this in Makefile.in w/ automake-1.4:
@Version_2_1_TRUE@M21SUBDIRS = Motif-2.1
@Version_2_0_TRUE@M20SUBDIRS = Motif-2.0
SUBDIRS = Motif-1.2 $(M20SUBDIRS) $(M21SUBDIRS)
With the latest cvs-automake beta version this is generated:
@Version_2_1_TRUE@M21SUBDIRS = @[EMAIL PROTECTED]
@Version_2_0_TRUE@M20SUBDIRS = @[EMAIL PROTECTED]
SUBDIRS = Motif-1.2 $(M20SUBDIRS) $(M21SUBDIRS)
I don't get any warning nor error when running CVSMake or automake
manually. I also don't see why this should not work on any OS.
> But I finally check in something which seems to work, though
> it looks not very nice:
Your solution from include/Makefile.am on CVS uses this:
SUBDIRS = Motif-1.2
if Version_2_1
SUBDIRS = Motif-1.2 Motif-2.0 Motif-2.1
else
if Version_2_0
SUBDIRS = Motif-1.2 Motif-2.0
else
SUBDIRS = Motif-1.2
endif
endif
And results into this in Makefile.in:
@Version_2_1_TRUE@ SUBDIRS = Motif-1.2 Motif-2.0 Motif-2.1
@Version_2_1_FALSE@@Version_2_0_TRUE@ SUBDIRS = Motif-1.2
Motif-2.0
@Version_2_1_FALSE@@Version_2_0_FALSE@ SUBDIRS = Motif-1.2
I am wondering why automake doesn't catch you defining a make
variable both conditionally and unconditionally.
Ralf
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung
(FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:[EMAIL PROTECTED] FAX: +49/731/501-999
http://www.faw.uni-ulm.de