Hi ! Sylvere Teissier wrote: > Yann Guidon wrote: >>> man 3 getenv :-) >> here is the source code : >> http://ygdes.com/GHDL/ghdl_env/ >> It can only read integers but it's >> a great feature :-) I'm sure it will >> be useful to at least one subscriber here. > Other solution: use a script or program that does the following steps: > 1) create a temporary directory > 2) create a file config.conf in this directory from the arguments passed > to the script. > 3) cd to the temporary directory > 4) launch the executable compiled with ghdl > 5) the vhdl program can parse the file config.conf using relative path > from working directory and get the arguments/configuration > 6) finally remove the temporary dir > > The user run the script instead of runing directly the vhdl program. > The script can parse easily the command line arguments and create a > simple config.conf.
hmmm yes, it can work and seems portable. However that's quite complex, it adds a new layer of scripts and files... I have seen things like that in the past (even in a "professional" environment) and once started, scripts tend to accumulate on each others and become unmaintainable :-/ Imagine that a coworker has to collaborate or use or even modify your 1) VHDL program + 2) scripts / Makefiles, he will be turned off (particularly if he's a newbie). That is why the use of environment variables is a welcome simplification to everyday work, even if the package is not obvious to write. Once written, the complexity stays out of the sight of the developer, who does not need to make complex scripts that circumvent limitations. Yes, I'm all for complexity when it simplifies my life, and not the reverse ;-) yg -- http://ygdes.com / http://yasep.org _______________________________________________ Ghdl-discuss mailing list [email protected] https://mail.gna.org/listinfo/ghdl-discuss
