diff 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
line wrap: on
line diff
--- a/kdiff3/admin/am_edit	Mon Jan 31 22:30:47 2005 +0000
+++ b/kdiff3/admin/am_edit	Mon Apr 10 08:40:51 2006 +0000
@@ -351,7 +351,7 @@
     my $tmp = "force-reedit:\n";
     $tmp   .= "\t$automkCall\n\tcd \$(top_srcdir) && perl $thisProg $printname\n\n";
     appendLines($tmp);
-    
+
     make_bcheck_target();
     make_meta_classes();
     tag_COMPILE_FIRST();
@@ -422,10 +422,6 @@
       substituteLine($lookup, "RECURSIVE_TARGETS = $1 nmcheck-recursive bcheck-recursive");
     }
 
-    my $cvs_lines = "cvs-clean:\n";
-    $cvs_lines .= "\t\$(MAKE) admindir=\$(top_srcdir)/admin -f \$(top_srcdir)/admin/Makefile.common cvs-clean\n";
-    appendLines($cvs_lines);
-
     $cvs_lines  = "kde-rpo-clean:\n";
     $cvs_lines .= "\t-rm -f *.rpo\n";
     appendLines($cvs_lines);
@@ -483,6 +479,7 @@
             $MakefileData =~ s/$lookup/$replacement/;
             $lookup =~ s/\\\$\\\(CXXFLAGS\\\)/\\\$\\\(KCXXFLAGS\\\)/;
             $replacement = "$stuff_before\$(KCXXFLAGS) \$(KDE_CXXFLAGS)$stuff_after";
+            next if ($stuff_before =~ /\$\(KDE_CXXFLAGS\)/ or $stuff_after =~ /\$\(KDE_CXXFLAGS\)/);
             substituteLine($lookup, $replacement);
         } else {
             $found = 0;
@@ -634,7 +631,7 @@
 		if ($pre eq '' && exists($varcontent{$variable})) {
 		    my @addlist = split(/[\034\s]+/, $varcontent{$variable});
 		    push(@objlist, @addlist);
-                } elsif ($variable !~ 'OBJEXT') {
+                } elsif ($variable !~ 'OBJEXT' && $variable !~ /am__objects_\d+/ ) {
                     $ocv = 1;
 		}
             }
@@ -875,8 +872,9 @@
                 $lines .= "\techo 'int main(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}.la.$cxxsuffix\n";
 
                 $lines .= "\n${kdeinit}_dummy.$cxxsuffix:\n";
-                $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' > ${kdeinit}_dummy.$cxxsuffix; \\\n";
-                $lines .= "\techo 'extern \"C\" int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}_dummy.$cxxsuffix\n";
+                $lines .= "\techo '#include <kdemacros.h>' > ${kdeinit}_dummy.$cxxsuffix; \\\n";
+                $lines .= "\techo 'extern \"C\" int kdemain(int argc, char* argv[]);' >> ${kdeinit}_dummy.$cxxsuffix; \\\n";
+                $lines .= "\techo 'extern \"C\" KDE_EXPORT int kdeinitmain(int argc, char* argv[]) { return kdemain(argc,argv); }' >> ${kdeinit}_dummy.$cxxsuffix\n";
 
                 push(@cleanfiles, "${kdeinit}.la.$cxxsuffix");
                 push(@cleanfiles, "${kdeinit}_dummy.$cxxsuffix");
@@ -1147,6 +1145,9 @@
     print STDOUT "AUTOMAKE processing <$1>\n"        if ($verbose);
 
     my $newLine = $1."\n\tcd \$(top_srcdir) && perl $thisProg $printname";
+
+    # automake 1.8.x adds another automake call. *sigh*
+    $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/;
     substituteLine ($lookup, $newLine);
     $automkCall = $1;
 
@@ -1262,7 +1263,7 @@
             if ($allidls !~ /$source\_kidl/) {
                 
                 $use_ng = ($MakefileData =~ /\n$source\_DCOPIDLNG\s*=\s*(\S+)\n/);
-                $dcopidl =  $use_ng ? "\$(DCOPIDLNG)" : "\$(DCOPIDL)";
+                $dcopidl =  $use_ng ? "KDECONFIG=\"\$(KDECONFIG)\" \$(DCOPIDLNG)" : "\$(DCOPIDL)";
 
                 $dep_lines .= "$source.kidl: $sourcedir$source.h \$(DCOP_DEPENDENCIES)\n";
                 $dep_lines .= "\t$dcopidl $sourcedir$source.h > $source.kidl || ( rm -f $source.kidl ; false )\n";
@@ -1365,14 +1366,19 @@
                     my ($mangled_source) = $source;
                     $mangled_source =~ s/[^A-Za-z0-9]/_/g;  # get rid of garbage
                     $dep_lines .= "\t\$(UIC) -tr \${UIC_TR} -i $source.h $sourcedir$source.ui > $source.$cxxsuffix.temp ; ret=\$\$?; \\\n";
-                    $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";
+                    $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";
 		    $dep_lines .= "\trm -f $source.$cxxsuffix.temp ;\\\n";
                 } else {
                     $dep_lines .= "\t\$(UIC) -i $source.h $sourcedir$source.ui > $source.$cxxsuffix; ret=\$\$?; \\\n";
                 }
 		$dep_lines .= "\tif test \"\$\$ret\" = 0; then echo '#include \"$source.moc\"' >> $source.$cxxsuffix; else rm -f $source.$cxxsuffix ; exit \$\$ret ; fi\n\n";
                 $dep_lines .= "$source.h: $sourcedir$source.ui\n";
-                $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n\n";
+                $dep_lines .= "\trm -rf $source.h;\n";
+                if (!$kdeopts{"qtonly"}) {
+                    $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";
+                } else {
+                    $dep_lines .= "\t\$(UIC) -o $source.h $sourcedir$source.ui\n";
+                }
                 $dep_lines .= "$source.moc: $source.h\n";
                 $dep_lines .= "\t\$(MOC) $source.h -o $source.moc\n";
 
@@ -2271,7 +2277,7 @@
            "\t        echo \"\$\$i\"; \\\n" . 
            "\t        if ! ";
     $t .=  $cxxsuffix eq "KKK" ?
-           "\$(CXX) \$(DEFS) -I. -I\$(srcdir) -I\$(top_builddir) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(KDE_CXXFLAGS) " :
+           "\$(CXX) \$(DEFS) -I. -I\$(srcdir) -I\$(top_builddir) \$(INCLUDES) \$(AM_CPPFLAGS) \$(CPPFLAGS) \$(CXXFLAGS) \$(KDE_CXXFLAGS) " :
            "\$(CXXCOMPILE) ";
     $t .=  " --dump-class-hierarchy -c \$\$i.bchecktest.cc; then \\\n" .
            "\t            rm -f \$\$i.bchecktest.cc; exit 1; \\\n" .