automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving *.am in lib/am


From: Akim Demaille
Subject: Re: Moving *.am in lib/am
Date: 08 May 2001 16:37:35 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

>>>>> "Akim" == Akim Demaille <address@hidden> writes:

Akim> Tom, I'm done with all my patches (yeeeha!).  I'm now ready to
Akim> move the am files.  But given that you probably want to keep
Akim> their CVS history, I think you'll have to do that.

Akim> If you don't care, I can handle this via cvs remove + add.

Actually, this is somewhat ``needed'' to fix the current failure of
distcheck.  It is related to our agreement to move --amdir from
pointing to *.am to pointing to pkgdata_dir.

This is my proposal for this move.  We can leave amdir instead of
libdir, both for $ and --, it's just as you like, or leave --amdir as
a synonym for --libdir.  My departure from --amdir is due to the
slight ambiguity as amdir can really mean `dir holding am files'.

Still, to use --libdir for both an installed and a non installed
Automake means we need to reproduce the installed tree in the package,
i.e., we need to first move *.am into lib/am.

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        * automake.in ($pkgdata_dir): Rename as...
        ($libdir): this.
        ($am_dir): Remove, replace it's uses with $libdir.
        (&parse_arguments): Replace --amdir with --libdir.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1097
diff -u -u -r1.1097 automake.in
--- automake.in 2001/05/08 13:53:30 1.1097
+++ automake.in 2001/05/08 14:21:48
@@ -107,8 +107,7 @@
 my $VERSION = "@VERSION@";
 my $PACKAGE = "@PACKAGE@";
 my $prefix = "@prefix@";
-my $am_dir = "@datadir@/@PACKAGE@/am";
-my $pkgdata_dir = "@datadir@/@PACKAGE@";
+my $libdir = "@datadir@/@PACKAGE@";

 # String constants.
 my $IGNORE_PATTERN = '^##([^#\n].*)?\n';
@@ -1072,7 +1071,7 @@
       (
        'version'       => \&version,
        'help'          => \&usage,
-       'amdir:s'       => \$am_dir,
+       'libdir:s'      => \$libdir,
        'gnu'           => sub { &set_strictness ('gnu'); },
        'gnits'                 => sub { &set_strictness ('gnits'); },
        'cygnus'        => \$cygnus_mode,
@@ -2304,7 +2303,7 @@
       }

     my ($coms, $vars, $rules) =
-      &file_contents_internal (1, "$am_dir/compile.am",
+      &file_contents_internal (1, "$libdir/am/compile.am",
                               ('DEFAULT_INCLUDES' => $default_includes));
     $output_vars .= $vars;
     $output_rules .= "$coms$rules";
@@ -6726,7 +6725,7 @@
 {
     my $saved_output_vars = $output_vars;
     my ($comments, undef, $rules) =
-      &file_contents_internal (1, "$am_dir/header-vars.am",
+      &file_contents_internal (1, "$libdir/am/header-vars.am",
                     ('BUILD'    => $seen_canonical == $AC_CANONICAL_SYSTEM,
                      'HOST'     => $seen_canonical,
                      'TARGET'   => $seen_canonical == $AC_CANONICAL_SYSTEM,
@@ -6903,7 +6902,7 @@
 # ($COMMENT, $VARIABLES, $RULES)
 # &file_contents_internal ($IS_AM, $FILE, [%TRANSFORM])
 # -----------------------------------------------------
-# Return contents of a file from $am_dir, automatically skipping
+# Return contents of a file from $libdir/am, automatically skipping
 # macros or rules which are already known. $IS_AM iff the caller is
 # reading an Automake file (as opposed to the user's Makefile.am).
 sub file_contents_internal ($%)
@@ -6945,7 +6944,7 @@
         {
            if ($cond ne 'FALSE')
              {
-               my $file = ($is_am ? "$am_dir/" : '') . $1;
+               my $file = ($is_am ? "$libdir/am/" : '') . $1;
                # N-ary `.=' fails.
                my ($com, $vars, $rules)
                  = file_contents_internal ($is_am, $file, %transform);
@@ -7075,13 +7074,13 @@
 # $CONTENTS
 # &file_contents ($BASENAME, [%TRANSFORM])
 # ----------------------------------------
-# Return contents of a file from $am_dir, automatically skipping
+# Return contents of a file from $libdir/am, automatically skipping
 # macros or rules which are already known.
 sub file_contents ($%)
 {
     my ($basename, %transform) = @_;
     my ($comments, $variables, $rules) =
-      file_contents_internal (1, "$am_dir/$basename.am", %transform);
+      file_contents_internal (1, "$libdir/am/$basename.am", %transform);
     return "$comments$variables$rules";
 }

@@ -7559,7 +7558,7 @@
                        $suppress = 0;
                        $trailer = "; cannot run `libtoolize': $!";
                    }
-                   elsif (-f ("$pkgdata_dir/$file"))
+                   elsif (-f ("$libdir/$file"))
                    {
                        # Install the missing file.  Symlink if we
                        # can, copy if we must.  Note: delete the file
@@ -7570,13 +7569,13 @@
                        unlink ($errfile) if -f $errfile;
                        if ($symlink_exists && ! $copy_missing)
                        {
-                           if (! symlink ("$pkgdata_dir/$file", $errfile))
+                           if (! symlink ("$libdir/$file", $errfile))
                            {
                                $suppress = 0;
                                $trailer = "; error while making link: $!";
                            }
                        }
-                       elsif (system ('cp', "$pkgdata_dir/$file", $errfile))
+                       elsif (system ('cp', "$libdir/$file", $errfile))
                        {
                            $suppress = 0;
                            $trailer = "\n    error while copying";
@@ -7884,7 +7883,7 @@

 Library files:
   -a, --add-missing      add missing standard files to package
-      --amdir=DIR        directory storing config files
+      --libdir=DIR       directory storing library files
   -c, --copy             with -a, copy missing files (default is symlink)
   -f, --force-missing    force update of standard files
 EOF
Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.204
diff -u -u -r1.204 automake.texi
--- automake.texi 2001/05/08 10:58:49 1.204
+++ automake.texi 2001/05/08 14:21:50
@@ -798,8 +798,8 @@
 make a symbolic link pointing to its own copy of the missing file; this
 can be changed with @code{--copy}.

address@hidden address@hidden
address@hidden --amdir
address@hidden address@hidden
address@hidden --libdir
 Look for Automake data files in directory @var{dir} instead of in the
 installation directory.  This is typically used for debugging.

Index: tests/defs
===================================================================
RCS file: /cvs/automake/automake/tests/defs,v
retrieving revision 1.29
diff -u -u -r1.29 defs
--- tests/defs 2001/05/03 08:21:05 1.29
+++ tests/defs 2001/05/08 14:21:50
@@ -74,7 +74,7 @@
 if test -z "$AUTOMAKE"; then
    perllibdir=$srcdir/../lib
    export perllibdir
-   AUTOMAKE="$PERL ../../automake --amdir=$srcdir/.. --foreign"
+   AUTOMAKE="$PERL ../../automake --libdir=$srcdir/.. --foreign"
 fi

 # See how aclocal should be run.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]