makepp.patch 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. Index: cvs/install.pl
  2. --- cvs/install.pl.orig 2008-05-17 16:22:38 +0200
  3. +++ cvs/install.pl 2008-05-18 12:06:39 +0200
  4. @@ -112,11 +112,11 @@
  5. }
  6. # prior installation may not have supported .makepp/*.mk files
  7. --r "$datadir/FileInfo_makepp.pm" and
  8. - (stat "$datadir/FileInfo_makepp.pm")[9] < 1102710870 || # check-in time
  9. +-r "$ENV{DESTDIR}$datadir/FileInfo_makepp.pm" and
  10. + (stat "$ENV{DESTDIR}$datadir/FileInfo_makepp.pm")[9] < 1102710870 || # check-in time
  11. do {
  12. my $found;
  13. - open F, "$datadir/FileInfo_makepp.pm";
  14. + open F, "$ENV{DESTDIR}$datadir/FileInfo_makepp.pm";
  15. while( <F> ) {
  16. $found = 1, last if /build_info_subdir.+\.mk/;
  17. }
  18. @@ -162,13 +162,13 @@
  19. @sig_num{split ' ', $Config{sig_name}} = split ' ', $Config{sig_num};
  20. $USR1 = $sig_num{USR1}; $USR1 = $USR1; # suppress used-only-once warning
  21. -substitute_file( $_, $bindir, 0755, 1 ) for
  22. +substitute_file( $_, "$ENV{DESTDIR}$bindir", 0755, 1 ) for
  23. qw(makepp makeppbuiltin makeppclean makeppgraph makeppinfo makepplog makepp_build_cache_control);
  24. -substitute_file( $_, $datadir, 0644 ) for
  25. +substitute_file( $_, "$ENV{DESTDIR}$datadir", 0644 ) for
  26. qw(recursive_makepp FileInfo_makepp.pm BuildCacheControl.pm);
  27. -make_dir("$datadir/$_") for
  28. +make_dir("$ENV{DESTDIR}$datadir/$_") for
  29. qw(ActionParser BuildCheck CommandParser Scanner Signature);
  30. foreach $module (qw(AutomakeFixer BuildCache FileInfo Glob MakeEvent
  31. Makecmds Makefile Makesubs Rule TextSubs Utils
  32. @@ -189,13 +189,13 @@
  33. Signature Signature/c_compilation_md5 Signature/md5
  34. Signature/shared_object Signature/verilog_simulation_md5
  35. Signature/verilog_synthesis_md5)) {
  36. - copy("$module.pm", "$datadir/$module.pm");
  37. - chmod 0644, "$datadir/$module.pm";
  38. + copy("$module.pm", "$ENV{DESTDIR}$datadir/$module.pm");
  39. + chmod 0644, "$ENV{DESTDIR}$datadir/$module.pm";
  40. }
  41. foreach $include (qw(makepp_builtin_rules makepp_default_makefile)) {
  42. - copy("$include.mk", "$datadir/$include.mk");
  43. - chmod 0644, "$datadir/$include.mk";
  44. + copy("$include.mk", "$ENV{DESTDIR}$datadir/$include.mk");
  45. + chmod 0644, "$ENV{DESTDIR}$datadir/$include.mk";
  46. }
  47. #
  48. @@ -214,11 +214,11 @@
  49. my $manfile = $file;
  50. $manfile =~ s/\.pod$/.1/; # Get the name of the man file.
  51. $manfile =~ s@^pod/@@;
  52. - system("pod2man $file > $mandir/man1/$manfile 2>/dev/null");
  53. + system("pod2man $file > $ENV{DESTDIR}$mandir/man1/$manfile 2>/dev/null");
  54. # Ignore stderr because older versions of
  55. # pod2man (e.g., perl 5.006) don't understand
  56. # =head3.
  57. - chmod 0644, "$mandir/man1/$manfile";
  58. + chmod 0644, "$ENV{DESTDIR}$mandir/man1/$manfile";
  59. }
  60. }
  61. @@ -387,8 +387,8 @@
  62. $nav .= join '<br />', map $link{$_}, @links;
  63. }
  64. $nav .= '</td></tr></table>';
  65. - open my $outfile, ">$htmldir_val/$_" or die "can't create `$htmldir_val/$_'--$!";
  66. - chmod 0644, "$htmldir_val/$_";
  67. + open my $outfile, ">$ENV{DESTDIR}$htmldir_val/$_" or die "can't create `$htmldir_val/$_'--$!";
  68. + chmod 0644, "$ENV{DESTDIR}$htmldir_val/$_";
  69. s/\.html$//;
  70. my $title = (s/^makepp(?:_|$)// ? 'Makepp ' : '') . $alias{$_ || 'makepp'};
  71. my $index;
  72. @@ -540,11 +540,11 @@
  73. unlink $tmp;
  74. for( qw'google.png makepp.gif makepp.css pre.png sflogo.png url.png' ) {
  75. - copy $_, "$htmldir_val/$_";
  76. - chmod 0644, "$htmldir_val/$_";
  77. + copy $_, "$ENV{DESTDIR}$htmldir_val/$_";
  78. + chmod 0644, "$ENV{DESTDIR}$htmldir_val/$_";
  79. }
  80. - symlink 'makepp.html', "$htmldir_val/index.html";
  81. + symlink 'makepp.html', "$ENV{DESTDIR}$htmldir_val/index.html";
  82. }
  83. #
  84. @@ -637,6 +637,7 @@
  85. }
  86. sub read_with_prompt {
  87. + return undef;
  88. local $| = 1; # Enable autoflush on STDOUT.
  89. print @_; # Print the prompt.