automake-patches
[Top][All Lists]
Advanced

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

perl -i nonfunctional on MinGW


From: Ralf Wildenhues
Subject: perl -i nonfunctional on MinGW
Date: Wed, 10 May 2006 21:38:51 +0200
User-agent: Mutt/1.5.11+cvs20060403

Welcome back Alexandre!

On MinGW, this happens:
| + /bin/perl -pi -e 's/#: //' configure.in
| Can't do inplace edit on configure.in: Permission denied.

So here's a patch to replace all "perl -i" with "sed && mv".
After finishing the patch it dawned on me that "perl -i~" may be
working, and indeed, testing shows that that works.

OK to apply this patch still, or should I redo with "perl -i~"?

Cheers,
Ralf

        * tests/pr401.test: Replace "perl -i" with sed and mv, for
        MinGW perl.
        * tests/pr401b.test, tests/pr401c.test, tests/python11.test,
        * tests/yacc6.test, tests/yacc8.test: Likewise.

Index: tests/pr401.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr401.test,v
retrieving revision 1.2
diff -u -r1.2 pr401.test
--- tests/pr401.test    14 May 2005 20:28:55 -0000      1.2
+++ tests/pr401.test    9 May 2006 21:34:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -93,8 +93,8 @@
 ## Test using LIBOBJS from a sibling directory. ##
 ## -------------------------------------------- ##
 
-$PERL -pi -e 's/#: //' configure.in
-$PERL -pi -e 's/lib\/Makefile //' configure.in
+sed 's/#: //; s/lib\/Makefile //' configure.in >configure.int
+mv -f configure.int configure.in
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = src
@@ -126,7 +128,8 @@
 ## Test using LIBOBJS from parent directory. ##
 ## ----------------------------------------- ##
 
-$PERL -pi -e 's/^.*src\/Makefile.*$//' configure.in
+sed 's/^.*src\/Makefile.*$//' configure.in >configure.int
+mv -f configure.int configure.in
 
 cat >Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
Index: tests/pr401b.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr401b.test,v
retrieving revision 1.2
diff -u -r1.2 pr401b.test
--- tests/pr401b.test   14 May 2005 20:28:55 -0000      1.2
+++ tests/pr401b.test   9 May 2006 21:34:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -94,8 +94,8 @@
 ## Test using LTLIBOBJS from a sibling directory. ##
 ## ---------------------------------------------- ##
 
-$PERL -pi -e 's/#: //' configure.in
-$PERL -pi -e 's/lib\/Makefile //' configure.in
+sed 's/#: //; s/lib\/Makefile //' configure.in >configure.int
+mv -f configure.int configure.in
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = src
@@ -127,7 +129,8 @@
 ## Test using LTLIBOBJS from parent directory. ##
 ## ------------------------------------------- ##
 
-$PERL -pi -e 's/^.*src\/Makefile.*$//' configure.in
+sed 's/^.*src\/Makefile.*$//' configure.in >configure.int
+mv -f configure.int configure.in
 
 cat >Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
Index: tests/pr401c.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr401c.test,v
retrieving revision 1.2
diff -u -r1.2 pr401c.test
--- tests/pr401c.test   14 May 2005 20:28:55 -0000      1.2
+++ tests/pr401c.test   9 May 2006 21:34:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -95,8 +95,8 @@
 ## Test using ALLOCA from a sibling directory. ##
 ## ------------------------------------------- ##
 
-$PERL -pi -e 's/#: //' configure.in
-$PERL -pi -e 's/lib\/Makefile //' configure.in
+sed 's/#: //; s/lib\/Makefile //' configure.in >configure.int
+mv -f configure.int configure.in
 
 cat >Makefile.am <<'EOF'
 SUBDIRS = src
@@ -128,7 +130,8 @@
 ## Test using ALLOCA from parent directory. ##
 ## ---------------------------------------- ##
 
-$PERL -pi -e 's/^.*src\/Makefile.*$//' configure.in
+sed 's/^.*src\/Makefile.*$//' configure.in >configure.int
+mv -f configure.int configure.in
 
 cat >Makefile.am <<'EOF'
 AUTOMAKE_OPTIONS = subdir-objects
Index: tests/python11.test
===================================================================
RCS file: /cvs/automake/automake/tests/python11.test,v
retrieving revision 1.2
diff -u -r1.2 python11.test
--- tests/python11.test 14 May 2005 20:28:55 -0000      1.2
+++ tests/python11.test 9 May 2006 21:36:00 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -46,7 +46,8 @@
 grep 'checking for IShouldNotExist2' stdout
 grep 'no suitable Python interpreter found' stderr
 
-$PERL -pi -e 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.in
+sed 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.in >configure.int
+mv -f configure.int configure.in
 $ACLOCAL
 $AUTOCONF
 # This one should define PYTHON as : and exit succesfully
Index: tests/yacc6.test
===================================================================
RCS file: /cvs/automake/automake/tests/yacc6.test,v
retrieving revision 1.11
diff -u -r1.11 yacc6.test
--- tests/yacc6.test    14 May 2005 20:28:56 -0000      1.11
+++ tests/yacc6.test    9 May 2006 21:36:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -104,6 +104,7 @@
 $MAKE
 $MAKE test-time-unchanged
 $sleep
-$PERL -pi -e s/TOKEN/TEKON/g sub/bar.y
+sed s/TOKEN/TEKON/g sub/bar.y >sub/bar.yt
+mv -f sub/bar.yt sub/bar.y
 $MAKE
 $MAKE test-time-changed
Index: tests/yacc8.test
===================================================================
RCS file: /cvs/automake/automake/tests/yacc8.test,v
retrieving revision 1.15
diff -u -r1.15 yacc8.test
--- tests/yacc8.test    14 May 2005 20:28:56 -0000      1.15
+++ tests/yacc8.test    9 May 2006 21:36:42 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2006  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -90,7 +90,8 @@
 $MAKE obj
 test `ls -1t foo/parse.h z | sed 1q` = z
 $sleep
-$PERL -pi -e 's/%%/%token TOKEN\n%%/g' ../foo/parse.y
+sed 's/%%/%token TOKEN\n%%/g' ../foo/parse.y >../foo/parse.yt
+mv -f ../foo/parse.yt ../foo/parse.y
 $MAKE obj
 test `ls -1t foo/parse.h z | sed 1q` = foo/parse.h
 




reply via email to

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