From 214c675b9f3d99d938b19129c6b006c0d74d73a1 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 21 Feb 2001 08:35:51 +0000 Subject: [PATCH] * dist-vars.am: Remove, merge into... * distdir.am: this. * automake.in (dirname, basename, backname): Move at the top of the file so that prototypes are checked, Use them without `&'. (&handle_dist): Adjust. --- ChangeLog | 9 ++ Makefile.am | 2 +- Makefile.in | 17 ++-- automake.in | 232 ++++++++++++++++++++------------------------- dist-vars.am | 22 ----- distdir.am | 16 +++- lib/am/Makefile.am | 2 +- lib/am/distdir.am | 16 +++- m4/Makefile.in | 7 +- tests/Makefile.in | 7 +- tests/confh4.test | 4 +- 11 files changed, 160 insertions(+), 174 deletions(-) diff --git a/ChangeLog b/ChangeLog index b28fd3f4..69a637d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2001-02-21 Akim Demaille + + * dist-vars.am: Remove, merge into... + * distdir.am: this. + * automake.in (dirname, basename, backname): Move at the top of + the file so that prototypes are checked, + Use them without `&'. + (&handle_dist): Adjust. + 2001-02-21 Akim Demaille * automake.in (&check_ambiguous_conditional, &read_main_am_file): diff --git a/Makefile.am b/Makefile.am index 669f7b30..fd07f4c0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,7 +12,7 @@ info_TEXINFOS = automake.texi amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \ compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \ -distdir.am dist-vars.am footer.am header-vars.am header.am \ +distdir.am footer.am header-vars.am header.am \ java-clean.am java.am kr-extra.am library.am libs-clean.am libs.am \ libtool.am lisp-clean.am lisp.am ltlib-clean.am ltlib.am ltlibrary.am \ mans-vars.am mans.am multilib.am program.am progs-clean.am progs.am \ diff --git a/Makefile.in b/Makefile.in index ab09d4ac..64413942 100644 --- a/Makefile.in +++ b/Makefile.in @@ -86,7 +86,7 @@ info_TEXINFOS = automake.texi amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \ compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \ -distdir.am dist-vars.am footer.am header-vars.am header.am \ +distdir.am footer.am header-vars.am header.am \ java-clean.am java.am kr-extra.am library.am libs-clean.am libs.am \ libtool.am lisp-clean.am lisp.am ltlib-clean.am ltlib.am ltlibrary.am \ mans-vars.am mans.am multilib.am program.am progs-clean.am progs.am \ @@ -136,9 +136,6 @@ compile config.guess config.sub configure configure.in depcomp \ elisp-comp install-sh mdate-sh missing mkinstalldirs py-compile \ stamp-vti texinfo.tex version.texi ylwrap - -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: @@ -451,9 +448,10 @@ GTAGS: distclean-tags: -rm -f TAGS ID -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +top_distdir = . +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) GZIP_ENV = --best @@ -482,12 +480,15 @@ distdir: $(DISTFILES) || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" \ + distdir=../$(distdir)/$$subdir \ + distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" distdir="$(distdir)" \ + top_distdir="${top_distdir}" distdir="$(distdir)" \ dist-info -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ diff --git a/automake.in b/automake.in index 19931996..22b2c618 100755 --- a/automake.in +++ b/automake.in @@ -448,6 +448,62 @@ sub uniq (@) } +################################################################ + +# $DIRNAME +# &dirname ($FILE) +# ---------------- +# Return directory name of file. +sub dirname ($) +{ + my ($file) = @_; + my $sub; + + ($sub = $file) =~ s,/+[^/]+$,,g; + $sub = '.' if $sub eq $file; + return $sub; +} + + +# $BASENAME +# &basename ($FILE) +# ----------------- +# Return file name of a file. +sub basename ($) +{ + my ($file) = @_; + my $sub; + + ($sub = $file) =~s,^.*/+,,g; + return $sub; +} + + +# $BACKPATH +# &backname ($REL-DIR) +# -------------------- +# If I `cd $REL-DIR', then to come back, I should `cd $BACKPATH'. +# For instance `src/foo' => `../..'. +# Works with non strictly increasing paths, i.e., `src/../lib' => `..'. +sub backname ($) +{ + my ($file) = @_; + my @res; + foreach (split (/\//, $file)) + { + next if $_ eq '.' || $_ eq ''; + if ($_ eq '..') + { + pop @res; + } + else + { + push (@res, '..'); + } + } + return join ('/', @res) || '.'; +} + ################################################################ # Parse command line. @@ -610,8 +666,8 @@ sub generate_makefile ($output, @secondary_inputs) = split (/:/, $output); &initialize_per_input; - $relative_dir = &dirname ($output); - $am_relative_dir = &dirname ($makefile); + $relative_dir = dirname ($output); + $am_relative_dir = dirname ($makefile); # At the toplevel directory, we might need config.guess, config.sub # or libtool scripts (ltconfig and ltmain.sh). @@ -856,11 +912,9 @@ sub get_object_extension if (&variable_defined ('CONFIG_HEADER')) { - local ($one_hdr); - foreach $one_hdr (split (' ', - &variable_value ('CONFIG_HEADER'))) + foreach my $hdr (split (' ', &variable_value ('CONFIG_HEADER'))) { - $default_include .= ' -I' . &dirname ($one_hdr); + $default_include .= ' -I' . dirname ($hdr); } } } @@ -938,12 +992,12 @@ sub get_object_extension } else { - $output_rules .= ("\tcd " . &dirname ($options{'ansi2knr'}) + $output_rules .= ("\tcd " . dirname ($options{'ansi2knr'}) . " && \$(MAKE) \$(AM_MAKEFLAGS) " . "ansi2knr\n\n"); # This is required for non-GNU makes. $output_rules .= ($options{'ansi2knr'} . $objext . ":\n"); - $output_rules .= ("\tcd " . &dirname ($options{'ansi2knr'}) + $output_rules .= ("\tcd " . dirname ($options{'ansi2knr'}) . " && \$(MAKE) \$(AM_MAKEFLAGS)" . " ansi2knr" . $objext . "\n\n"); } @@ -2374,7 +2428,7 @@ sub handle_texinfo # The user defined TEXINFO_TEX so assume he knows what he is # doing. $texinfodir = ('$(srcdir)/' - . &dirname (&variable_value ('TEXINFO_TEX'))); + . dirname (&variable_value ('TEXINFO_TEX'))); } else { @@ -2544,11 +2598,11 @@ sub handle_tags local ($one_hdr); foreach $one_hdr (@config_headers) { - if ($relative_dir eq &dirname ($one_hdr)) + if ($relative_dir eq dirname ($one_hdr)) { # The config header is in this directory. So require it. $config .= ' ' if $config; - $config .= &basename ($one_hdr); + $config .= basename ($one_hdr); } } my $xform = &transform ('CONFIG' => $xform, @@ -2657,7 +2711,7 @@ sub handle_dist { foreach my $iter (keys %configure_dist_common) { - if (! &is_make_dir (&dirname ($iter))) + if (! &is_make_dir (dirname ($iter))) { &push_dist_common ($iter); } @@ -2673,30 +2727,6 @@ sub handle_dist # to set it. $handle_dist_run = 1; - # Some boilerplate. - $output_vars .= &file_contents ('dist-vars') . "\n"; - - # Put these things in rules section so it is easier for whoever - # reads Makefile.in. - if (! &variable_defined ('distdir')) - { - if ($relative_dir eq '.') - { - $output_rules .= "\n" . 'distdir = $(PACKAGE)-$(VERSION)' . "\n"; - } - else - { - $output_rules .= ("\n" - . 'distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)' - . "\n"); - } - } - if ($relative_dir eq '.') - { - $output_rules .= "top_distdir = \$(distdir)\n"; - } - $output_rules .= "\n"; - # Scan EXTRA_DIST to see if we need to distribute anything from a # subdir. If so, add it to the list. I didn't want to do this # originally, but there were so many requests that I finally @@ -2772,9 +2802,7 @@ sub handle_dist &define_pretty_variable ('DIST_SUBDIRS', '', '$(SUBDIRS)'); } - my $top_distdir = ($relative_dir eq '.') ? 'distdir' : 'top_distdir'; - $xform .= &transform ('DIST_SUBDIR_NAME' => $dist_subdir_name, - 'TOP_DISTDIR' => $top_distdir); + $xform .= &transform ('DIST_SUBDIR_NAME' => $dist_subdir_name); } # If the target `dist-hook' exists, make sure it is run. This @@ -2783,14 +2811,19 @@ sub handle_dist push (@dist_targets, 'dist-hook') if &target_defined ('dist-hook'); + my $top_distdir = backname ($relative_dir); + $output_rules .= &file_contents ('distdir', $xform - . &transform ('DIST-TARGETS' => join " ", @dist_targets) + . &transform ('DIST-TARGETS' => join (" ", @dist_targets), + 'TOP_DISTDIR' => $top_distdir) . &transform_cond ('DIST-TARGETS' => scalar @dist_targets, 'SUBDIRS' => - &variable_defined ('SUBDIRS'))); + &variable_defined ('SUBDIRS'), + 'DISTDIR' => + ! &variable_defined ('distdir'))); } @@ -3096,9 +3129,9 @@ sub rewrite_inputs_into_dependencies foreach $single (@inputs) { - if (&dirname ($single) eq $relative_dir) + if (dirname ($single) eq $relative_dir) { - push (@newinputs, &basename ($single)); + push (@newinputs, basename ($single)); } elsif ($add_srcdir) { @@ -3117,14 +3150,14 @@ sub handle_configure local ($top_reldir); - local ($input_base) = &basename ($input); - local ($local_base) = &basename ($local); + my $input_base = basename ($input); + my $local_base = basename ($local); - local ($amfile) = $input_base . '.am'; + my $amfile = $input_base . '.am'; # We know we can always add '.in' because it really should be an # error if the .in was missing originally. - local ($infile) = '$(srcdir)/' . $input_base . '.in'; - local ($colon_infile); + my $infile = '$(srcdir)/' . $input_base . '.in'; + my $colon_infile; if ($local ne $input || @secondary_inputs) { $colon_infile = ':' . $input . '.in'; @@ -3198,7 +3231,7 @@ sub handle_configure local ($one_fullname) = shift (@local_fullnames); local ($one_name) = shift (@local_names); $hdr_index += 1; - local ($header_dir) = &dirname ($one_name); + my $header_dir = dirname ($one_name); # If the header is in the current directory we want to build # the header here. Otherwise, if we're at the topmost @@ -3210,7 +3243,7 @@ sub handle_configure local ($ch_sans_dir, $cn_sans_dir, $stamp_dir); if ($relative_dir eq $header_dir) { - $cn_sans_dir = &basename ($one_name); + $cn_sans_dir = basename ($one_name); $stamp_dir = ''; } else @@ -3229,9 +3262,9 @@ sub handle_configure # Compute relative path from directory holding output # header to directory holding input header. FIXME: # doesn't handle case where we have multiple inputs. - if (&dirname ($one_hdr) eq $relative_dir) + if (dirname ($one_hdr) eq $relative_dir) { - $ch_sans_dir = &basename ($one_hdr); + $ch_sans_dir = basename ($one_hdr); } else { @@ -3271,7 +3304,7 @@ sub handle_configure $stamp_name .= "${hdr_index}" if scalar (@config_headers) > 1; my $xform = ''; - my $out_dir = &dirname ($ch_sans_dir); + my $out_dir = dirname ($ch_sans_dir); $xform = &transform ('CONFIGURE_AC' => $configure_ac, 'FILES' => join (' ', @files), @@ -3321,13 +3354,13 @@ sub handle_configure { # Generate CONFIG_HEADER define. local ($one_hdr); - if ($relative_dir eq &dirname ($one_name)) + if ($relative_dir eq dirname ($one_name)) { - $one_hdr = &basename ($one_name); + $one_hdr = basename ($one_name); } else { - $one_hdr = "${top_builddir}/${one_name}"; + $one_hdr = "\$(top_builddir)/${one_name}"; } $config_header .= ' ' if $config_header; @@ -3350,7 +3383,7 @@ sub handle_configure { # This is the ":" syntax of AC_OUTPUT. $file = $1; - $local = &basename ($file); + $local = basename ($file); @inputs = split (':', $2); @rewritten_inputs = &rewrite_inputs_into_dependencies (1, @inputs); $need_rewritten = 1; @@ -3359,7 +3392,7 @@ sub handle_configure { # Normal usage. $file = $lfile; - $local = &basename ($file); + $local = basename ($file); @inputs = ($file . '.in'); @rewritten_inputs = &rewrite_inputs_into_dependencies (1, @inputs); @@ -3375,7 +3408,7 @@ sub handle_configure { foreach (@inputs) { - $dist_dirs{&dirname ($_)} = 1; + $dist_dirs{dirname ($_)} = 1; } } @@ -3385,7 +3418,7 @@ sub handle_configure # Makefile, and we are currently doing `.', then we create a # rule to rebuild the file in the subdir. next if -f $file . '.am'; - local ($fd) = &dirname ($file); + local ($fd) = dirname ($file); if ($fd ne $relative_dir) { if ($relative_dir eq '.' && ! &is_make_dir ($fd)) @@ -3599,13 +3632,13 @@ sub handle_merge_targets # Put this at the beginning for the sake of non-GNU makes. This # is still wrong if these makes can run parallel jobs. But it is # right enough. - unshift (@all, &basename ($makefile)); + unshift (@all, basename ($makefile)); local ($one_name); foreach $one_name (@config_names) { - push (@all, &basename ($one_name)) - if &dirname ($one_name) eq $relative_dir; + push (@all, basename ($one_name)) + if dirname ($one_name) eq $relative_dir; } &do_one_merge_target ('info', @info); @@ -3649,10 +3682,10 @@ sub handle_merge_targets if &variable_defined ('BUILT_SOURCES'); foreach $one_name (@config_names) { - if (&dirname ($one_name) eq $relative_dir) + if (dirname ($one_name) eq $relative_dir) { $local_headers .= ' ' if $local_headers; - $local_headers .= &basename ($one_name); + $local_headers .= basename ($one_name); } } if ($local_headers) @@ -5173,7 +5206,7 @@ sub saw_extension # headers can be included. sub saw_sources_p { - local ($headers) = @_; + my ($headers) = @_; if ($headers) { @@ -5245,10 +5278,10 @@ sub derive_suffix # beginning of every subsequent line. sub pretty_print_internal { - local ($head, $fill, @values) = @_; + my ($head, $fill, @values) = @_; - local ($column) = length ($head); - local ($result) = $head; + my $column = length ($head); + my $result = $head; # Fill length is number of characters. However, each Tab # character counts for eight. So we count the number of Tabs and @@ -7270,14 +7303,14 @@ sub is_make_dir { foreach $iter (@configure_input_files) { - $make_dirs{&dirname ($iter)} = 1; + $make_dirs{dirname ($iter)} = 1; } # We also want to notice Makefile.in's. foreach $iter (@other_input_files) { if ($iter =~ /Makefile\.in$/) { - $make_dirs{&dirname ($iter)} = 1; + $make_dirs{dirname ($iter)} = 1; } } $make_dirs_set = 1; @@ -7429,7 +7462,7 @@ sub require_file_internal } } - &maybe_push_required_file (&dirname ($errfile), + &maybe_push_required_file (dirname ($errfile), $file, $errfile); } @@ -7567,61 +7600,6 @@ sub set_strictness ################################################################ -# $DIRNAME -# &dirname ($FILE) -# ---------------- -# Return directory name of file. -sub dirname ($) -{ - my ($file) = @_; - my $sub; - - ($sub = $file) =~ s,/+[^/]+$,,g; - $sub = '.' if $sub eq $file; - return $sub; -} - - -# $BASENAME -# &basename ($FILE) -# ----------------- -# Return file name of a file. -sub basename ($) -{ - my ($file) = @_; - my $sub; - - ($sub = $file) =~s,^.*/+,,g; - return $sub; -} - - -# $BACKPATH -# &backname ($REL-DIR) -# -------------------- -# If I `cd $REL-DIR', then to come back, I should `cd $BACKPATH'. -# For instance `src/foo' => `../..'. -# Works with non strictly increasing paths, i.e., `src/../lib' => `..'. -sub backname ($) -{ - my ($file) = @_; - my @res; - foreach (split (/\//, $file)) - { - next if $_ eq '.' || $_ eq ''; - if ($_ eq '..') - { - pop @res; - } - else - { - push (@res, '..'); - } - } - return join ('/', @res) || '.'; -} - - # Ensure a file exists. sub create { diff --git a/dist-vars.am b/dist-vars.am index 9266bb47..e69de29b 100644 --- a/dist-vars.am +++ b/dist-vars.am @@ -1,22 +0,0 @@ -## automake - create Makefile.in from Makefile.am -## Copyright 1994, 1995, 1996, 1999, 2001 Free Software Foundation, Inc. - -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2, or (at your option) -## any later version. - -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. - -## You should have received a copy of the GNU General Public License -## along with this program; if not, write to the Free Software -## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -## 02111-1307, USA. -PACKAGE = @PACKAGE@ -VERSION = @VERSION@ - -## DIST_COMMON comes first so that README can be the very first file. -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) diff --git a/distdir.am b/distdir.am index ef759db7..6df3cd49 100644 --- a/distdir.am +++ b/distdir.am @@ -18,6 +18,15 @@ .PHONY: distdir +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +## DIST_COMMON comes first so that README can be the very first file. +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = @TOP_DISTDIR@ +?DISTDIR?distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + distdir: $(DISTFILES) ## ## For Gnits users, this is pretty handy. Look at 15 lines @@ -76,7 +85,10 @@ distdir: $(DISTFILES) ?SUBDIRS? || mkdir $(distdir)/$$subdir \ ?SUBDIRS? || exit 1; \ ?SUBDIRS? (cd $$subdir && \ -?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(@TOP_DISTDIR@) distdir=../$(distdir)/$$subdir distdir) \ +?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) \ +?SUBDIRS? top_distdir="$(top_distdir)" \ +?SUBDIRS? distdir=../$(distdir)/$$subdir \ +?SUBDIRS? distdir) \ ?SUBDIRS? || exit 1; \ ?SUBDIRS? fi; \ ?SUBDIRS? done @@ -86,7 +98,7 @@ distdir: $(DISTFILES) ## We must explicitly set distdir and top_distdir for these sub-makes. ## ?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \ -?DIST-TARGETS? top_distdir="$(top_distdir)" distdir="$(distdir)" \ +?DIST-TARGETS? top_distdir="${top_distdir}" distdir="$(distdir)" \ ?DIST-TARGETS? @DIST-TARGETS@ ## ## This complex find command will try to avoid changing the modes of diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 669f7b30..fd07f4c0 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -12,7 +12,7 @@ info_TEXINFOS = automake.texi amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \ compile.am data-clean.am data.am dejagnu.am depend.am depend2.am \ -distdir.am dist-vars.am footer.am header-vars.am header.am \ +distdir.am footer.am header-vars.am header.am \ java-clean.am java.am kr-extra.am library.am libs-clean.am libs.am \ libtool.am lisp-clean.am lisp.am ltlib-clean.am ltlib.am ltlibrary.am \ mans-vars.am mans.am multilib.am program.am progs-clean.am progs.am \ diff --git a/lib/am/distdir.am b/lib/am/distdir.am index ef759db7..6df3cd49 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -18,6 +18,15 @@ .PHONY: distdir +PACKAGE = @PACKAGE@ +VERSION = @VERSION@ + +## DIST_COMMON comes first so that README can be the very first file. +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = @TOP_DISTDIR@ +?DISTDIR?distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + distdir: $(DISTFILES) ## ## For Gnits users, this is pretty handy. Look at 15 lines @@ -76,7 +85,10 @@ distdir: $(DISTFILES) ?SUBDIRS? || mkdir $(distdir)/$$subdir \ ?SUBDIRS? || exit 1; \ ?SUBDIRS? (cd $$subdir && \ -?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(@TOP_DISTDIR@) distdir=../$(distdir)/$$subdir distdir) \ +?SUBDIRS? $(MAKE) $(AM_MAKEFLAGS) \ +?SUBDIRS? top_distdir="$(top_distdir)" \ +?SUBDIRS? distdir=../$(distdir)/$$subdir \ +?SUBDIRS? distdir) \ ?SUBDIRS? || exit 1; \ ?SUBDIRS? fi; \ ?SUBDIRS? done @@ -86,7 +98,7 @@ distdir: $(DISTFILES) ## We must explicitly set distdir and top_distdir for these sub-makes. ## ?DIST-TARGETS? $(MAKE) $(AM_MAKEFLAGS) \ -?DIST-TARGETS? top_distdir="$(top_distdir)" distdir="$(distdir)" \ +?DIST-TARGETS? top_distdir="${top_distdir}" distdir="$(distdir)" \ ?DIST-TARGETS? @DIST-TARGETS@ ## ## This complex find command will try to avoid changing the modes of diff --git a/m4/Makefile.in b/m4/Makefile.in index 03656b24..eaa4bb45 100644 --- a/m4/Makefile.in +++ b/m4/Makefile.in @@ -96,9 +96,6 @@ DATA = $(m4data_DATA) DIST_COMMON = Makefile.am Makefile.in - -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) @@ -130,8 +127,10 @@ tags: TAGS TAGS: -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 35c436f2..45ecc44c 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -357,9 +357,6 @@ CONFIG_CLEAN_FILES = DIST_SOURCES = DIST_COMMON = Makefile.am Makefile.in - -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - all: all-am .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) @@ -428,8 +425,10 @@ check-TESTS: $(TESTS) test "$$failed" -eq 0; \ fi -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +top_distdir = .. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @for file in $(DISTFILES); do \ diff --git a/tests/confh4.test b/tests/confh4.test index 294b1cea..e9a73f60 100755 --- a/tests/confh4.test +++ b/tests/confh4.test @@ -6,8 +6,6 @@ cat > configure.in << 'END' AM_INIT_AUTOMAKE(nonesuch, nonesuch) -PACKAGE=nonesuch -VERSION=nonesuch AC_ARG_PROGRAM AC_PROG_INSTALL AM_CONFIG_HEADER(include/config.h) @@ -30,4 +28,4 @@ mkdir include $AUTOMAKE || exit 1 -grep -e -I./include Makefile.in +egrep '^DEFS =.* -I(\.|\$\(top_builddir\))/include' Makefile.in -- 2.43.5