# # Copyright 1999-2004 The Apache Software Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # @author Pier Fumagalli # @version $Id$ # Analyze and normalyze the DEBUG compilation flag !IF "$(DEBUG)" == "true" APRCFG = libapr - Win32 Debug !ELSE DEBUG = false APRCFG = libapr - Win32 Release !ENDIF # Makefile rules all: apr-all local-all dist: all -mkdir dist !IF "$(DEBUG)" == "true" copy .\apr\Debug\libapr.dll .\dist\libapr.dll !ELSE copy .\apr\Release\libapr.dll .\dist\libapr.dll !ENDIF copy .\apache-1.3\mod_webapp.dll .\dist\mod_webapp.so copy INSTALL.txt .\dist\INSTALL.txt copy LICENSE.txt .\dist\LICENSE.txt clean: apr-clean local-clean -@erase localmake.bat apr-all: localmake.bat @localmake.bat .\apr /f libapr.mak "CFG=$(APRCFG)" all @echo DEBUG IS -$(DEBUG)- apr-clean: localmake.bat @localmake.bat .\apr /f libapr.mak "CFG=$(APRCFG)" clean -@erase .\apr\apr.lib local-all: localmake.bat @localmake.bat .\lib /f Makefile.win "DEBUG=$(DEBUG)" all !IF "$(APACHE)" != "" @localmake.bat .\apache-1.3 /f Makefile.win \ "DEBUG=$(DEBUG)" "APACHE=$(APACHE)" all !ENDIF local-clean: localmake.bat @localmake.bat .\lib /f Makefile.win "DEBUG=$(DEBUG)" clean !IF "$(APACHE)" != "" @localmake.bat .\apache-1.3 /f Makefile.win \ "DEBUG=$(DEBUG)" "APACHE=$(APACHE)" clean !ENDIF # Create the localmake.bat script localmake.bat: Makefile.win @echo Creating "localmake.bat" script @type << > localmake.bat @echo off echo === Entering directory "%1" cd %1 echo --- Invoking $(MAKE) /nologo %2 %3 %4 %5 %6 %7 %8 %9 $(MAKE) /nologo %2 %3 %4 %5 %6 %7 %8 %9 set result=%errorlevel% cd .. if not "%result%" == "0" goto error echo === All done in "%1" exit 0 :error echo === Error in "%1" (exit code %result%) exit %result% <<