Change 14009 by jhi@alpha on 2002/01/02 00:35:15
Once more try to get the PPPort Makefile right.
Affected files ...
.... //depot/perl/ext/Devel/PPPort/Makefile.PL#7 edit
.... //depot/perl/ext/Devel/PPPort/ppport_h.PL#2 edit
Differences ...
==== //depot/perl/ext/Devel/PPPort/Makefile.PL#7 (text) ====
Index: perl/ext/Devel/PPPort/Makefile.PL
--- perl/ext/Devel/PPPort/Makefile.PL.~1~ Tue Jan 1 17:45:06 2002
+++ perl/ext/Devel/PPPort/Makefile.PL Tue Jan 1 17:45:06 2002
@@ -10,22 +10,16 @@
OBJECT => 'PPPort$(OBJ_EXT) module2$(OBJ_EXT) module3$(OBJ_EXT)',
XSPROTOARG => '-noprototypes',
'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" },
- 'clean' => { FILES => 'ppport.h'},
+ 'clean' => { FILES => [qw(ppport.h ppport_h)]},
);
sub MY::postamble {
+ return <<"EOM";
- my $pmfile = 'PPPort.pm' ;
+ppport.h: ppport_h
+ \$(TOUCH) ppport_h
- my $retval = <<"EOM";
+PPPort.xs module2\$(OBJ_EXT) module3\$(OBJ_EXT): ppport.h
-ppport.h: ppport_h.PL
- \$(PERL) "-I\$(PERL_ARCHLIB)" "-I\$(PERL_LIB)" ppport_h.PL
-
-PPPort.xs module2.\$(OBJ_EXT) module3.\$(OBJ_EXT) : ppport.h
- -\$(TOUCH) \$@
-
EOM
-
- return $retval;
}
==== //depot/perl/ext/Devel/PPPort/ppport_h.PL#2 (text) ====
Index: perl/ext/Devel/PPPort/ppport_h.PL
--- perl/ext/Devel/PPPort/ppport_h.PL.~1~ Tue Jan 1 17:45:06 2002
+++ perl/ext/Devel/PPPort/ppport_h.PL Tue Jan 1 17:45:06 2002
@@ -1,5 +1,17 @@
-my $pmfile = 'PPPort.pm';
package Devel::PPPort;
sub bootstrap {};
-require qq[$pmfile];
-WriteFile(qq[ppport.h]);
+require "PPPort.pm";
+WriteFile("ppport.tmp");
+{
+ local $/;
+ my $old = '';
+ my $new = '';
+ $old = <FH> if open(FH, "ppport.h"); close FH;
+ $new = <FH> if open(FH, "ppport.tmp"); close FH;
+ if ($old ne $new) {
+ unlink("ppport.h");
+ rename("ppport.tmp", "ppport.h");
+ }
+ unlink("ppport.tmp");
+}
+
End of Patch.