Subversion Repositories gelsvn

Rev

Rev 198 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 198 Rev 217
Line 214... Line 214...
214
          }
214
          }
215
          if (/^endif\s*/) {
215
          if (/^endif\s*/) {
216
            $in_condition--;
216
            $in_condition--;
217
          }
217
          }
218
 
218
 
219
          if (   /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS))\s*\+=\s*/
219
          if (   /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS|LIBADD|LDADD))\s*\+=\s*/
220
              || /(^CLEANFILES)\s*\+=\s*/
220
              || /(^CLEANFILES)\s*\+=\s*/
221
              || /(^EXTRA_DIST)\s*\+=\s*/
221
              || /(^EXTRA_DIST)\s*\+=\s*/
222
             ) {
222
             ) {
223
 
223
 
224
            if ($in_condition) {
224
            if ($in_condition) {
Line 323... Line 323...
323
 
323
 
324
      if (open($pfh, "$outdir/$local")) {
324
      if (open($pfh, "$outdir/$local")) {
325
        print $fh "## $local", $crlf;
325
        print $fh "## $local", $crlf;
326
 
326
 
327
        my($look_for_libs) = 0;
327
        my($look_for_libs) = 0;
-
 
328
        my($prev_line) = undef;
328
 
329
 
329
        while (<$pfh>) {
330
        while (<$pfh>) {
330
          # Don't emit comments
331
          # Don't emit comments
331
          next if (/^#/);
332
          next if (/^#/);
332
 
333
 
Line 343... Line 344...
343
            if (/^$inc_pattern\s*\+=\s*/ || /^$pkg_pattern\s*\+=\s*/) {
344
            if (/^$inc_pattern\s*\+=\s*/ || /^$pkg_pattern\s*\+=\s*/) {
344
              $_ =~ s/^$project_name/nobase/;
345
              $_ =~ s/^$project_name/nobase/;
345
            }
346
            }
346
          }
347
          }
347
 
348
 
348
          if (   /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS))\s*\+=\s*/
349
          if (   /(^[a-zA-Z][a-zA-Z0-9_]*_(PROGRAMS|LIBRARIES|LTLIBRARIES|LISP|PYTHON|JAVA|SCRIPTS|DATA|SOURCES|HEADERS|MANS|TEXINFOS|LIBADD|LDADD))\s*\+=\s*/
349
              || /(^CLEANFILES)\s*\+=\s*/
350
              || /(^CLEANFILES)\s*\+=\s*/
350
              || /(^EXTRA_DIST)\s*\+=\s*/
351
              || /(^EXTRA_DIST)\s*\+=\s*/
351
             ) {
352
             ) {
352
            if (!defined ($seen{$1})) {
353
            if (!defined ($seen{$1})) {
353
              $seen{$1} = 1;
354
              $seen{$1} = 1;
Line 389... Line 390...
389
          }
390
          }
390
          if (/_LDADD = \\$/ || /_LIBADD = \\$/) {
391
          if (/_LDADD = \\$/ || /_LIBADD = \\$/) {
391
            $look_for_libs = 1;
392
            $look_for_libs = 1;
392
          }
393
          }
393
 
394
 
-
 
395
          ## I have introduced a one line delay so that I can simplify
-
 
396
          ## the automake template.  If our current line is empty, then
-
 
397
          ## we will remove the trailing backslash before printing the
-
 
398
          ## previous line.  Automake is horribly unforgiving so we must
-
 
399
          ## avoid this situation at all cost.
-
 
400
          if (defined $prev_line) {
-
 
401
            $prev_line =~ s/\s*\\$// if ($_ =~ /^\s*$/);
-
 
402
            print $fh $prev_line;
-
 
403
          }
-
 
404
          $prev_line = $_;
-
 
405
        }
-
 
406
        ## The one line delay requires that we print out the previous
-
 
407
        ## line (if there was one) when we reach the end of the file.
-
 
408
        if (defined $prev_line) {
-
 
409
          $prev_line =~ s/\s*\\$//;
394
          print $fh $_;
410
          print $fh $prev_line;
395
        }
411
        }
396
 
412
 
397
        close($pfh);
413
        close($pfh);
398
        unlink("$outdir/$local");
414
        unlink("$outdir/$local");
399
        print $fh $crlf;
415
        print $fh $crlf;