summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>2018-06-04 17:13:03 +0200
committerMatthias Paulmier <matthias.paulmier@etu.u-bordeaux.fr>2018-06-22 14:18:12 +0200
commit69dd1687944916e21fa520b4b87061a5dbeceab2 (patch)
tree3798651f99d836d646db4e8063a6bf7fd72191da
parentb26d06e0ffdb6e50c5e59f89b15a2b7c26cea003 (diff)
downloadautomake-69dd1687944916e21fa520b4b87061a5dbeceab2.tar.gz
Utils.pm: Add more utility methods
* 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.
-rwxr-xr-xbin/automake.in14
-rw-r--r--lib/Automake/Utils.pm16
2 files changed, 15 insertions, 15 deletions
diff --git a/bin/automake.in b/bin/automake.in
index 480e69f02..e119d9ca1 100755
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -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)
diff --git a/lib/Automake/Utils.pm b/lib/Automake/Utils.pm
index e1cd46337..832b74e05 100644
--- a/lib/Automake/Utils.pm
+++ b/lib/Automake/Utils.pm
@@ -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;