httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pt...@pobox.com
Subject (flood) Environment problems with floodenv.bat in Makefile.win
Date Fri, 31 Jan 2003 20:47:17 GMT
Hi all,

I'm seeing a problem in the Windows build of flood with Makefile.win.
The makefile generates a batch file that sets up various variables.
In the command block of some targets, we call the batch file before
invoking a tool like nmake, MSDEV, etc.  For example:
    floodenv.bat
    msdev flood.dsw <... additional stuff ...>
It looks like the intent is for floodenv.bat to set the environment
variables and then have subsequent commands use those variables.
I don't see this behavior occurring.

If you run floodenv.bat before using the makefile.win, then all is okay.
I suspect I haven't had problems until recently because I was running
the floodenv.bat manually in my command prompt in order to build with
the MSDEV IDE.  To see the problem you need to make sure you don't call
floodenv.bat before using Makefile.win.

I've included a sample NMAKE makefile and some output to demonstrate
the problem.  The recursive NMAKE isn't picking up the setting of ENVVAR
from the env.bat created.

I have a fix in mind, which I'll send out when it's ready.

Command:
  nmake -f env.mak test-env
Sample output:

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

ENVVAR is empty or unset.
        echo set ENVVAR=SOMETHING> env.bat
        env.bat

F> set ENVVAR=SOMETHING
        nmake -nologo -f env.mak
ENVVAR is empty or unset.

# --- Beginning of Makefile ---
!if "$(ENVVAR)" == ""
!message ENVVAR is empty or unset.
!else
!message Got ENVVAR: $(ENVVAR)
!endif

all:

test-env:
    echo set ENVVAR=SOMETHING> env.bat
    env.bat
    nmake -nologo -f env.mak
# --- End of Makefile ---

Mime
View raw message