This is the mail archive of the automake-prs@sourceware.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]
Other format: [Raw text]

Re: automake/511: ./config.status in generated makefile conflicts with AM_MAKEFLAGS=-f alternativemakefilename


The following reply was made to PR automake/511; it has been noted by GNATS.

From: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
To: Claudio Fontana <sick_soul@yahoo.it>
Cc: automake-gnats@sources.redhat.com
Subject: Re: automake/511: ./config.status in generated makefile conflicts with AM_MAKEFLAGS=-f alternativemakefilename
Date: Sat, 28 Oct 2006 12:10:51 +0200

 Hello Claudio,
 
 * sick_soul@yahoo.it wrote on Sat, Oct 28, 2006 at 04:01:01AM CEST:
 > 
 > For my module in a much bigger system, I am trying to make the
 > autotools interoperate with the existing buildsystem. Long story
 > short, I need to use custom makefile names, to avoid conflicts with
 > clearmake -C gnu, which also reads GNUmakefile (and screws up things a
 > lot).  Thus, I am using gmakefile.am files, and have
 > AM_MAKEFLAGS = -f gmakefile in all such files.
 > 
 > This seems to work well, until I need to regenerate the gmakefile, for
 > example because gmakefile.am has been tweaked. ./config.status is run
 > with the '-f gmakefile' parameter, which causes it to fail:
 > 
 > $ gmake -f gmakefile
 >  cd . && /bin/bash ./config.status gmakefile 
 > config.status: error: invalid argument: gmakefile
 > gmake: *** [gmakefile] Error 1
 
 I cannot reproduce this.  Did you maybe forget to put gmakefile in
 AC_CONFIG_FILES?  Could you modify this example package so that it
 exposes the error you are seeing?
 
 Thanks,
 Ralf
 
 mkdir sub
 : > foo
 : > sub/bar
 cat >configure.ac <<\EOF
 AC_INIT(g,1,b)
 AM_INIT_AUTOMAKE(foreign)
 AC_CONFIG_FILES(gmakefile sub/gmakefile)
 AC_OUTPUT
 EOF
 cat >gmakefile.am <<\EOF
 AM_MAKEFLAGS = -f gmakefile
 bin_SCRIPTS = foo
 SUBDIRS = sub
 EOF
 cat >sub/gmakefile.am <<\EOF
 AM_MAKEFLAGS = -f gmakefile
 bin_SCRIPTS = bar
 EOF
 autoreconf -v -i
 ./configure
 gmake -f gmakefile
 touch sub/gmakefile.in          # trigger single-file rebuild
 gmake -f gmakefile
 touch aclocal.m4                # trigger full rebuild
 gmake -f gmakefile


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