]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Utils.pm: Add more utility methods
authorMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>
Mon, 4 Jun 2018 15:13:03 +0000 (17:13 +0200)
committerMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>
Fri, 22 Jun 2018 12:18:12 +0000 (14:18 +0200)
* subst: Method to get a configure-style substitute from a text
* file_contents_internal: Return the contents of a file from automake/lib/am.
  This is a long method that will need some reworking later.

bin/automake.in
lib/Automake/Utils.pm

index 480e69f0220064a5834d60e1c110de05866f35d6..e119d9ca1f5ee87d99209deaa366197abbc0705c 100755 (executable)
@@ -612,20 +612,6 @@ sub msg_ac
 
 ################################################################
 
-# subst ($TEXT)
-# -------------
-# Return a configure-style substitution using the indicated text.
-# We do this to avoid having the substitutions directly in automake.in;
-# when we do that they are sometimes removed and this causes confusion
-# and bugs.
-sub subst
-{
-    my ($text) = @_;
-    return '@' . $text . '@';
-}
-
-################################################################
-
 
 # $BACKPATH
 # backname ($RELDIR)
index e1cd463370f3336e9aa33c441fd6156933bb8ad3..832b74e05c1125d4af7b4ba3ef6e76ee3ef660f5 100644 (file)
@@ -20,11 +20,13 @@ use strict;
 use Exporter;
 use Automake::Rule;
 use Automake::Global;
+use Automake::Location;
+use Automake::Condition;
 
 use vars qw (@ISA @EXPORT);
 
 @ISA = qw (Exporter);
-@EXPORT = qw (&var_SUFFIXES_trigger &locate_aux_dir);
+@EXPORT = qw (var_SUFFIXES_trigger locate_aux_dir subst);
 
 # var_SUFFIXES_trigger ($TYPE, $VALUE)
 # ------------------------------------
@@ -66,4 +68,16 @@ sub locate_aux_dir
   $am_config_aux_dir =~ s,/*$,,;
 }
 
+# subst ($TEXT)
+# -------------
+# Return a configure-style substitution using the indicated text.
+# We do this to avoid having the substitutions directly in automake.in;
+# when we do that they are sometimes removed and this causes confusion
+# and bugs.
+sub subst ($)
+{
+    my ($text) = @_;
+    return '@' . $text . '@';
+}
+
 1;