comparison kdiff3/admin/am_edit @ 69:8febbfb1148c

KDiff3 0.9.89
author joachim99
date Mon, 10 Apr 2006 08:40:51 +0000
parents efe33e938730
children 1184fc843210
comparison
equal deleted inserted replaced
68:d7cafcda8c99 69:8febbfb1148c
349 tag_SUBDIRS(); 349 tag_SUBDIRS();
350 350
351 my $tmp = "force-reedit:\n"; 351 my $tmp = "force-reedit:\n";
352 $tmp .= "\t$automkCall\n\tcd \$(top_srcdir) && perl $thisProg $printname\n\n"; 352 $tmp .= "\t$automkCall\n\tcd \$(top_srcdir) && perl $thisProg $printname\n\n";
353 appendLines($tmp); 353 appendLines($tmp);
354 354
355 make_bcheck_target(); 355 make_bcheck_target();
356 make_meta_classes(); 356 make_meta_classes();
357 tag_COMPILE_FIRST(); 357 tag_COMPILE_FIRST();
358 tag_FINAL() if (!$kdeopts{"nofinal"}); 358 tag_FINAL() if (!$kdeopts{"nofinal"});
359 359
419 $target_adds{ "nmcheck-am" } .= "nmcheck"; 419 $target_adds{ "nmcheck-am" } .= "nmcheck";
420 $lookup = 'RECURSIVE_TARGETS\s*=[ \t]*(.*)'; 420 $lookup = 'RECURSIVE_TARGETS\s*=[ \t]*(.*)';
421 if ($MakefileData =~ /\n$lookup/) { 421 if ($MakefileData =~ /\n$lookup/) {
422 substituteLine($lookup, "RECURSIVE_TARGETS = $1 nmcheck-recursive bcheck-recursive"); 422 substituteLine($lookup, "RECURSIVE_TARGETS = $1 nmcheck-recursive bcheck-recursive");
423 } 423 }
424
425 my $cvs_lines = "cvs-clean:\n";
426 $cvs_lines .= "\t\$(MAKE) admindir=\$(top_srcdir)/admin -f \$(top_srcdir)/admin/Makefile.common cvs-clean\n";
427 appendLines($cvs_lines);
428 424
429 $cvs_lines = "kde-rpo-clean:\n"; 425 $cvs_lines = "kde-rpo-clean:\n";
430 $cvs_lines .= "\t-rm -f *.rpo\n"; 426 $cvs_lines .= "\t-rm -f *.rpo\n";
431 appendLines($cvs_lines); 427 appendLines($cvs_lines);
432 $target_adds{"clean"} .= "kde-rpo-clean "; 428 $target_adds{"clean"} .= "kde-rpo-clean ";
481 my $lookup = quotemeta("$1\$(CXXFLAGS)$2"); 477 my $lookup = quotemeta("$1\$(CXXFLAGS)$2");
482 my $replacement = "$1\$(KCXXFLAGS)$2"; 478 my $replacement = "$1\$(KCXXFLAGS)$2";
483 $MakefileData =~ s/$lookup/$replacement/; 479 $MakefileData =~ s/$lookup/$replacement/;
484 $lookup =~ s/\\\$\\\(CXXFLAGS\\\)/\\\$\\\(KCXXFLAGS\\\)/; 480 $lookup =~ s/\\\$\\\(CXXFLAGS\\\)/\\\$\\\(KCXXFLAGS\\\)/;
485 $replacement = "$stuff_before\$(KCXXFLAGS) \$(KDE_CXXFLAGS)$stuff_after"; 481 $replacement = "$stuff_before\$(KCXXFLAGS) \$(KDE_CXXFLAGS)$stuff_after";
482 next if ($stuff_before =~ /\$\(KDE_CXXFLAGS\)/ or $stuff_after =~ /\$\(KDE_CXXFLAGS\)/);
486 substituteLine($lookup, $replacement); 483 substituteLine($lookup, $replacement);
487 } else { 484 } else {
488 $found = 0; 485 $found = 0;
489 } 486 }
490 } 487 }
632 my $pre = $1; 629 my $pre = $1;
633 my $variable = $2; 630 my $variable = $2;
634 if ($pre eq '' && exists($varcontent{$variable})) { 631 if ($pre eq '' && exists($varcontent{$variable})) {
635 my @addlist = split(/[\034\s]+/, $varcontent{$variable}); 632 my @addlist = split(/[\034\s]+/, $varcontent{$variable});
636 push(@objlist, @addlist); 633 push(@objlist, @addlist);
637 } elsif ($variable !~ 'OBJEXT') { 634 } elsif ($variable !~ 'OBJEXT' && $variable !~ /am__objects_\d+/ ) {
638 $ocv = 1; 635 $ocv = 1;
639 } 636 }
640 } 637 }
641 } 638 }
642 639
873 $lines .= "\n${kdeinit}.la.$cxxsuffix:\n"; 870 $lines .= "\n${kdeinit}.la.$cxxsuffix:\n";
874 $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' > ${kdeinit}.la.$cxxsuffix; \\\n"; 871 $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' > ${kdeinit}.la.$cxxsuffix; \\\n";
875 $lines .= "\techo 'int main(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}.la.$cxxsuffix\n"; 872 $lines .= "\techo 'int main(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}.la.$cxxsuffix\n";
876 873
877 $lines .= "\n${kdeinit}_dummy.$cxxsuffix:\n"; 874 $lines .= "\n${kdeinit}_dummy.$cxxsuffix:\n";
878 $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' > ${kdeinit}_dummy.$cxxsuffix; \\\n"; 875 $lines .= "\techo '#include <kdemacros.h>' > ${kdeinit}_dummy.$cxxsuffix; \\\n";
879 $lines .= "\techo 'extern \"C\" int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}_dummy.$cxxsuffix\n"; 876 $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' >> ${kdeinit}_dummy.$cxxsuffix; \\\n";
877 $lines .= "\techo 'extern \"C\" KDE_EXPORT int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}_dummy.$cxxsuffix\n";
880 878
881 push(@cleanfiles, "${kdeinit}.la.$cxxsuffix"); 879 push(@cleanfiles, "${kdeinit}.la.$cxxsuffix");
882 push(@cleanfiles, "${kdeinit}_dummy.$cxxsuffix"); 880 push(@cleanfiles, "${kdeinit}_dummy.$cxxsuffix");
883 881
884 # add dependency 882 # add dependency
1145 my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\034\s]+\$\(AUTOMAKE\)(.*)'; 1143 my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\034\s]+\$\(AUTOMAKE\)(.*)';
1146 return 1 if ($MakefileData !~ /\n($lookup)\n/); 1144 return 1 if ($MakefileData !~ /\n($lookup)\n/);
1147 print STDOUT "AUTOMAKE processing <$1>\n" if ($verbose); 1145 print STDOUT "AUTOMAKE processing <$1>\n" if ($verbose);
1148 1146
1149 my $newLine = $1."\n\tcd \$(top_srcdir) && perl $thisProg $printname"; 1147 my $newLine = $1."\n\tcd \$(top_srcdir) && perl $thisProg $printname";
1148
1149 # automake 1.8.x adds another automake call. *sigh*
1150 $newLine =~ s/;([\034\s]+cd\s+\$\(srcdir\)\s+&&[\034\s]+\$\(AUTOMAKE\).*)[\034\s]+\&\&[\034\s]+exit[\034\s]+0;([\034\s]+exit\s+1)/; \034 ( $1 ) || exit 1; echo \' cd \$(top_srcdir) && perl $thisProg \'; cd \$(top_srcdir) && perl $thisProg && exit 0; $2/;
1150 substituteLine ($lookup, $newLine); 1151 substituteLine ($lookup, $newLine);
1151 $automkCall = $1; 1152 $automkCall = $1;
1152 1153
1153 $lookup = '.*cd \$\(srcdir\)\s+&&[\034\s]+\$\(AUTOCONF\)(.*)'; 1154 $lookup = '.*cd \$\(srcdir\)\s+&&[\034\s]+\$\(AUTOCONF\)(.*)';
1154 if ($MakefileData =~ /\n($lookup)\n/) { 1155 if ($MakefileData =~ /\n($lookup)\n/) {
1260 } 1261 }
1261 1262
1262 if ($allidls !~ /$source\_kidl/) { 1263 if ($allidls !~ /$source\_kidl/) {
1263 1264
1264 $use_ng = ($MakefileData =~ /\n$source\_DCOPIDLNG\s*=\s*(\S+)\n/); 1265 $use_ng = ($MakefileData =~ /\n$source\_DCOPIDLNG\s*=\s*(\S+)\n/);
1265 $dcopidl = $use_ng ? "\$(DCOPIDLNG)" : "\$(DCOPIDL)"; 1266 $dcopidl = $use_ng ? "KDECONFIG=\"\$(KDECONFIG)\" \$(DCOPIDLNG)" : "\$(DCOPIDL)";
1266 1267
1267 $dep_lines .= "$source.kidl: $sourcedir$source.h \$(DCOP_DEPENDENCIES)\n"; 1268 $dep_lines .= "$source.kidl: $sourcedir$source.h \$(DCOP_DEPENDENCIES)\n";
1268 $dep_lines .= "\t$dcopidl $sourcedir$source.h > $source.kidl || ( rm -f $source.kidl ; false )\n"; 1269 $dep_lines .= "\t$dcopidl $sourcedir$source.h > $source.kidl || ( rm -f $source.kidl ; false )\n";
1269 1270
1270 $allidls .= $source . "_kidl "; 1271 $allidls .= $source . "_kidl ";
1363 $dep_lines .= "\techo '#include <kdialog.h>' > $source.$cxxsuffix\n"; 1364 $dep_lines .= "\techo '#include <kdialog.h>' > $source.$cxxsuffix\n";
1364 $dep_lines .= "\techo '#include <klocale.h>' >> $source.$cxxsuffix\n"; 1365 $dep_lines .= "\techo '#include <klocale.h>' >> $source.$cxxsuffix\n";
1365 my ($mangled_source) = $source; 1366 my ($mangled_source) = $source;
1366 $mangled_source =~ s/[^A-Za-z0-9]/_/g; # get rid of garbage 1367 $mangled_source =~ s/[^A-Za-z0-9]/_/g; # get rid of garbage
1367 $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui > $source.$cxxsuffix.temp ; ret=\$\$?; \\\n"; 1368 $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui > $source.$cxxsuffix.temp ; ret=\$\$?; \\\n";
1368 $dep_lines .= "\t\$(PERL) -pe \"s,\${UIC_TR}( \\\"\\\" ),QString::null,g\" $source.$cxxsuffix.temp | \$(PERL) -pe \"s,\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" | \$(PERL) -pe \"s,image([0-9][0-9]*)_data,img\\\$\$1_" . $mangled_source . ",g\" >> $source.$cxxsuffix ;\\\n"; 1369 $dep_lines .= "\t\$(PERL) -pe \"s,\${UIC_TR}( \\\"\\\" ),QString::null,g\" $source.$cxxsuffix.temp | \$(PERL) -pe \"s,\${UIC_TR}( \\\"\\\"\\, \\\"\\\" ),QString::null,g\" | \$(PERL) -pe \"s,image([0-9][0-9]*)_data,img\\\$\$1_" . $mangled_source . ",g\" | \$(PERL) -pe \"s,: QWizard\\(,: KWizard(,g\" >> $source.$cxxsuffix ;\\\n";
1369 $dep_lines .= "\trm -f $source.$cxxsuffix.temp ;\\\n"; 1370 $dep_lines .= "\trm -f $source.$cxxsuffix.temp ;\\\n";
1370 } else { 1371 } else {
1371 $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix; ret=\$\$?; \\\n"; 1372 $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix; ret=\$\$?; \\\n";
1372 } 1373 }
1373 $dep_lines .= "\tif test \"\$\$ret\" = 0; then echo '#include \"$source.moc\"' >> $source.$cxxsuffix; else rm -f $source.$cxxsuffix ; exit \$\$ret ; fi\n\n"; 1374 $dep_lines .= "\tif test \"\$\$ret\" = 0; then echo '#include \"$source.moc\"' >> $source.$cxxsuffix; else rm -f $source.$cxxsuffix ; exit \$\$ret ; fi\n\n";
1374 $dep_lines .= "$source.h: $sourcedir$source.ui\n"; 1375 $dep_lines .= "$source.h: $sourcedir$source.ui\n";
1375 $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n\n"; 1376 $dep_lines .= "\trm -rf $source.h;\n";
1377 if (!$kdeopts{"qtonly"}) {
1378 $dep_lines .= "\t\$(UIC) $sourcedir$source.ui | \$(PERL) -pi -e \"s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g\" >> $source.h ;\n";
1379 } else {
1380 $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n";
1381 }
1376 $dep_lines .= "$source.moc: $source.h\n"; 1382 $dep_lines .= "$source.moc: $source.h\n";
1377 $dep_lines .= "\t\$(MOC) $source.h -o $source.moc\n"; 1383 $dep_lines .= "\t\$(MOC) $source.h -o $source.moc\n";
1378 1384
1379 $rule_adds{"$source.$cxxsuffix"} = $dep_lines; 1385 $rule_adds{"$source.$cxxsuffix"} = $dep_lines;
1380 1386
2269 "\t echo \"int main() {return 0;}\" > \$\$i.bchecktest.cc ; \\\n" . 2275 "\t echo \"int main() {return 0;}\" > \$\$i.bchecktest.cc ; \\\n" .
2270 "\t echo \"#include \\\"\$\$i\\\"\" >> \$\$i.bchecktest.cc ; \\\n" . 2276 "\t echo \"#include \\\"\$\$i\\\"\" >> \$\$i.bchecktest.cc ; \\\n" .
2271 "\t echo \"\$\$i\"; \\\n" . 2277 "\t echo \"\$\$i\"; \\\n" .
2272 "\t if ! "; 2278 "\t if ! ";
2273 $t .= $cxxsuffix eq "KKK" ? 2279 $t .= $cxxsuffix eq "KKK" ?
2274 "\$(CXX) \$(DEFS) -I. -I\$(srcdir) -I\$(top_builddir) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(KDE_CXXFLAGS) " : 2280 "\$(CXX) \$(DEFS) -I. -I\$(srcdir) -I\$(top_builddir) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(CXXFLAGS) \$(KDE_CXXFLAGS) " :
2275 "\$(CXXCOMPILE) "; 2281 "\$(CXXCOMPILE) ";
2276 $t .= " --dump-class-hierarchy -c \$\$i.bchecktest.cc; then \\\n" . 2282 $t .= " --dump-class-hierarchy -c \$\$i.bchecktest.cc; then \\\n" .
2277 "\t rm -f \$\$i.bchecktest.cc; exit 1; \\\n" . 2283 "\t rm -f \$\$i.bchecktest.cc; exit 1; \\\n" .
2278 "\t fi ; \\\n" . 2284 "\t fi ; \\\n" .
2279 "\t echo \"\" >> \$\$i.bchecktest.cc.class; \\\n" . 2285 "\t echo \"\" >> \$\$i.bchecktest.cc.class; \\\n" .