]> sourceware.org Git - automake.git/commitdiff
Always use hashes with &file_contents.
authorAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 18:56:44 +0000 (18:56 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 5 Mar 2001 18:56:44 +0000 (18:56 +0000)
* automake.in (&handle_texinfo): texibuild.am does not need
TEXINFODIR.
texinfos.am wants only TEXICLEANS.
(&handle_dist, &add_depend2, &handle_clean): Replace $xform with
%transform.
* texinfos.am: Adjust.

ChangeLog
Makefile.in
automake.in
lib/am/texinfos.am
texinfos.am

index 82f85b122a5bf43ac5ad0e3000e1bf0c83c73235..5f1a145f5646cde56d88b6af027040b39eb87a09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2001-03-05  Akim Demaille  <akim@epita.fr>
+
+       Always use hashes with &file_contents.
+
+       * automake.in (&handle_texinfo): texibuild.am does not need
+       TEXINFODIR.
+       texinfos.am wants only TEXICLEANS.
+       (&handle_dist, &add_depend2, &handle_clean): Replace $xform with
+       %transform.
+       * texinfos.am: Adjust.
+
 2001-03-05  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&handle_programs, &handle_libraries, &handle_tags)
index 66ceb4273c3ddc0166189dda7e6e7bfea46f813f..9735471c732913432da9ead1c9d67cfcb3307035 100644 (file)
@@ -85,13 +85,12 @@ bin_SCRIPTS = automake aclocal
 info_TEXINFOS = automake.texi
 
 amfiles = check.am clean-hdr.am clean-kr.am clean.am comp-vars.am \
-compile.am configure.am data-clean.am data.am dejagnu.am depend.am \
-depend2.am distdir.am footer.am header-vars.am header.am install.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 \
-python-clean.am python.am remake-hdr.am remake.am scripts.am \
-subdirs.am tags-clean.am tags.am texi-vers.am texibuild.am texinfos.am
+compile.am configure.am data.am dejagnu.am depend.am depend2.am          \
+distdir.am footer.am header-vars.am header.am install.am java.am  \
+kr-extra.am library.am libs.am libtool.am lisp.am ltlib.am       \
+ltlibrary.am mans-vars.am mans.am multilib.am program.am progs.am \
+python.am remake-hdr.am remake.am scripts.am subdirs.am tags.am          \
+texi-vers.am texibuild.am texinfos.am
 
 
 dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \
index 14eab55dedf1dbc7f46968d85675d0852b99a202..18a8fe7c4466e6b6dba6e01e724bde0680c97ec4 100755 (executable)
@@ -2762,18 +2762,18 @@ sub handle_texinfo
        $need_texi_file = 1;
     }
 
-    my $xform =
-      &transform ('TEXINFODIR' => $texinfodir,
-                 'TEXICLEAN'  => &pretty_print_internal ("\t-rm -f",
-                                                         "\t  ",
-                                                         @texi_cleans));
     foreach my $txsfx (sort keys %texi_suffixes)
     {
-       $output_rules .= &file_contents ('texibuild',
-                                        $xform
-                                        . &transform ('SUFFIX' => $txsfx));
+       $output_rules .=
+         &file_contents ('texibuild',
+                         &transform ('TEXINFODIR' => $texinfodir,
+                                     'SUFFIX'     => $txsfx));
     }
-    $output_rules .= &file_contents ('texinfos', $xform);
+
+    my $texiclean = &pretty_print_internal ("", "\t  ", @texi_cleans);
+    $output_rules .=  &file_contents ('texinfos',
+                                     &transform ('TEXICLEAN' => $texiclean));
+
     push (@dist_targets, 'dist-info');
     push (@suffixes, '.texi', '.texinfo', '.txi', '.info', '.dvi', '.ps');
 
@@ -3059,15 +3059,14 @@ sub handle_dist
     }
 
     # Rule to check whether a distribution is viable.
