automake-patches
[Top][All Lists]
Advanced

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

Patch: FYI: generate scripts from makefile


From: Tom Tromey
Subject: Patch: FYI: generate scripts from makefile
Date: 15 Sep 2002 14:32:12 -0600

I'm checking this in.

As pointed out on the bug list, the substitutions in automake and
aclocal are incorrect if the paths in question contain '@', due to
perl quoting issues.  Alexandre's patch of using single quotes isn't
correct if @datadir@ substitutes as ${prefix}/share.  This patch
changes things to generate the scripts from Makefile.am.

Tom

Index: configure.in
===================================================================
RCS file: /cvs/automake/automake/configure.in,v
retrieving revision 1.111
diff -u -r1.111 configure.in
--- configure.in 8 Sep 2002 13:07:53 -0000 1.111
+++ configure.in 15 Sep 2002 20:32:05 -0000
@@ -83,9 +83,6 @@
 AC_PROG_EGREP
 AC_PROG_FGREP
 
-AC_CONFIG_FILES([automake], [chmod +x automake])
-AC_CONFIG_FILES([aclocal], [chmod +x aclocal])
-
 AC_CONFIG_FILES([
   Makefile
   lib/Automake/Makefile
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1349
diff -u -r1.1349 automake.in
--- automake.in 15 Sep 2002 17:44:26 -0000 1.1349
+++ automake.in 15 Sep 2002 20:32:13 -0000
@@ -31,7 +31,6 @@
 
 BEGIN
 {
-  my $prefix = '@prefix@';
   my $perllibdir = $ENV{'perllibdir'} || 
'@datadir@/@address@hidden@APIVERSION@';
   unshift @INC, $perllibdir;
 }
@@ -127,7 +126,6 @@
 # VERSION as string so that eg version 0.30 will print correctly.
 my $VERSION = '@VERSION@';
 my $PACKAGE = '@PACKAGE@';
-my $prefix = '@prefix@';
 my $libdir = '@datadir@/@address@hidden@APIVERSION@';
 
 # Some regular expressions.  One reason to put them here is that it
Index: aclocal.in
===================================================================
RCS file: /cvs/automake/automake/aclocal.in,v
retrieving revision 1.75
diff -u -r1.75 aclocal.in
--- aclocal.in 15 Sep 2002 17:44:26 -0000 1.75
+++ aclocal.in 15 Sep 2002 20:32:13 -0000
@@ -29,7 +29,6 @@
 
 BEGIN
 {
-  my $prefix = '@prefix@';
   my $perllibdir = $ENV{'perllibdir'} || 
'@datadir@/@address@hidden@APIVERSION@';
   unshift @INC, $perllibdir;
 }
@@ -41,7 +40,6 @@
 $VERSION = '@VERSION@';
 $APIVERSION = '@APIVERSION@';
 $PACKAGE = '@PACKAGE@';
-$prefix = '@prefix@';
 # Note that this isn't pkgdatadir, but a separate directory.
 # Note also that the versioned directory is handled later.
 $acdir = '@datadir@/aclocal';
Index: Makefile.am
===================================================================
RCS file: /cvs/automake/automake/Makefile.am,v
retrieving revision 1.199
diff -u -r1.199 Makefile.am
--- Makefile.am 19 Jul 2002 20:17:58 -0000 1.199
+++ Makefile.am 15 Sep 2002 20:32:13 -0000
@@ -57,6 +57,24 @@
          rm -f $(DESTDIR)$(bindir)/$$fv; \
        done
 
+
+## We can't use configure to do the substitution here; we must do it
+## by hand.  We use a funny notation here to avoid configure
+## substitutions in our text.
+do_subst = sed -e 's,address@hidden@],$(datadir),g' -e 
's,address@hidden@],$(PERL),g' \
+           -e 's,address@hidden@],@configure_input@,g' \
+           -e 's,address@hidden@],$(PACKAGE),g' \
+           -e 's,address@hidden@],$(VERSION),g' \
+           -e 's,address@hidden@],$(APIVERSION),g'
+
+automake: automake.in Makefile
+       $(do_subst) < $(srcdir)/automake.in > automake
+       chmod +x automake
+
+aclocal: aclocal.in Makefile
+       $(do_subst) < $(srcdir)/aclocal.in > aclocal
+       chmod +x aclocal
+
 ################################################################
 ##
 ## Everything past here is useful to the maintainer, but probably not




reply via email to

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