{
# Set location of depcomp.
&define_variable ('depcomp',
- "\$(SHELL) $am_config_aux_dir/depcomp",
+ '$(SHELL) $(am__config_aux_dir)/depcomp',
INTERNAL);
require_conf_file ("$am_file.am", FOREIGN, 'depcomp');
my $conf_dir;
if ($config_aux_dir_set_in_configure_ac)
{
- $conf_dir = "$am_config_aux_dir/";
+ $conf_dir = '$(am__config_aux_dir)/';
}
else
{
}
elsif ($config_aux_dir_set_in_configure_ac)
{
- $texinfodir = $am_config_aux_dir;
+ $texinfodir = '$(am__config_aux_dir)';
define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL);
$need_texi_file = 2; # so that we require_conf_file later
}
{
require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
define_variable ("${pfx}LOG_DRIVER",
- "\$(SHELL) $am_config_aux_dir/test-driver",
+ '$(SHELL) $(am__config_aux_dir)/test-driver',
INTERNAL);
}
# Required to avoid spurious errors like:
require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE,
'EMACS', 'lispdir');
require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp');
- &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL);
+ &define_variable ('elisp_comp', '$(am__config_aux_dir)/elisp-comp', INTERNAL);
}
# Handle Python
require_variables ($pyfiles[0][0], "Python sources seen", TRUE, 'PYTHON');
require_conf_file ($pyfiles[0][0], FOREIGN, 'py-compile');
- &define_variable ('py_compile', "$am_config_aux_dir/py-compile", INTERNAL);
+ &define_variable ('py_compile', '$(am__config_aux_dir)/py-compile', INTERNAL);
}
# Handle Java.
# FIXME: for now, no line number.
require_conf_file ($configure_ac, FOREIGN, 'ylwrap');
- &define_variable ('YLWRAP', "$am_config_aux_dir/ylwrap", INTERNAL);
+ &define_variable ('YLWRAP', '$(am__config_aux_dir)/ylwrap', INTERNAL);
}
sub lang_yacc_finish
# of $am_config_aux_dir here is deliberate and necessary.
elsif ($dir eq $config_aux_dir)
{
- push_dist_common ("$am_config_aux_dir/$file");
+ push_dist_common ('$(am__config_aux_dir)/' . $file);
}
# FIXME: another spacial case, for AC_LIBOBJ/AC_LIBSOURCE support.
# We probably need some refactoring of this function and its callers,
# Must do this after reading .am file.
define_variable ('subdir', $relative_dir, INTERNAL);
+ define_variable ('am__config_aux_dir', $am_config_aux_dir, INTERNAL);
# If DIST_SUBDIRS is defined, make sure SUBDIRS is, so that
# recursive rules are enabled.
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
+AC_PROG_FGREP
AC_OUTPUT
END
rm -f depcomp
mkdir subdir
-: > subdir/Makefile.am
+cat > subdir/Makefile.am << 'END'
+.PHONY: test-distcommon
+test-distcommon:
+ echo ' ' $(am__dist_common) ' ' | $(FGREP) ' $(top_srcdir)/depcomp '
+END
$ACLOCAL
$AUTOCONF
$AUTOMAKE
test ! -f depcomp
-cat > subdir/Makefile.am << 'END'
+cat >> subdir/Makefile.am << 'END'
bin_PROGRAMS = foo
END
$AUTOMAKE -a subdir/Makefile
test -f depcomp
-
-# FIXME: the logic of this check and other similar ones in other
-# FIXME: 'distcom*.test' files should be factored out in a common
-# FIXME: subroutine in 'defs'...
-sed -n -e "
- /^am__dist_common =.*\\\\$/ {
- :loop
- p
- n
- t clear
- :clear
- s/\\\\$/\\\\/
- t loop
- s/$/ /
- s/[$tab ][$tab ]*/ /g
- p
- n
- }" subdir/Makefile.in > dc.txt
-cat dc.txt
-$FGREP ' $(top_srcdir)/depcomp ' dc.txt
-
./configure
+(cd subdir && $MAKE test-distcommon)
$MAKE distdir
test -f $distdir/depcomp
cat dc.txt # For debugging.
cat subdir/dc.txt # Likewise.
- $FGREP ' $(top_srcdir)/depcomp ' subdir/dc.txt
- # The 'compile' script will be listed in the am__dist_common of the top-level
- # Makefile because it's required in configure.ac (by AM_PROG_CC_C_O).
- $FGREP ' $(top_srcdir)/compile ' dc.txt || $FGREP ' compile ' dc.txt
+ $FGREP ' $(am__config_aux_dir)/depcomp ' subdir/dc.txt
+ # The 'compile' script will be listed in the am__dist_common of
+ # the top-level Makefile because it's required in configure.ac
+ # (by AM_PROG_CC_C_O).
+ $FGREP ' $(am__config_aux_dir)/compile ' dc.txt \
+ || $FGREP ' compile ' dc.txt
done