Reputation: 1003
In configure.ac, I have:
AC_SUBST([with_dir2],[dir2])
In some Makefile.am, I have:
SUBDIRS = @with_dir2@
which seems to work.
But using
SUBDIRS = dir1/@with_dir2@/dir3
does not work (the string @with_dir2@ goes straight in the makefile without any substitution)... why? and what is the workaround :-) ...
Upvotes: 1
Views: 1270
Reputation: 22519
Automake automatically emits all AC_SUBST
variables as Makefile
variables as well. So you can rewrite that to:
SUBDIRS = dir1/$(with_dir2)/dir3
I always preferred this approach anyhow because it is nicer for debugging -- you can override the variable on the make
command line for testing.
Upvotes: 1