[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Fix clean target for perl bindings.

From: Ben Reser <ben_at_reser.org>
Date: 2003-11-29 20:43:50 CET

The clean target for perl bindings removes Makefile.PL. Currently it's
using "Makefile.[a-z]*" to match the proper Makefiles to clean out.
While this ought to work it doesn't.

It looks like it works from a regular command line:
[breser@sorcerer perl]$ ls Makefile*
Makefile Makefile.delta Makefile.old Makefile.ra
Makefile.wc
Makefile.client Makefile.fs Makefile.PL Makefile.repos

{!1050 #65 9.2/amd64 Sat Nov 29 11:38:57 -0800}
[breser@sorcerer perl]$ ls Makefile.[a-z]*
Makefile.client Makefile.fs Makefile.ra Makefile.wc
Makefile.delta Makefile.old Makefile.repos

But the rm gets executed through /bin/sh -c, which appears to have a bug
or something with the globbing:
{!1051 #66 9.2/amd64 Sat Nov 29 11:39:03 -0800}
[breser@sorcerer perl]$ /bin/sh -c "ls Makefile.[a-z]*"
Makefile.client Makefile.fs Makefile.PL Makefile.repos
Makefile.delta Makefile.old Makefile.ra Makefile.wc

How and why it is picking up Makefile.PL isn't clear to me. But this is
really annoying when trying to work on this stuff. For one thing if
your Makefile is out of date with Makefile.PL it automatically runs a
make clean and whacks your Makefile.PL requiring me to do a svn update
to get it back.

The following patch fixes this:

* subversion/bindings/swig/perl/Makefile.PL
    Fix clean target so it doesn't remove Makefile.PL. For whatever
    reason Makefile.[a-z]* catches Makefile.PL when the glob runs
    through /bin/sh -c "rm -rf ..."

Index: subversion/bindings/swig/perl/Makefile.PL
===================================================================
--- subversion/bindings/swig/perl/Makefile.PL (revision 7871)
+++ subversion/bindings/swig/perl/Makefile.PL (working copy)
@@ -38,7 +38,7 @@
              PM => {map { ("$_.pm" => "\$(INST_LIBDIR)/$_.pm") }
                     map { perlish $_ }
                     ('base', 'core', @modules)},
- clean => { FILES => "*.hi Makefile.[a-z]* *.c *.bs" }
+ clean => { FILES => "*.hi *.c *.bs Makefile." . join '
Makefile.',@modules}
             );
 
 for (@modules) {

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Nov 29 20:44:28 2003

This is an archived mail posted to the Subversion Dev mailing list.