Re: [Pmk-users] Environment variables with pmk
Brought to you by:
coudercd
|
From: <gnu...@cl...> - 2005-03-21 22:31:24
|
Le 3 mars 05, =E0 21:15, Damien COUDERC a =E9crit : > Quentin Math=E9 wrote: > >> Hi, >> I would like to use pmk for a project, but I need to read various =20 >> shell environment variables for library paths, include paths and =20 >> other stuff=85 is this possible with pmk and how to do it ? > > Hi Quentin, > could you be more precise about your needs ? > Also you could get the env variables directly from the Makefile. Here is my real reply finally. Well, it doesn't interest me to check the env variables within Makefile. Explanations now=85 :-) My development project is based on GNUstep http://www.gnustep.org then =20= I'm using gnustep-make (evolved custom Make environment) for my =20 development. When you decide to use GNUstep applications, you need to =20= run a shell script in order to have a usable environments by setting =20 various env variables (most of the time you can put it in .profile or =20= similar) Here are GNUstep specific variables, I need to check some of them in =20 order to verify if the environments is correctly set up for my build =20 process and which flags I need to pass (depending on variables like =20 LIBRARY_COMBO, GNUSTEP_ROOT etc.) GNUSTEP_LOCAL_ROOT=3D/GNUstep/Local GNUSTEP_HOST=3Dpowerpc-apple-darwin7.7.0 GNUSTEP_NETWORK_ROOT=3D/GNUstep/Local GNUSTEP_MAKEFILES=3D/GNUstep/System/Library/Makefiles GNUSTEP_ROOT=3D/GNUstep GNUSTEP_FLATTENED=3Dyes GNUSTEP_HOST_OS=3Ddarwin7 GNUSTEP_HOST_VENDOR=3Dapple GNUSTEP_HOST_CPU=3Dpowerpc GNUSTEP_USER_ROOT=3D/Users/qmathe/GNUstep GNUSTEP_SYSTEM_ROOT=3D/GNUstep/System GNUSTEP_PATHLIST=3D/Users/qmathe/GNUstep:/GNUstep/Local:/GNUstep/System CLASSPATH=3D/Users/qmathe/GNUstep/Library/Libraries/Java:/GNUstep/Local/=20= Library/Libraries/Java:/GNUstep/System/Library/Libraries/Java LIBRARY_COMBO=3Dgnu-gnu-gnu Here are extra en variables I can need to check : LDFLAGS=3D-L/opt/local/lib -L/sw/lib SHELL=3D/bin/bash PATH=3D/usr/local/bin:/usr/local/sbin:/gdb/bin:/gcc/bin:/opt/local/bin:/=20= Users/qmathe/GNUstep/Tools:/GNUstep/Local/Tools:/GNUstep/System/Tools:/=20= sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin CFLAGS=3D-I/opt/local/include -I/sw/include CC=3D/gcc/bin/gcc DYLD_FRAMEWORK_PATH=3D/Users/qmathe/GNUstep/Library/Frameworks:/GNUstep/=20= Local/Library/Frameworks:/GNUstep/System/Library/Frameworks DYLD_LIBRARY_PATH=3D/opt/local/lib:/usr/local/lib:/gdb/lib:/gcc/lib:/sw/=20= lib:/Users/qmathe/GNUstep/Library/Libraries:/GNUstep/Local/Library/=20 Libraries:/GNUstep/System/Library/Libraries The problem is tricky with Mac OS X because for example by default the =20= system tries to use Apple GCC libobjc which is not compatible with =20 GNUstep (just relying on a different Objective-C runtime), then I need =20= to check what is precisely in DYLD_LIBRARY_PATH (when you consider CC =20= path value especially). The last two variables which are LD_LIBRARY_PATH equivalent for Darwin =20= linker are important in my case because I'm doing development most of =20= the time on top of Mac OS X (aka Darwin with GNUstep running in Apple =20= X11. The problem is that I could need to link libraries in /sw (Fink related =20= packages) or not, this induces possible problems with GCC and linker =20 flags too. I need to check various stuff like this because the project is rather =20= complicated and I need to simplify build process as much as I can for =20= deployment. I encounter similar problems with other OS like =20 DragonFlyBSD or OpenBSD for example because GNUstep install scheme is =20= particular (not relying on Unix filesystem layout) moreover theses OS =20= are using special GCC version, custom filesystem layout etc. At some point I could need build support on Windows too but not very =20 soon at least :-). hmm=85 My current workaround would be a wrapper shell script driving pmk =20 process : - dumping env variables I'm need in a special file - running pmk which would parse this special file - returning results =85 but I would appreciate a better/simpler solution. Quentin. -- Quentin Math=E9 qm...@cl... |