1. specifying include directories
There is a feature which I wish other versions had that would be invaluable for
testing various versions of large libraries. A command line switch for
specifying
the include directory to search for. I will have to port all my stuff to 4.0.
Often one version of Euphoria will not work with some versions of win32lib.ew
and
some versions of win32lib.ew will not work with ide.exw. There would be utility
in the ability to have this feature if it would be searched before the EUINC
variable. Sometimes software upgrades breaks existing software, lets save 4.0+
users from that headache.
What do you say Jeremy and friends? Is this something you are willing to put
into
the EUPHORIA programming interpreter?
Shawn Pringle
2. Re: specifying include directories
Shawn Pringle wrote:
>
> There is a feature which I wish other versions had that would be invaluable
> for
> testing various versions of large libraries. A command line switch for
> specifying the include directory to search for. I will have to port all my
> stuff to 4.0.
>
> Often one version of Euphoria will not work with some versions of win32lib.ew
> and some versions of win32lib.ew will not work with ide.exw. There would be
> utility in the ability to have this feature if it would be searched before
> the EUINC variable. Sometimes software upgrades breaks existing software,
> lets save 4.0+ users from that headache.
>
> What do you say Jeremy and friends? Is this something you are willing to put
> into the EUPHORIA programming interpreter?
Yes. There are two ways to do this. You can either create a euinc.conf
file with a list of directories, or specify directories right on the
command line with the -i switch before the file:
$ exu -i ~/foo app.exu
There's additional (possibly somewhat out of date) information about using
euinc.conf files here:
http://rapideuphoria.wiki.sourceforge.net/nix+config
It is the fact that we require 4.0 to do this that has caused some difficulties
with building on a system with only 3.x installed. I *think* these issues
have been solved.
Matt
3. Re: specifying include directories
Hi
Does this mean that the include location information will be available to your
program? Much like getenv, perhaps a getconf function, without actually having
to use the search list to hunt for the conf file?
Chris
4. Re: specifying include directories
ChrisBurch2 wrote:
>
> Hi
>
> Does this mean that the include location information will be available to
> your program? Much like getenv, perhaps a getconf function, without actually
> having to use the search list to hunt for the conf file?
That's not currently in there, but I suppose it could be. You can get the
information in the option switches that were passed on the command line.
Matt
5. Re: specifying include directories
Matt Lewis wrote:
>
> ChrisBurch2 wrote:
> >
> > Hi
> >
> > Does this mean that the include location information will be available to
> > your program? Much like getenv, perhaps a getconf function, without actually
> > having to use the search list to hunt for the conf file?
>
> That's not currently in there, but I suppose it could be. You can get the
> information in the option switches that were passed on the command line.
>
> Matt
I do not think that's entirely true. The parameters that are used by the
interpreter are consumed by it, from what I can tell in code and example. For
instance:
myprog.ex
---------
include misc.e
pretty_print(1, command_line(), {2})
$ exu -I /opt/eu40/include -D debug -D shareware hello.e John Doe
{
"/opt/euphoria-4.0/source/exu",
"/home/jeremy/hello.e",
"John",
"Doe"
}
--
Jeremy Cowgar
http://jeremy.cowgar.com
6. Re: specifying include directories
Jeremy Cowgar wrote:
>
> Matt Lewis wrote:
> >
> > ChrisBurch2 wrote:
> > >
> > > Hi
> > >
> > > Does this mean that the include location information will be available to
> > > your program? Much like getenv, perhaps a getconf function, without
> > > actually
> > > having to use the search list to hunt for the conf file?
> >
> > That's not currently in there, but I suppose it could be. You can get the
> > information in the option switches that were passed on the command line.
> >
> > Matt
>
> I do not think that's entirely true. The parameters that are used by the
> interpreter
> are consumed by it, from what I can tell in code and example. For instance:
>
> myprog.ex
> ---------
> }}}
<eucode>
> include misc.e
> pretty_print(1, command_line(), {2})
> </eucode>
{{{
>
> $ exu -I /opt/eu40/include -D debug -D shareware hello.e John Doe
> {
> "/opt/euphoria-4.0/source/exu",
> "/home/jeremy/hello.e",
> "John",
> "Doe"
> }
>
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>
That's the behavior that I would expect.
Maybe euinc.conf and command-line switches should set EUINC and EUDIR during the
duration of the program (which the program can then read) and then set it back
when finished?
That seems like the simplest solution.
--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.
"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare
j.
7. Re: specifying include directories
Jason Gade wrote:
>
> > $ exu -I /opt/eu40/include -D debug -D shareware hello.e John Doe
> > {
> > "/opt/euphoria-4.0/source/exu",
> > "/home/jeremy/hello.e",
> > "John",
> > "Doe"
> > }
> >
> > --
> > Jeremy Cowgar
> > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>
>
> That's the behavior that I would expect.
>
> Maybe euinc.conf and command-line switches should set EUINC and EUDIR during
> the duration of the program (which the program can then read) and then set it
> back when finished?
>
> That seems like the simplest solution.
>
Or maybe easier a function called include_paths() or something. that returns a
sequence that EU is looking in:
include_paths() -- {"c:\\euphoria\\include", "c:\\eulibs"}
--
Jeremy Cowgar
http://jeremy.cowgar.com
8. Re: specifying include directories
Jeremy Cowgar wrote:
>
> Matt Lewis wrote:
> >
> > ChrisBurch2 wrote:
> > >
> > > Hi
> > >
> > > Does this mean that the include location information will be available to
> > > your program? Much like getenv, perhaps a getconf function, without
> > > actually
> > > having to use the search list to hunt for the conf file?
> >
> > That's not currently in there, but I suppose it could be. You can get the
> > information in the option switches that were passed on the command line.
> >
> > Matt
>
> I do not think that's entirely true. The parameters that are used by the
> interpreter
> are consumed by it, from what I can tell in code and example. For instance:
You missed a line. :)
include misc.e
pretty_print(1, command_line(), {2})
pretty_print(1, option_switches(), {2})
I thought that the switches shouldn't interfere with the normal command line
handling, but that it might be useful to have access to it, so I added the
option_switches() built-in.
And yes, dad, it's on my list of stuff to document....
Matt