At 04:22 PM 1/20/00 +0000, Ian Hunter wrote:
>Question.
>
>I compute my CLASSPATH by a script in .bashrc (I'm using cygwin), but when I
>compile, the CLASSPATH being used is the NT system CLASSPATH.
>
I believe the Emacs compile command starts a Java compilation with the
equivalent of
bash -c javac MyClass.java
In this case, the shell is started in batch (non-interactive) mode. In
batch mode,
bash does not run your .bashrc script. Therefore, javac inherits the value
of the
CLASSPATH variable from Emacs which inherits it from Windows and hence the
value
of the CLASSPATH is the NT value not your .bashrc value.
Perhaps a bash expert can confirm the above.
>Is there a way of controlling the compile shell to run .bashrc or to use
>bash env. vars.
>
According to the bash doc, batch mode will,
on startup, execute the script whose path is specified by the environment
variable ENV.
Therefore, you could define ENV in your NT environment and point it to your
.bashrc script in your home directory.
>This is also a problem for me because when I run make, it runs make in the
>same directory as the source file, whereas my Makefile is in a project root
>directory.
>
Reading the make doc reveals that there are -f and -C variables for defining
the location of the makefile and the startup directory, respectively. You can
use these with JDE's build command to run a makefile located anywhere on
your local drive or network.
- Paul