Problem setting up makefile

Tech-Archive recommends: Fix windows errors by optimizing your registry



I am trying to setup multiple makefiles using common environment variables
that point to path information. I am calling nmake using recursion through
sub-projects. The problem is I cannot get nmake to maintain
variables across projects.
Simple example:
In makefile1:
ALL : ENV proj2

proj2:
nmake .\proj2\makefile
nmake .\proj3\makefile

ENV:
set AS=asm.exe

The result is project 2 builds ok using asm.exe but when it is done
AS is set to equal 'ml' and when I try to build project 3 it fails.
After struggling with this for a while I have decided to create a batch file
that sets up
the environment from the dos window.

My problem here is I need to set a 'base path' in the environment from the
batch file
ie set basepath=?
I do not know how to determine what the current path is from a batch file. I
do not see
an environment variable that points to the current path. I know I could
enter it from
the command line but I would like to avoid this if possible. Does anyone
know if there
is a way to determine the current path from a batch file?
I hope I am not confusing here.
thanks


.



Relevant Pages

  • Re: SSDIR Error
    ... all those same settings, but instead of running VSS, write things out to a ... file, like the user name, the ssdir and ssuser environment variables, the ... >> I've got a batch file that I use to run a nightly ... the scheduled task is set to run as me ...
    (microsoft.public.vstudio.sourcesafe)
  • RE: How to set environment variable via JScript?
    ... Every process has its own copy of environment variables. ... cscript.exe is a child process of cmd.exe (the batch file runs in the context ... I suggest converting the batch file to a script, ... rem MYVAR should not contain the double quote character. ...
    (microsoft.public.scripting.jscript)
  • Re: powercobol compile all directory projects
    ... the entire point of the batch file is to do things in a specific order. ... Thus I split the main project up into sub-projects, and compile them in order. ... NMAKE *.mak may work for a small collection of independent programs, ...
    (comp.lang.cobol)
  • Re: How to set environment variable via JScript?
    ... Thank you, Elyo, for your explanation and for your ingenious batch file ... Every process has its own copy of environment variables. ... variables are inherited from parent to child, but a child process ... rem MYVAR should not contain the double quote character. ...
    (microsoft.public.scripting.jscript)
  • Re: Running XCopy using AT command
    ... up as access is denied when the batch file tries to copy the file over. ... > about environment variables, including path, which is why every file system ... > target system by first mapping a drive to the target system at the beginning ... >> The only difference between running the cmd file manualy and through the ...
    (microsoft.public.windows.server.general)