1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-12-29 04:55:32 +02:00

fpd2pdf/fpdoc: added option -a module to manually add modules

- fpdoc (usage, main): new option  -a module  to add modules
- fpdoc: separated availability checking from mapping of component
  references to modules
This commit is contained in:
Werner Almesberger 2011-03-23 17:42:37 -03:00
parent 47b53c8ef3
commit e92f458b86

View File

@ -14,11 +14,19 @@
sub usage
{
print STDERR "usage: $0 pro-file pdf-file\n";
print STDERR "usage: $0 [-a module ...] pro-file pdf-file\n\n";
print STDERR " -a module add the specified module\n";
exit(1);
}
while ($ARGV[0] eq "-a") {
shift(@ARGV);
&usage unless @ARGV;
$need{shift @ARGV} = 1;
}
&usage if $ARGV[0] =~ /^-/;
&usage unless @ARGV == 2;
$pro = $ARGV[0];
@ -61,9 +69,11 @@ do "pos2fab" || die "pos2fab: $!";
#
for (@order) {
my $fp = $fp{$_};
die "don't have $fp" unless defined $fpd{$fp};
$need{$fp} = 1;
$need{$fp{$_}} = 1;
}
for (keys %need) {
die "don't have $_" unless defined $fpd{$_};
}
exec "fpd2pdf", "-o", $out, map { "$fpd{$_}:$_" } sort keys %need;