werner2101 / spicelib

Tools to collect and test spice models
http://www.h-renrew.de/h/spicelib/doc/index.html
BSD 2-Clause "Simplified" License
34 stars 10 forks source link

build errors of ltc_opamps and national_opamps #6

Closed werner2101 closed 14 years ago

werner2101 commented 14 years ago

There's something wrong with the create_xx targets for ltc and national opamps. SHA1: 678e6585458180859c5afa85ad06b9d4a87e3a24

werner@linux-m82i:~/oss/geda/spicelib> rm -r unpack/ltc/
You have mail in /var/spool/mail/werner
werner@linux-m82i:~/oss/geda/spicelib> rm -r model_library/ltc/
werner@linux-m82i:~/oss/geda/spicelib> rm -r model_tests/ltc/
werner@linux-m82i:~/oss/geda/spicelib> scons test_ltc_opamps
scons: Reading SConscript files ...
Mkdir("unpack/ltc")
Mkdir("model_library/ltc/opamps")
scons: done reading SConscript files.
scons: Building targets ...
scons: *** Source `model_library/ltc/opamps/LT1214.MOD' not found, needed by target `model_tests/ltc/opamps/LT1214_LTC00017/status.htm'.  Stop.
scons: building terminated because of errors.

werner@linux-m82i:~/oss/geda/spicelib> scons test_national_opamps
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: *** Source `model_library/national/opamps/LMC6062B.MOD' not found, needed by target `model_tests/national/opamps/LMC6062B_LM00064/status.htm'.  Stop.
scons: building terminated because of errors.
asomers commented 14 years ago

This is normal. I just haven't documented it yet (Need to redo the README). The problem is that before the models are downloaded and unpacked, scons doesn't know what models there are to create. The 'normal' solution to this problem would be to enter into scons the names of all the files that should come from the downloaded zips. However, that's way too much work and it can change all the time. Instead, the names are read from the zips themselves. This means that you must use scons in (at least) two phases: $ scons unpack $ scons test

With the old make system, skipping a phase meant that the following phase simply wouldn't do any work, because the targets were generated based on the previous phase's output. However, the test phase targets can't be accurately generated that way: consider that the indexfile may specify multiple parts that use the same model, or no parts that use a certain model. That's why the test phase targets have to be generated based on the indexfile, not on the create phase's outputs.

I hope this makes sense. I will try to fill in the README with this information.

werner2101 commented 14 years ago

Updating the README is enough. Thanks.