Is there a way to use a pre-build/run/debug shell script to set up environment variables?

  • From: "sbubin" < >
  • To:
  • Subject: Is there a way to use a pre-build/run/debug shell script to set up environment variables?
  • Date: Tue, 07 Aug 2012 02:00:03 -0400

Hi,
I use NetBeans to write/debug Fortran computational codes in Kubuntu. The 
codes usually have a (rather complicated) Makefile. Now, recently I 
transitioned to use environment management utilities such us 
environment-modules (http://modules.sourceforge.net/)  or usepackage 
(http://sourceforge.net/projects/usepackage/) as I constantly need to 
compile/run/debug the codes with different compilers and/or compiler 
versions. Besides, I need to use different MPI implementations. Those 
environment management utilities are quite handy and work beautifully when I 
use command line. However, they make it somewhat problematic to use them with 
NetBeans. I usually have a number of different configurations defined for 
each project. Each configuration requires a particular compiler and/or MPI. 
To compile the project, instead of invoking make as a "Build command" I 
invoke some bash script, which sets all necessary environment variables and 
then invokes make. Debugging is a more problematic. I c!
 annot use a script there. The only thing I can do is to manually write out 
each environment variable (in Properties --> Run --> Environment), which is 
quite inconvenient because there may be a lot of them. Also, the values of 
those environmental variables ($PATH, $LD_LIBRARY_PATH, etc) may change as 
the packages/modules for each compiler get modified.
I wonder if there is way to run some sort of pre-build, pre-run, and 
pre-debug schell script in NetBeans. Or perhaps there exists some other 
mechanism that is supposed to take care of the environment variables? I 
emphasize again that I would like to be able t use scripts to set the 
variables.
Sergiy






Is there a way to use a pre-build/run/debug shell script to set up environment variables?

sbubin 08/07/2012

Re: Is there a way to use a pre-build/run/debug shell script to set up environment variables?

Igor Nikiforov 08/07/2012

Is there a way to use a pre-build/run/debug shell script to set up environment variables?

sbubin 08/07/2012

Is there a way to use a pre-build/run/debug shell script to set up environment variables?

sbubin 08/07/2012

Project Features

About this Project

CND was started in November 2009, is owned by DimaZh, and has 183 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close