Reputation: 14943
In Makefile.in
I see variable definition where an external variable name is enclosed between two @
symbols
# @configure_input@
package = @PACKAGE_NAME@
Where those external variables come from? Also, I couldn't find in GNU manual what does exactly enclosing a variable between two @
symbols mean? Is it something specific to Makefile.in?
Thank you.
Upvotes: 12
Views: 2767
Reputation: 18667
It's an autoconf thing.
When ./configure
finishes running, it generates and executes a file called config.status
, which is a shell script that has the final value of the variable substitutions (anything declared with AC_SUBST
).
Anything that is declared in AC_CONFIG_FILES
is processed by config.status
, usually by turning foo.in
into foo
.
When automake processes Makefile.am
into Makefile.in
, any AC_SUBST
variable is automatically made available (using a declaration like FOO = @FOO@
), unless it's suppressed by a call to AM_SUBST_NOTMAKE
.
Upvotes: 11
Reputation: 3349
(I am not an expert, but) Yes they are specific to Makefile.in, and configure
replaces them when assembling the Makefile
, see the Autoconf Manual, section 4.8. For example, @PACKAGE_NAME@
is defined by AC_INIT.
Upvotes: 5