Changeset 94


Ignore:
Timestamp:
04/27/07 16:37:37 (18 years ago)
Author:
kdeugau
Message:

/trunk

Add basic support for --define option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debbuild

    r93 r94  
    306306        } elsif (/^--showpkgs/) {
    307307          $cmdopts{type} = 'd'; # d for 'diagnostic' or 'debug' or 'dump'
     308        } elsif (/^--define/) {
     309          # nothing to do?  Can't see anything needed, we handle the actual definition later.
    308310        } else {
    309311          print "Long option $_ not handled\n";
     
    338340      if ($prevopt eq '--buildroot') {
    339341        $cmdbuildroot = $_;
     342      } elsif ($prevopt eq '--define') {
     343        my ($macro,$value) = (/([a-z0-9_.-]+)(?:\s+(.+))?/);
     344        if ($value) {
     345          $specglobals{$macro} = $value;
     346        } else {
     347          warn "WARNING:  missing value for macro $macro in --define!  Ignoring.\n";
     348        }
    340349      } elsif ($prevopt eq '-i') {
    341350        $srcpkg = $_;
Note: See TracChangeset for help on using the changeset viewer.