--- am_edit	2001/12/13 08:16:28	1.292
+++ am_edit	2001/12/28 09:49:46
@@ -253,7 +253,7 @@
         }
         if ($important{$program}) {
             local %source_dict = ();
-            for $source (split(/[\034\s]+/, $sources{$program})) {
+            for $source (split(/[\036\034\s]+/, $sources{$program})) {
                 $source_dict{$source} = 1;
             }
             for $source (@cleanfiles) {
@@ -326,7 +326,7 @@

         my $new = "";

-        my @list = split(/[\034\s]+/, $realObjs{$program});
+        my @list = split(/[\036\034\s]+/, $realObjs{$program});

         if (!$kdeopts{"nofinal"} && @list > 1 && $finalObjs{$program}) {

@@ -348,7 +348,7 @@
     appendLines($final_install_lines . "install-am");
     appendLines($nofinal_lines . "all-am");
     appendLines($nofinal_install_lines . "install-am");
-
+
     my $lookup = 'DEP_FILES\s*=([^\n]*)';
     if ($MakefileData =~ /\n$lookup\n/o) {
         $depfiles = $1;
@@ -384,7 +384,7 @@
 	substituteLine($lookup, "install-data-am: " . $newdeps);
       }
     }
-
+
     my $lines = "";

     foreach $add (keys %target_adds) {
@@ -400,7 +400,7 @@
     }

     my $found = 1;
-
+
     while ($found) {
         if ($MakefileData =~ m/\n(.*)\$\(CXXFLAGS\)(.*)\n/) {
             my $vor = $1;   # "vor" means before in German
@@ -468,6 +468,7 @@
     # Remove the line continuations, but keep them marked
     # Note: we lose the trailing spaces but that's ok.
     $MakefileData =~ s/\\\s*\n\s*/\034/g;
+    $MakefileData =~ s/\@AMDEPBACKSLASH\@\s*\n\s*/\036/g;

     # If we've processed the file before...
     restoreMakefile ()      if ($MakefileData =~ /$progId/);
@@ -484,7 +485,7 @@
     $kdeopts{"nofinal"} = !$use_final; # default

     if ($MakefileData =~ /\nKDE_OPTIONS\s*=\s*([^\n]*)\n/) {
-        local @kde_options = split(/[\s\034]/, $1);
+        local @kde_options = split(/[\s\034\036]/, $1);
         if (grep(/^foreign$/, @kde_options)) {
             push(@foreignfiles, $makefileDir . "/");
             return 0; # don't touch me
@@ -522,14 +523,14 @@
 	}
     }

-    while ($MakefileData =~ /\n(\S*)_OBJECTS\s*=[ \t\034]*([^\n]*)\n/g) {
+    while ($MakefileData =~ /\n(\S*)_OBJECTS\s*=[ \t\034\036]*([^\n]*)\n/g) {

         my $program = $1;
         my $objs = $2; # safe them

         my $ocv = 0;

-        my @objlist = split(/[\s\034]+/, $objs);
+        my @objlist = split(/[\s\034\036]+/, $objs);
         foreach $obj (@objlist) {
             if ($obj =~ /\$\((\S+)\)/ ) {
                 my $variable = $1;
@@ -548,17 +549,17 @@

         print STDOUT "found program $program\n" if ($verbose);
         push(@programs, $program);
-
+
         $realObjs{$program} = $objs;
-
+
         if ($MakefileData =~ /\n$sourceprogram\_SOURCES\s*=\s*(.*)\n/) {
             $sources{$program} = $1;
-        }
+        }
         else {
             $sources{$program} = "";
             print STDERR "found program with no _SOURCES: $program\n";
         }
-
+
         my $realprogram = $program;
         $realprogram =~ s/_/./g; # unmask to regexp
         if ($MakefileData =~ /\n($realprogram)(\$\(EXEEXT\)?)?:.*\$\($program\_OBJECTS\)/) {
@@ -568,19 +569,19 @@
             $realname{$program} = "";
         }
     }
-
+
     my $lookup = '\nDEPDIR\s*=.*';
     if ($MakefileData !~ /($lookup)\n/o) {
         $lookup = '\nbindir\s*=.*';
         if ($MakefileData =~ /($lookup)\n/) {
             substituteLine ($lookup, "DEPDIR = .deps\n$1");
         }
-    }
+    }

     my @marks = ('MAINTAINERCLEANFILES', 'CLEANFILES', 'DISTCLEANFILES');
     foreach $mark (@marks) {
         while ($MakefileData =~ /\n($mark)\s*=\s*([^\n]*)/g) {
-            foreach $file (split('[\034\s]', $2)) {
+            foreach $file (split('[\036\034\s]', $2)) {
                 $file =~ s/\.\///;
                 push(@cleanfiles, $file);
             }
@@ -589,7 +590,7 @@

     my $localTag = 0;
     $localTag++ if ($MakefileData =~ /\ninstall-\S+-local:/);
-
+
     return (!$errorflag);
 }

@@ -606,7 +607,7 @@
     my $headerStr = $2;
     removeLine ($lookup, $1);

-    $headerStr =~ tr/\034/ /;
+    $headerStr =~ tr/\034\036/  /;
     my @headerlist = split(' ', $headerStr);

     foreach $dir (@headerlist)
@@ -641,7 +642,7 @@

         my $mocsources = "";

-        my @progsources = split(/[\s\034]+/, $sources{$program});
+        my @progsources = split(/[\s\034\036]+/, $sources{$program});
         my %sourcelist = ();

         foreach $source (@progsources) {
@@ -667,7 +668,7 @@
             my $mocfiles_in = ($suffix eq $cxxsuffix) &&
               defined($depedmocs{$program});

-            my @sourcelist = split(/[\s\034]+/, $sourcelist{$suffix});
+            my @sourcelist = split(/[\s\034\036]+/, $sourcelist{$suffix});

             if ((@sourcelist == 1 && !$mocfiles_in) || $suffix_is_cxx != 1 ) {

@@ -711,7 +712,7 @@
                     }
                 }
             }
-
+
             $handling .= "\n";
             $handling .= "\t\@echo 'creating $program.all_$suffix.$suffix ...'; \\\n";
             $handling .= "\trm -f $program.all_$suffix.files $program.all_$suffix.final; \\\n";
@@ -800,7 +801,7 @@
         # Not automoc so read the list of files supplied which
         # should be .moc files.

-        $postEqual =~ tr/\034/ /;
+        $postEqual =~ tr/\034\036/  /;

         # prune out extra headers - This also checks to make sure that
         # the list is valid.
@@ -832,7 +833,7 @@
 # Errors are logged in the global $errorflags
 sub tag_AUTOMAKE ()
 {
-    my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\s\034]+\$\(AUTOMAKE\)(.*)';
+    my $lookup = '.*cd \$\(top_srcdir\)\s+&&[\s\034\036]+\$\(AUTOMAKE\)(.*)';
     return 1    if ($MakefileData !~ /\n($lookup)\n/);
     print STDOUT "AUTOMAKE processing <$1>\n"        if ($verbose);

@@ -906,7 +907,7 @@

 sub tag_IDLFILES ()
 {
-    my @psources = split(/[\034\s]+/, $sources{$program});
+    my @psources = split(/[\034\036\s]+/, $sources{$program});
     my $dep_lines = "";
     my @cppFiles = ();

@@ -919,7 +920,7 @@
             my $qs = quotemeta($source);
             $sources{$program} =~ s/$qs//;
             $sources_changed{$program} = 1;
-
+
             print STDOUT "adding IDL file $source\n" if ($verbose);

             $source =~ s/\.(stub|skel)$//;
@@ -1007,7 +1008,7 @@

 sub tag_UIFILES ()
 {
-    my @psources = split(/[\034\s]+/, $sources{$program});
+    my @psources = split(/[\034\036\s]+/, $sources{$program});
     my $dep_lines = "";
     my @depFiles = ();

@@ -1164,7 +1165,7 @@
                'hi64' => 'hicolor/64x64',
                'hisc' => 'hicolor/scalable'
               );
-
+
             $newfile =~ s@.*-($appname\.(png|xpm?))@$1@;

             if (! defined $dir_hash{$prefix}) {
@@ -1335,7 +1336,7 @@
     }
     else
     {
-        $tmp =~ s/\034/ /g;
+        $tmp =~ s/[\034\036]/ /g;
         $pofiles = $tmp;
     }
     return 1    if (!$pofiles);        # Nothing to do
@@ -1442,7 +1443,7 @@
     my @marks = ("EXTRA_DIST", "DIST_COMMON", '\S*_SOURCES', '\S*_HEADERS', 'MAINTAINERCLEANFILES', 'CLEANFILES', 'DISTCLEANFILES', '\S*_OBJECTS');
     foreach $mark (@marks) {
         while ($MakefileData =~ /\n($mark)\s*=\s*([^\n]*)/g) {
-            foreach $file (split('[\034\s]', $2)) {
+            foreach $file (split('[\036\034\s]', $2)) {
                 $file =~ s/\.\///;
                 $foundfiles{$file} = 0 if (defined $foundfiles{$file});
             }
@@ -1519,14 +1520,14 @@
     }
     else
     {
-        $tmp =~ s/\034/ /g;
+        $tmp =~ s/[\034\036]/ /g;
 	$tmp =~ s/^\S*\s*-\s*//;
         $files = $tmp;
     }
     goto nodocs if (!$files);        # Nothing to do

     if ($files =~ /(^| )index\.docbook($| )/) {
-
+
       my $lines = "";
       my $lookup = 'MEINPROC\s*=';
       if ($MakefileData !~ /\n($lookup)/) {
@@ -1786,7 +1787,7 @@
     my $moc_class_headers = "";
     foreach $program (@programs) {
 	my $mocs = "";
-	my @progsources = split(/[\s\034]+/, $sources{$program});
+	my @progsources = split(/[\s\034\036]+/, $sources{$program});
 	my @depmocs = split(' ', $depedmocs{$program});
 	my %shash = (), %mhash = ();
 	@shash{@progsources} = 1;  # we are only interested in the existence
@@ -1839,7 +1840,7 @@
 	    $appl .= "\t\techo '_UNLOAD($program)' >> $srcfile ;\\\n";
 	    $appl .= "\telse echo > $srcfile; fi\n";
   	    $appl .= "\n";
-
+
 	    $realObjs{$program} .= " \034" . $objfile . " ";
 	    $sources{$program} .= " $srcfile";
             $sources_changed{$program} = 1;
@@ -1865,6 +1866,7 @@

     print FILEOUT "\# $progId - " . '$Revision: 1.292 $ '  . "\n";
     $MakefileData =~ s/\034/\\\n\t/g;    # Restore continuation lines
+    $MakefileData =~ s/\036/\@AMDEPBACKSLASH\@\n\t/g;    # Restore continuation lines
     print FILEOUT $MakefileData;
     close FILEOUT;
 }
@@ -1878,6 +1880,7 @@
     my ($lookup, $old) = @_;

     $old =~ s/\034/\\\n#>- /g;          # Fix continuation lines
+    $old =~ s/\036/\@AMDEPBACKSLASH\@\n#>- /g;          # Fix continuation lines
     $MakefileData =~ s/\n$lookup/\n#>\- $old/;
 }

@@ -1893,7 +1896,9 @@
     if ($MakefileData =~ /\n($lookup)/) {
       $old = $1;
       $old =~ s/\034/\\\n#>\- /g;         # Fix continuation lines
+      $old =~ s/\036/\@AMDEPBACKSLASH\@\n#>- /g;          # Fix continuation lines
       $new =~ s/\034/\\\n\t/g;
+      $new =~ s/\036/\@AMDEPBACKSLASH\@\n\t/g;
       my $newCount = ($new =~ tr/\n//) + 1;
       $MakefileData =~ s/\n$lookup/\n#>- $old\n#>\+ $newCount\n$new/;
     } else {
@@ -1908,6 +1913,7 @@
 {
   my ($new) = @_;
   $new =~ s/\034/\\\n\t/g;        # Fix continuation lines
+  $new =~ s/\036/\@AMDEPBACKSLASH\@\n\t/g;
   my $newCount = ($new =~ tr/\n//) + 1;
   $MakefileData .= "\n#>\+ $newCount\n$new";
 }
@@ -1917,18 +1923,18 @@
 # Restore the Makefile.in to the state it was before we fiddled with it
 sub restoreMakefile ()
 {
-    $MakefileData =~ s/# $progId[^\n\034]*[\n\034]*//g;
+    $MakefileData =~ s/# $progId[^\n\034\036]*[\n\034\036]*//g;
     # Restore removed lines
-    $MakefileData =~ s/([\n\034])#>\- /$1/g;
+    $MakefileData =~ s/([\n\034\036])#>\- /$1/g;
     # Remove added lines
-    while ($MakefileData =~ /[\n\034]#>\+ ([^\n\034]*)/)
+    while ($MakefileData =~ /[\n\034\036]#>\+ ([^\n\034\036]*)/)
     {
         my $newCount = $1;
         my $removeLines = "";
         while ($newCount--) {
-            $removeLines .= "[^\n\034]*([\n\034]|)";
+            $removeLines .= "[^\n\034\036]*([\n\034\036]|)";
         }
-        $MakefileData =~ s/[\n\034]#>\+.*[\n\034]$removeLines/\n/;
+        $MakefileData =~ s/[\n\034\036]#>\+.*[\n\034\036]$removeLines/\n/;
     }
 }

