]> git.sur5r.net Git - i3/i3/commitdiff
testsuite: Makefile.PL: do not rename Makefile while running make clean
authorMaik Fischer <maikf@qu.cx>
Sat, 12 Nov 2011 00:51:18 +0000 (01:51 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 21 Nov 2011 19:14:46 +0000 (19:14 +0000)
testcases/Makefile.PL

index 11385f763f631aa57e22d9868ce1f0e71230cf93..fd7b5e0d0cca229c66ae9cc2ea7548e734136d91 100755 (executable)
@@ -15,11 +15,19 @@ WriteMakefile(
        'EV'           => 0,
        'Inline'       => 0,
     },
-    # don't install any files from this directory
-    PM => {},
+    PM => {}, # do not install any files from this directory
     clean => {
-        FILES => 'testsuite-* latest'
+        FILES => 'testsuite-* latest i3-cfg-for-*',
     }
 );
-# and don't run the tests while installing
-sub MY::test { }
+
+package MY;
+sub test { } # do not run the tests while installing
+
+# do not rename the Makefile
+sub clean {
+    my $section = shift->SUPER::clean(@_);
+    $section =~ s/^\t\Q$_\E\n$//m for
+        '- $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)';
+    $section;
+}