bug#28002: automake prog_error when appending to configure.ac a colon-separated list of input files

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#28002: automake prog_error when appending to configure.ac a colon-separated list of input files

Ghulam, Sean (Nokia - FI/Espoo)
$ automake
automake: error: src/Makefile:append/append.mk in @other_input_files
automake: @other_input_files = (src/Makefile:append/append.mk)
automake: Please contact <[hidden email]>.
 at /usr/share/automake-1.13/Automake/Channels.pm line 662.
        Automake::Channels::msg('automake', '', 'src/Makefile:append/append.mk in @other_input_files\x{a}@other_in...') called at /usr/share/automake-1.13/Automake/ChannelDefs.pm line 212
        Automake::ChannelDefs::prog_error('src/Makefile:append/append.mk in @other_input_files\x{a}@other_in...') called at /bin/automake line 4214
        Automake::handle_configure('Makefile.am', 'Makefile.in', 'Makefile', 'Makefile.in') called at /bin/automake line 7873
        Automake::generate_makefile('Makefile.am', 'Makefile.in') called at /bin/automake line 8189
        Automake::handle_makefile('Makefile.in') called at /bin/automake line 8203
        Automake::handle_makefiles_serial() called at /bin/automake line 8337

Tested versions:  automake-1.13 and automake-1.15

How to reproduce:
Extract /usr/share/doc/automake-1.13.4/amhello-1.0.tar.gz
Create directory amhello-1.0/append
Create file amhello-1.0/append/append.mk
Add any text to amhello-1.0/append/append.mk
Edit configure.ac to include append/append.mk in AC_CONFIG_FILES as follows:

AC_CONFIG_FILES([
 Makefile
 src/Makefile:append/append.mk
])

Documentation:
AC_CONFIG_FILES
You can override an input file name by appending to file a colon-separated list of
input files. Examples:
AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk]
[lib/Makefile:boiler/lib.mk])
Doing this allows you to keep your file names acceptable to DOS variants, or to
prepend and/or append boilerplate to the file.

Best Regards,
Sean



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#28002: automake prog_error when appending to configure.ac a colon-separated list of input files

Hans-Bernhard Bröker
Am 07.08.2017 um 10:10 schrieb Ghulam, Sean (Nokia - FI/Espoo):

> AC_CONFIG_FILES([ >   Makefile>   src/Makefile:append/append.mk> ])
Your bug report might be more convincing if you hadn't got that syntax
wrong.  Compare your example with the documentation example you found,
and particularly note where the []s and are:

> AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk]
> [lib/Makefile:boiler/lib.mk])

Wouldn't you agree that your example should have been

AC_CONFIG_FILES(
   [Makefile]
   [src/Makefile:append/append.mk]
)

?



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#28002: automake prog_error when appending to configure.ac a colon-separated list of input files

Ghulam, Sean (Nokia - FI/Espoo)

Hi,


Prior to writing the report, I tried it with:

AC_INIT([amhello], [1.0], [[hidden email]])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES(
[Makefile]
[src/Makefile:append/append.mk]
)
AC_OUTPUT

I have tried it once again and still receive the same error.

Best Regards,
Sean




From: Hans-Bernhard Bröker <[hidden email]>
Sent: Tuesday, August 8, 2017 2:19 AM
To: Ghulam, Sean (Nokia - FI/Espoo); [hidden email]
Subject: Re: bug#28002: automake prog_error when appending to configure.ac a colon-separated list of input files
 
Am 07.08.2017 um 10:10 schrieb Ghulam, Sean (Nokia - FI/Espoo):

> AC_CONFIG_FILES([ >   Makefile>   src/Makefile:append/append.mk> ])
Your bug report might be more convincing if you hadn't got that syntax
wrong.  Compare your example with the documentation example you found,
and particularly note where the []s and are:

> AC_CONFIG_FILES([Makefile:boiler/top.mk:boiler/bot.mk]
> [lib/Makefile:boiler/lib.mk])

Wouldn't you agree that your example should have been

AC_CONFIG_FILES(
   [Makefile]
   [src/Makefile:append/append.mk]
)

?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#28002: automake prog_error when appending to configure.ac a colon-separated list of input files

Hans-Bernhard Bröker
Am 08.08.2017 um 08:03 schrieb Ghulam, Sean (Nokia - FI/Espoo):

 > Prior to writing the report, I tried it with:
 > AC_CONFIG_FILES(
 > [Makefile]
 > [src/Makefile:append/append.mk]
 > )

On closer examination, the problem is that you've been reading only
autoconf documenation to find out how to prepare input used by both
autoconf and automake.  The correct syntax is actually in the automake
manual:

AC_CONFIG_FILES(
  [Makefile]
  [src/Makefile:src/Makefile.in:append/append.mk]
)

The trick being that for automake to grok multi-part input, you have to
name not just the final output file, but also the intermediate (the one
automake is to build from src/Makefile.am).



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bug#28002: automake prog_error when appending to configure.ac a colon-separated list of input files

Ghulam, Sean (Nokia - FI/Espoo)
In reply to this post by Ghulam, Sean (Nokia - FI/Espoo)

The following goes through:


AC_CONFIG_FILES(
[Makefile]
[src/Makefile:src/Makefile.in:append/append.mk]
)

Thanks

Loading...