-    my $xform =
-      &transform ('TOPDIR'         => ($relative_dir eq '.'),
-                 'DISTCHECK-HOOK' => &target_defined ('distcheck-hook'),
-                 'GETTEXT'        => $seen_gettext);
+    my %transform = ('TOPDIR'         => ($relative_dir eq '.'),
+                    'DISTCHECK-HOOK' => &target_defined ('distcheck-hook'),
+                    'GETTEXT'        => $seen_gettext);
 
     # Prepend $(distdir) to each directory given.
     my %rewritten;
     grep ($rewritten{'$(distdir)/' . $_} = 1, keys %dist_dirs);
-    $xform .= &transform ('DISTDIRS', join (' ', sort keys %rewritten));
+    $transform{'DISTDIRS'} = join (' ', sort keys %rewritten);
 
     # If we have SUBDIRS, create all dist subdirectories and do
     # recursive build.
@@ -3096,7 +3095,7 @@ sub handle_dist
            &define_pretty_variable ('DIST_SUBDIRS', '', '$(SUBDIRS)');
        }
 
-       $xform .= &transform ('DIST_SUBDIR_NAME' => $dist_subdir_name);
+       $transform{'DIST_SUBDIR_NAME'} = $dist_subdir_name;
     }
 
     # If the target `dist-hook' exists, make sure it is run.  This
@@ -3104,15 +3103,13 @@ sub handle_dist
     # before it is packaged up.
     push (@dist_targets, 'dist-hook')
       if &target_defined ('dist-hook');
+    $transform{'DIST-TARGETS'} = join(' ', @dist_targets);
 
-    my $top_distdir = backname ($relative_dir);
+    # Defining $(DISTDIR).
+    $transform{'DISTDIR'} = !&variable_defined('distdir');
+    $transform{'TOP_DISTDIR'} = backname ($relative_dir);
 
-    $output_rules .=
-      &file_contents ('distdir',
-                     $xform
-                     . &transform ('DISTDIR' => !&variable_defined('distdir'),
-                                   'DIST-TARGETS' => join(' ', @dist_targets),
-                                   'TOP_DISTDIR'  => $top_distdir));
+    $output_rules .= &file_contents ('distdir', &transform (%transform));
 }
 
 
@@ -3130,10 +3127,10 @@ sub add_depend2
     my $flag = $language_map{"$lang-flags"};
 
     # First include code for ordinary objects.
-    my $xform = &transform ('PFX'  => $pfx,
-                           'FPFX' => $fpfx,
-                           'LIBTOOL' => $seen_libtool,
-                           'AMDEP'   => $use_dependencies);
+    my %transform = ('PFX'  => $pfx,
+                    'FPFX' => $fpfx,
+                    'LIBTOOL' => $seen_libtool,
+                    'AMDEP'   => $use_dependencies);
 
     # This function can be called even when we don't want dependency
     # tracking.  This happens when we need an explicit rule for some
@@ -3142,21 +3139,21 @@ sub add_depend2
     {
         my $compile = '$(' . $pfx . 'COMPILE)';
        my $ltcompile = '$(LT' . $pfx . 'COMPILE)';
-       my $xform1 = ($xform
-                     . &transform ('GENERIC'   => 1,
-                                   'BASE'      => '$*',
-                                   'SOURCE'    => '$<',
-                                   'OBJ'       => '$@',
-                                   'LTOBJ'     => '$@',
-                                   'OBJOBJ'    => '$@',
-                                   'COMPILE'   => $compile,
-                                   'LTCOMPILE' => $ltcompile));
+       my %transform = (%transform,
+                        'GENERIC'   => 1,
+                        'BASE'      => '$*',
+                        'SOURCE'    => '$<',
+                        'OBJ'       => '$@',
+                        'LTOBJ'     => '$@',
+                        'OBJOBJ'    => '$@',
+                        'COMPILE'   => $compile,
+                        'LTCOMPILE' => $ltcompile);
 
        foreach my $ext (&lang_extensions ($lang))
        {
            $output_rules .= (&file_contents ('depend2',
-                                             &transform ('EXT' => $ext)
-                                             . $xform1)
+                                             &transform (%transform,
+                                                         'EXT' => $ext))
                              . "\n");
        }
     }
