r5629 - in trunk/gta02-core: . components scripts
werner at docs.openmoko.org
werner at docs.openmoko.org
Sat Sep 12 17:37:22 CEST 2009
Author: werner
Date: 2009-09-12 17:37:21 +0200 (Sat, 12 Sep 2009)
New Revision: 5629
Modified:
trunk/gta02-core/Makefile
trunk/gta02-core/components/INFO
trunk/gta02-core/scripts/Makefile
trunk/gta02-core/scripts/mkdsv
Log:
The "dsv" system now supports multiple data sheets per component multiple
aliases per data sheet.
- scripts/mkdsv: converted "alias" to a list, so that a data sheet can use
multiple aliases
- scripts/mkdsv: a component can now have multiple data sheets, each with its
own aliases
- scripts/mkdsv: added option -d to print the DSV_HOME directory
- Makefile, scripts/Makefile: added target "dsv-rebuild" to remove and then
rebuild all the local scripts
- components/INFO: dsv-lcm now shows the LCM data sheet
- components/INFO: dsv-td028ttec1 now shows the LCM's data sheet instead of the
connector's
Modified: trunk/gta02-core/Makefile
===================================================================
--- trunk/gta02-core/Makefile 2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/Makefile 2009-09-12 15:37:21 UTC (rev 5629)
@@ -1,5 +1,5 @@
.PHONY: all gen generate gv sch brd update upload xpdf bom-by-ref
-.PHONY: dsv
+.PHONY: dsv dsv-rebuild
UPLOAD=werner at sita.openmoko.org:public_html/gta02-core/
COPY=rsync -e ssh --progress
@@ -48,3 +48,6 @@
dsv:
$(MAKE) -C scripts dsv
+
+dsv-rebuild:
+ $(MAKE) -C scripts dsv-rebuild
Modified: trunk/gta02-core/components/INFO
===================================================================
--- trunk/gta02-core/components/INFO 2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/components/INFO 2009-09-12 15:37:21 UTC (rev 5629)
@@ -2,10 +2,14 @@
# Tags:
#
# S Symbol name (must be first)
-# A Alias (can be project-specific)
+# A Alias (can be project-specific; multiple alias tags are possible)
# M package Marking
# D Data sheet URL
#
+# If a component has multiple sheets, do an S-A*-D sequence for the first one,
+# then A-A*-D sequences for the rest. Only the first one will have the symbol's
+# name.
+#
# NAND, single gate (SN74AUP1G00DCK)
S: 74x1g00
@@ -192,10 +196,10 @@
# LCM and its connector
S: td028ttec1
+A: lcm
+D: http://www.cip.physik.uni-muenchen.de/~Wolfgang.Draxinger/stuff/openmoko/TD028TTEC1.pdf
A: lcm-conn
D: http://www.hirose.co.jp/cataloge_hp/e58613007.pdf
-#A: lcm
-D: http://www.cip.physik.uni-muenchen.de/~Wolfgang.Draxinger/stuff/openmoko/TD028TTEC1.pdf
# GPS Coaxial Connector (U.FL-R-SMT-1)
S: coax
@@ -257,4 +261,3 @@
#S: FILTER
#A: glamo-bead
#D: http://www.inpaq.com.tw/en/specification/Specification-MCB-S&B%20Series-Updated20090331.pdf
-
Modified: trunk/gta02-core/scripts/Makefile
===================================================================
--- trunk/gta02-core/scripts/Makefile 2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/scripts/Makefile 2009-09-12 15:37:21 UTC (rev 5629)
@@ -1,4 +1,4 @@
-.PHONY: all dsv
+.PHONY: all dsv dsv-rebuild
all:
@echo "make what ?" 1>&2
@@ -6,3 +6,7 @@
dsv:
../scripts/mkdsv ../components/INFO
+
+dsv-rebuild:
+ rm `../scripts/mkdsv -d`/bin/dsv-*
+ ../scripts/mkdsv ../components/INFO
Modified: trunk/gta02-core/scripts/mkdsv
===================================================================
--- trunk/gta02-core/scripts/mkdsv 2009-09-12 07:34:02 UTC (rev 5628)
+++ trunk/gta02-core/scripts/mkdsv 2009-09-12 15:37:21 UTC (rev 5629)
@@ -33,32 +33,43 @@
$ds_dir = "$DSV_HOME/ds/$sym";
$url =~ /[^\/?&]*$/;
$name = $&;
- if (-r "$ds_dir/$name" && -x "$bin_dir/dsv-$sym") {
- return unless defined $alias;
- return if -x "$bin_dir/dsv-$alias";
- }
- &mkdir($ds_dir);
local ($p) = "$ds_dir/$name";
- if (system("wget -nv -O \"$p-tmp\" \"$url\"")) {
- print STDERR "FAILED: $sym -> $url\n";
- } else {
- rename("$p-tmp", $p) || die "rename: $!\n";
+
+ if (!-r "$p") {
+ &mkdir($ds_dir);
+ if (system("wget -nv -O \"$p-tmp\" \"$url\"")) {
+ print STDERR "FAILED: $sym -> $url\n";
+ } else {
+ rename("$p-tmp", $p) || die "rename: $!\n";
+ }
}
- &mkbin("$bin_dir/dsv-$sym", $p);
- &mkbin("$bin_dir/dsv-$alias", $p) if defined $alias;
+ if (!-x "$bin_dir/dsv-$sym") {
+ print STDERR "adding dsv-$sym\n";
+ &mkbin("$bin_dir/dsv-$sym", $p);
+ }
+ for (@alias) {
+ if (!-x "$bin_dir/dsv-$_") {
+ print STDERR "adding dsv-$_\n";
+ &mkbin("$bin_dir/dsv-$_", $p);
+ }
+ }
}
sub flush
{
&dl if defined($sym) && defined($url);
- undef $sym;
- undef $alias;
+ undef @alias;
undef $url;
}
+if ($ARGV[0] eq "-d") {
+ print "$DSV_HOME\n";
+ exit(0);
+}
+
&mkdir("$DSV_HOME");
&mkdir("$DSV_HOME/ds");
&mkdir("$DSV_HOME/bin");
@@ -70,9 +81,11 @@
&flush if defined $sym;
$sym = $1;
} elsif (/^A:\s+(\S+)\s*$/) {
- $alias = $1;
+ push(@alias, $1);
} elsif (/^D:\s+(.*?)\s*$/) {
$url = $1 unless defined $url;
+ die unless defined $sym;
+ &flush;
} elsif (/^M:\s+(.*?)\s*$/) {
# ignore
} else {
More information about the commitlog
mailing list