@@ -3183,17 +3180,16 @@ sub add_depend2
        # depend2.am into real targets for the particular objects we
        # are building.
        $output_rules .=
-           &file_contents
-               ('depend2',
-                $xform
-                . &transform ('GENERIC'   => 0,
-                              'BASE'      => $obj,
-                              'SOURCE'    => $source,
-                              'OBJ'       => "$obj.o",
-                              'OBJOBJ'    => "$obj.obj",
-                              'LTOBJ'     => "$obj.lo",
-                              'COMPILE'   => $obj_compile,
-                              'LTCOMPILE' => $obj_ltcompile))
+           &file_contents ('depend2',
+                           &transform (%transform,
+                                       'GENERIC'   => 0,
+                                       'BASE'      => $obj,
+                                       'SOURCE'    => $source,
+                                       'OBJ'       => "$obj.o",
+                                       'OBJOBJ'    => "$obj.obj",
+                                       'LTOBJ'     => "$obj.lo",
+                                       'COMPILE'   => $obj_compile,
+                                       'LTCOMPILE' => $obj_ltcompile))
     }
 }
 
@@ -3950,13 +3946,12 @@ sub do_check_merge_target
 # Handle all 'clean' targets.
 sub handle_clean
 {
-    my $xform = '';
+    my %transform;
 
     # Don't include `MAINTAINER'; it is handled specially below.
     foreach my $name ('MOSTLY', '', 'DIST')
     {
-      $xform .= &transform ("${name}CLEAN"
-                           => &variable_defined ("${name}CLEANFILES"));
+      $transform{"${name}CLEAN"} = &variable_defined ("${name}CLEANFILES");
     }
 
     # Built sources are automatically removed by maintainer-clean.
@@ -3967,15 +3962,15 @@ sub handle_clean
 
     $output_rules .=
       &file_contents ('clean',
-                     $xform
-                     . &transform ('MCFILES'
-                                   # Join with no space to avoid
-                                   # spurious `test -z' success at
-                                   # runtime.
-                                   => join ('', @maintainer_clean_files),
-                                   'MFILES'
-                                   # A space is required in the join here.
-                                   => join (' ', @maintainer_clean_files)));
+                     &transform (%transform,
+                                 'MCFILES'
+                                 # Join with no space to avoid
+                                 # spurious `test -z' success at
+                                 # runtime.
+                                    => join ('', @maintainer_clean_files),
+                                 'MFILES'
+                                 # A space is required in the join here.
+                                    => join (' ', @maintainer_clean_files)));
 
     # We special-case config.status here.  If we do it as part of the
     # normal clean processing for this directory, then it might be
index 952686325f196c5c7ee43b45127478f839df0b4e..5c4cf9508f9b50dfbae48fde819ce153741c5596 100644 (file)
@@ -129,7 +129,7 @@ dist-info: $(INFO_DEPS)
 .PHONY: mostlyclean-aminfo
 mostlyclean-am: mostlyclean-aminfo
 mostlyclean-aminfo:
-%TEXICLEAN%
+       -rm -f %TEXICLEAN%
 
 .PHONY: maintainer-clean-aminfo
 maintainer-clean-am: maintainer-clean-aminfo
index 952686325f196c5c7ee43b45127478f839df0b4e..5c4cf9508f9b50dfbae48fde819ce153741c5596 100644 (file)
@@ -129,7 +129,7 @@ dist-info: $(INFO_DEPS)
 .PHONY: mostlyclean-aminfo
 mostlyclean-am: mostlyclean-aminfo
 mostlyclean-aminfo:
-%TEXICLEAN%
+       -rm -f %TEXICLEAN%
 
 .PHONY: maintainer-clean-aminfo
 maintainer-clean-am: maintainer-clean-aminfo
This page took 0.049568 seconds and 5 git commands to generate.