Commit 0c1602fc authored by Guenter Knauf's avatar Guenter Knauf
Browse files

NetWare build overhaul in order to compile on Linux.

Backport of (hopefully) all recent HEAD changes to the
NetWare build system related to building on Linux.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1087510 13f79535-47bb-0310-9956-ffa450edef68
parent 48e6a989
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ SUBDIRS = \
# paths to tools
#

include $(AP_WORK)\build\NWGNUhead.inc
include $(AP_WORK)/build/NWGNUhead.inc

#
# build this level's files
@@ -165,7 +165,7 @@ NLM_SCREEN_NAME = Apache $(VERSION_STR) for NetWare

#
# If this is specified, it will override VERSION value in
# $(AP_WORK)\build\NWGNUenvironment.inc
# $(AP_WORK)/build/NWGNUenvironment.inc
#
NLM_VERSION	=

@@ -178,12 +178,12 @@ NLM_STACK_SIZE = 65536
#
# If this is specified it will be used by the link '-entry' directive
#
NLM_ENTRY_SYM	= _LibCPrelude
NLM_ENTRY_SYM	=

#
# If this is specified it will be used by the link '-exit' directive
#
NLM_EXIT_SYM	= _LibCPostlude
NLM_EXIT_SYM	=

#
# If this is specified it will be used by the link '-check' directive
@@ -281,7 +281,7 @@ endif
# These will be added as a library command in the link.opt file.
#
FILES_nlm_libs = \
	libcpre.o \
	$(PRELUDE) \
	$(EOLIST)

#
@@ -313,7 +313,7 @@ FILE_nlm_copyright =
#
FILES_nlm_Ximports = \
	@netware.imp \
	@$(APR)/aprlib.imp \
	@aprlib.imp \
	@libc.imp \
	GetCurrentAddressSpace \
	$(EOLIST)
@@ -328,7 +328,7 @@ endif
# Any symbols exported to here
#
FILES_nlm_exports = \
	@$(NWOS)/httpd.imp \
	@httpd.imp \
	$(EOLIST)

#
@@ -348,7 +348,7 @@ nlms :: libs $(TARGET_nlm)

#
# Updated this target to create necessary directories and copy files to the
# correct place.  (See $(AP_WORK)\build\NWGNUhead.inc for examples)
# correct place.  (See $(AP_WORK)/build/NWGNUhead.inc for examples)
#
install :: nlms instscripts FORCE
	-copy $(OBJDIR)\$(NLM_NAME).nlm  $(INSTALL)\$(BASEDIR)\*.*
@@ -414,8 +414,8 @@ vpath %.c os/netware:server/mpm/netware:srclib/pcre
# in this makefile
#

include $(AP_WORK)\build\NWGNUtail.inc
include $(APBUILD)/NWGNUtail.inc

include $(AP_WORK)\build\NWGNUscripts.inc
include $(AP_WORK)/build/NWGNUscripts.inc

+137 −95
Original line number Diff line number Diff line
@@ -2,9 +2,9 @@
# Setup needed Tools and Libraries
#

ifeq "$(wildcard $(AP_WORK)\NWGNUcustom.ini)" "$(AP_WORK)\NWGNUcustom.ini"
include $(AP_WORK)\NWGNUcustom.ini
CUSTOM_INI = $(AP_WORK)\NWGNUcustom.ini
ifeq "$(wildcard $(AP_WORK)/NWGNUcustom.ini)" "$(AP_WORK)/NWGNUcustom.ini"
include $(AP_WORK)/NWGNUcustom.ini
CUSTOM_INI = $(AP_WORK)/NWGNUcustom.ini
endif

ifndef VERBOSE
@@ -49,13 +49,20 @@ ifneq "$(wildcard $(LDAPSDK)/inc/ldap.h)" "$(LDAPSDK)/inc/ldap.h"
$(error LDAPSDK does not point to a valid Novell CLDAP SDK) 
endif

#ifndef PCRESRC
PCRESRC = $(AP_WORK)/srclib/pcre
#endif
ifneq "$(wildcard $(PCRESRC)/pcre-config.in)" "$(PCRESRC)/pcre-config.in"
$(error PCRESRC does not point to a valid PCRE source tree) 
endif

# This is a placeholder
# ifndef ZLIBSDK
# ZLIBSDK = C:/novell/ndk/zlibsdk
# endif

ifndef METROWERKS
METROWERKS = C:\Program Files\Metrowerks\CodeWarrior
METROWERKS = $(ProgramFiles)\Metrowerks\CodeWarrior
endif

# If LM_LICENSE_FILE isn't defined, define a variable that can be used to
@@ -109,6 +116,9 @@ endif

OBJDIR = obj_$(RELEASE)

# Define minimum APR version to check for
APR_WANTED = 1003000

#
# Setup compiler information
#
@@ -123,21 +133,61 @@ WIN_CC = mwcc
# Setup build tools
AWK	= awk

# Setup distribution tools
ZIP	= zip -qr9
7ZA	= 7za >NUL a

#
# Declare Command and tool macros here
#

ifeq ($(findstring /sh,$(SHELL)),/sh)
DEL	= rm -f $1
RMDIR	= rm -fr $1
MKDIR	= mkdir -p $1
COPY	= -cp -afv $1 $2
#COPYR	= -cp -afr $1/* $2
COPYR	= -rsync -aC $1/* $2
ECHONL	= echo ""
DL	= '
CAT	= cat
else
ifeq "$(OS)" "Windows_NT"
DEL	= $(shell if exist $(subst /,\,$1) del /q /f 2>NUL $(subst /,\,$1))
RMDIR	= $(shell if exist $(subst /,\,$1)\NUL rd /q /s 2>NUL $(subst /,\,$1))
else
DEL	= $(shell if exist $(subst /,\,$1) del 2>NUL $(subst /,\,$1))
RMDIR	= $(shell if exist $(subst /,\,$1)\NUL deltree /y 2>NUL $(subst /,\,$1))
endif
ECHONL	= $(ComSpec) /c echo.
MKDIR	= $(shell if not exist $(subst /,\,$1)\NUL md 2>NUL $(subst /,\,$1))
COPY	= -copy /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
COPYR	= -xcopy /q /y /e 2>NUL $(subst /,\,$1) $(subst /,\,$2)
CAT	= type
endif

ifdef IPV6
ifndef USE_STDSOCKETS
USE_STDSOCKETS=1
endif
endif

NOVI	= $(NOVELLLIBC)\imports
NOVI	= $(NOVELLLIBC)/imports
PRELUDE	= $(NOVI)/libcpre.o

INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
INCDIRS	= $(NOVELLLIBC)/include;
ifndef USE_STDSOCKETS
INCDIRS	+= $(NOVELLLIBC)/include/winsock;
endif
ifneq "$(LDAPSDK)" ""
INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
INCDIRS += $(LDAPSDK)/inc;
endif
ifneq "$(ZLIBSDK)" ""
INCDIRS := $(INCDIRS);$(ZLIBSDK)
INCDIRS += $(ZLIBSDK);
endif
#ifneq "$(PCRESRC)" ""
#INCDIRS += $(PCRESRC);
#endif

DEFINES	= -DNETWARE 
ifndef USE_STDSOCKETS
@@ -154,16 +204,23 @@ VERSION_SKT = (WINSOCK)
endif

# MetroWerks static Libraries
CLIB3S	= $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
CLIB3S	= $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime/mwcrtl.lib
MATH3S	=
PLIB3S	= $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
PLIB3S	= $(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++/MWCPP.lib

# MetroWerks Win32 build flags to create build tool
ifeq "$(OS)" "Windows_NT"
# MetroWerks Win32 build flags to create build tools
MWCW_MSL    = "$(METROWERKS)/MSL"
MWCW_W32    = "$(METROWERKS)/Win32-x86 Support"
WIN_CFLAGS =  -O2 -gccinc -nodefaults -proc 586 -w off
WIN_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
WIN_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
HOST_CC     = $(WIN_CC)
HOST_CFLAGS =  -O2 -gccinc -nodefaults -proc 586 -w off
HOST_CFLAGS += -ir $(MWCW_MSL) -ir $(MWCW_W32) -lr $(MWCW_MSL) -lr $(MWCW_W32)
HOST_CFLAGS += -lMSL_All_x86.lib -lkernel32.lib -luser32.lib
else
# GNUC build flags to create build tools
HOST_CC     = gcc
HOST_CFLAGS = -Wall -O2
endif

# Base compile flags
# and prefix or precompiled header added here.
@@ -187,7 +244,6 @@ endif

# -g                    generate debugging information
# -O0                   level 0 optimizations

ifeq "$(RELEASE)" "debug"
CFLAGS += -g -O0
endif
@@ -198,52 +254,58 @@ CFLAGS += -O4,p
endif

# -prefix pre_nw.h      #include pre_nw.h for all files

CFLAGS += -prefix pre_nw.h


ifneq ($(findstring /sh,$(SHELL)),/sh)
PATH:=$(PATH);$(METROWERKS)\bin;$(METROWERKS)\Other Metrowerks Tools\Command Line Tools
endif

#
# Declare major project deliverables output directories here
#

ifndef PORT
PORT = 80
endif

ifndef SSLPORT
SSLPORT = 443
endif

ifdef DEST
INSTALL = $(DEST)
ifeq (\, $(findstring \,$(INSTALL)))
INSTDIRS = $(DEST)
INSTALL = $(subst \,/,$(DEST))
ifeq (/, $(findstring /,$(INSTALL)))
INSTDIRS = $(INSTALL)
endif
endif

ifdef dest
INSTALL = $(dest)
ifeq (\, $(findstring \,$(INSTALL)))
INSTDIRS = $(dest)
INSTALL = $(subst \,/,$(dest))
ifeq (/, $(findstring /,$(INSTALL)))
INSTDIRS = $(INSTALL)
endif
endif

ifndef INSTALL
INSTALL = $(AP_WORK)\Dist
INSTDIRS = $(AP_WORK)\Dist
INSTALL = $(AP_WORK)/Dist
INSTDIRS = $(INSTALL)
endif

ifeq ($(MAKECMDGOALS),installdev)
ifndef BASEDIR
BASEDIR = Apache22
export BASEDIR
export BASEDIR = apache_$(VERSION_STR)-sdk
endif

ifndef PORT
PORT = 80
else
ifndef BASEDIR
export BASEDIR = Apache$(VERSION_MAJMIN)
endif

ifndef SSLPORT
SSLPORT = 443
endif

# Add support for building IPV6 alongside
ifneq "$(IPV6)" ""
DEFINES += -DNW_BUILD_IPV6
# INCDIRS := $(NOVELLLIBC)\include\winsock\IPV6;$(INCDIRS)
# INCDIRS := $(NOVELLLIBC)/include/winsock/IPV6;$(INCDIRS)

ifneq "$(findstring IPV6,$(OBJDIR))" "IPV6"
OBJDIR := $(OBJDIR)_IPV6
@@ -259,71 +321,51 @@ endif

endif

INSTDEVDIRS := \
	$(INSTDIRS) \
	$(INSTALL)\$(BASEDIR)\include \
	$(INSTALL)\$(BASEDIR)\lib \

INSTDIRS += \
	$(INSTALL)\$(BASEDIR) \
	$(INSTALL)\$(BASEDIR)\bin \
	$(INSTALL)\$(BASEDIR)\cgi-bin \
	$(INSTALL)\$(BASEDIR)\conf \
	$(INSTALL)\$(BASEDIR)\error \
	$(INSTALL)\$(BASEDIR)\htdocs \
	$(INSTALL)\$(BASEDIR)\icons \
	$(INSTALL)\$(BASEDIR)\logs \
	$(INSTALL)\$(BASEDIR)\man \
	$(INSTALL)\$(BASEDIR)\manual \
	$(INSTALL)\$(BASEDIR)\modules \

#
# Declare Command and tool macros here
#

# Os2LibPath is an extra check to see if we are on NT
ifdef Os2LibPath
OS = Windows_NT
endif

ifeq "$(OS)" "Windows_NT"
CMD = cmd /C
DEL = del /F
DELTREE = rd /s/q
WINNT = 1
XCOPYSW = /E
else
CMD = command /C
DEL = del
DELTREE = deltree /y
XCOPYSW = /E /Y
endif

CHK = $(CMD) if exist
CHKNOT = $(CMD) if not exist
INSTALLBASE = $(INSTALL)/$(BASEDIR)

INSTDEVDIRS = \
	$(INSTALL) \
	$(INSTALLBASE) \
	$(INSTALLBASE)/build \
	$(INSTALLBASE)/include \
	$(INSTALLBASE)/lib \
	$(EOLIST) 

#
# Setup base C compiler flags
#
INSTDIRS += \
	$(INSTALLBASE) \
	$(INSTALLBASE)/bin \
	$(INSTALLBASE)/cgi-bin \
	$(INSTALLBASE)/conf \
	$(INSTALLBASE)/conf/extra \
	$(INSTALLBASE)/error \
	$(INSTALLBASE)/htdocs \
	$(INSTALLBASE)/icons \
	$(INSTALLBASE)/logs \
	$(INSTALLBASE)/man \
	$(INSTALLBASE)/manual \
	$(INSTALLBASE)/modules \
	$(EOLIST) 

#
# Common directories
#

STDMOD		= $(AP_WORK)/modules
NWOS		= $(AP_WORK)/os/netware
SERVER		= $(AP_WORK)/server
SRC		= $(AP_WORK)
APR		= $(APR_WORK)
APRUTIL		= $(APU_WORK)
APULDAP		= $(APU_WORK)/ldap
SUPMOD		= $(AP_WORK)/support
PCRE		= $(AP_WORK)/srclib/pcre
APRTEST		= $(APR_WORK)/test
HTTPD		= $(AP_WORK)/modules/http
XML		= $(APU_WORK)/xml
PREBUILD_INST   = $(AP_WORK)\nwprebuild
SRC		= $(subst \,/,$(AP_WORK))
APR		= $(subst \,/,$(APR_WORK))
APRUTIL		= $(subst \,/,$(APU_WORK))
APBUILD		= $(SRC)/build
STDMOD		= $(SRC)/modules
HTTPD		= $(SRC)/modules/http
DAV		= $(SRC)/modules/dav
NWOS		= $(SRC)/os/netware
SERVER		= $(SRC)/server
SUPMOD		= $(SRC)/support
APULDAP		= $(APRUTIL)/ldap
XML		= $(APRUTIL)/xml
APRTEST		= $(APR)/test
PCRE		= $(PCRESRC)

PREBUILD_INST	= $(SRC)/nwprebuild

#
# Internal Libraries
@@ -333,7 +375,7 @@ APRLIB = $(APR)/$(OBJDIR)/aprlib.lib
APRUTLIB	= $(APRUTIL)/$(OBJDIR)/aprutil.lib
APULDAPLIB	= $(APULDAP)/$(OBJDIR)/apuldap.lib
STMODLIB	= $(STDMOD)/$(OBJDIR)/stdmod.lib
PCRELIB		= $(PCRE)/$(OBJDIR)/pcre.lib
PCRELIB		= $(SRC)/$(OBJDIR)/pcre.lib
NWOSLIB		= $(NWOS)/$(OBJDIR)/netware.lib
SERVLIB		= $(SERVER)/$(OBJDIR)/server.lib
HTTPDLIB	= $(HTTPD)/$(OBJDIR)/httpd.lib
+34 −37
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
# Obtain the global build environment
#

include $(AP_WORK)\build\NWGNUenvironment.inc
include $(AP_WORK)/build/NWGNUenvironment.inc

#
# Define base targets and rules
@@ -26,7 +26,7 @@ install :: NO_LICENSE_FILE
installdev :: NO_LICENSE_FILE

NO_LICENSE_FILE :
	$(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)\license.dat"
	$(MAKE) $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(METROWERKS)/license.dat"

else # LM_LICENSE_FILE must be defined so use the real targets

@@ -41,41 +41,40 @@ install :: nlms $(INSTDIRS)
installdev :: $(INSTDEVDIRS)

$(INSTDIRS) ::
	$(CHKNOT) $@\NUL mkdir $@
	$(call MKDIR,$@)

$(INSTDEVDIRS) ::
	$(CHKNOT) $@\NUL mkdir $@
	$(call MKDIR,$@)

endif #NO_LICENSE_FILE check

help :
	@echo targets for RELEASE=$(RELEASE):
	@echo (default) . . . . libs nlms
	@echo all . . . . . . . does everything (libs nlms install)
	@echo libs. . . . . . . builds all libs
	@echo nlms. . . . . . . builds all nlms
	@echo install . . . . . builds libs and nlms and copies install files to
	@echo                   "$(INSTALL)"
	@echo installdev. . . . copies headers and files needed for development to
	@echo                   "$(INSTALL)"
	@echo clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map
	@echo clobber_all . . . deletes all possible output from the make
	@echo clobber_install . deletes all files in $(INSTALL)
	@$(CMD) echo.
	@echo Multiple targets can be used on a single nmake command line -
	@echo (i.e. $(MAKE) clean all)
	@$(CMD) echo.
	@echo You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized
	@echo The default is RELEASE=optimized
	@echo $(DL)targets for RELEASE=$(RELEASE):$(DL)
	@echo $(DL)(default) . . . . libs nlms$(DL)
	@echo $(DL)all . . . . . . . does everything (libs nlms install)$(DL)
	@echo $(DL)libs. . . . . . . builds all libs$(DL)
	@echo $(DL)nlms. . . . . . . builds all nlms$(DL)
	@echo $(DL)install . . . . . builds libs and nlms and copies install files to$(DL)
	@echo $(DL)                  "$(INSTALL)"$(DL)
	@echo $(DL)installdev. . . . copies headers and files needed for development to$(DL)
	@echo $(DL)                  "$(INSTALL)"$(DL)
	@echo $(DL)clean . . . . . . deletes $(OBJDIR) dirs, *.err, and *.map$(DL)
	@echo $(DL)clobber_all . . . deletes all possible output from the make$(DL)
	@echo $(DL)clobber_install . deletes all files in $(INSTALL)$(DL)
	@$(ECHONL)
	@echo $(DL)Multiple targets can be used on a single nmake command line -$(DL)
	@echo $(DL)(i.e. $(MAKE) clean all)$(DL)
	@$(ECHONL)
	@echo $(DL)You can also specify RELEASE=debug, RELEASE=noopt, or RELEASE=optimized$(DL)
	@echo $(DL)The default is RELEASE=optimized$(DL)

clobber_all :: clean clobber_install clobber_prebuild

clobber_install ::
	-$(DELTREE) $(INSTALL) 2>NUL
	$(call RMDIR,$(INSTALL))
        
clobber_prebuild ::
	$(CHK) $(PREBUILD_INST)\*.* $(DEL) $(PREBUILD_INST)\*.*
	-$(DELTREE) $(PREBUILD_INST) 2> NUL
	$(call RMDIR,$(PREBUILD_INST))

#
# build recursive targets
@@ -83,11 +82,11 @@ clobber_prebuild ::

$(SUBDIRS) : FORCE
ifneq "$(MAKECMDGOALS)" "clean"
	$(CMD) echo.
	@echo Building $(CURDIR)/$@
	@$(ECHONL)
	@echo $(DL)Building $(CURDIR)/$@$(DL)
endif
	$(MAKE) -C $@ $(MAKECMDGOALS) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
	$(CMD) echo.
	@$(ECHONL)

FORCE:

@@ -96,15 +95,13 @@ FORCE:
#

clean :: $(SUBDIRS)
	@echo Cleaning up $(CURDIR)
	-$(DELTREE) $(OBJDIR) 2> NUL
	$(CHK) *.err $(DEL) *.err
	$(CHK) *.map $(DEL) *.map
	$(CHK) *.d $(DEL) *.d
	$(CHK) *.tmp $(DEL) *.tmp
	$(CHK) xc.bat $(DEL) xc.bat
	-$(DELTREE) $(OBJDIR) 2> NUL
	@echo $(DL)Cleaning up $(CURDIR)$(DL)
	$(call RMDIR,$(OBJDIR))
	$(call DEL,*.err)
	$(call DEL,*.map)
	$(call DEL,*.tmp)
#	$(call DEL,*.d)

$(OBJDIR) ::
	$(CHKNOT) $(OBJDIR)\nul mkdir $(OBJDIR)
	$(call MKDIR,$@)
+68 −61
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
#

SUBDIRS = \
	$(APR_WORK)/build \
	$(EOLIST) 

#
@@ -10,76 +11,74 @@ SUBDIRS = \
# paths to tools
#

include $(AP_WORK)\build\NWGNUhead.inc
include $(AP_WORK)/build/NWGNUhead.inc

#
# build this level's files

FILES_prebuild_headers = \
	$(APR)/include/apr.h \
	$(APRUTIL)/include/apu.h \
	$(APRUTIL)/include/apr_ldap.h \
	$(NWOS)/test_char.h \
	$(PCRE)/config.h \
	$(PCRE)/pcre.h \
	$(EOLIST) 
    
nlms :: $(NWOS)/httpd.imp $(NWOS)/chartables.c
nlms :: libs $(NWOS)/httpd.imp $(DAV)/main/dav.imp

libs :: chkapr $(NWOS)/chartables.c

$(DAV)/main/dav.imp : make_nw_export.awk $(DAV)/main/mod_dav.h
	@echo $(DL)GEN  $@$(DL)
	$(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@

$(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
	@echo Generating $(subst /,\,$@)
	$(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | sort >$@
	@echo $(DL)GEN  $@$(DL)
	$(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ >$@
    
nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
	@echo Generating $(subst /,\,$@)
	@echo $(DL)GEN  $@$(DL)
	$(CC) $< @cc.opt

cc.opt : NWGNUmakefile $(AP_WORK)\build\NWGNUenvironment.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUhead.inc
	$(CHK) $@ $(DEL) $@
	@echo -P >> $@
	@echo -EP >> $@
	@echo -nosyspath >> $@
	@echo -w nocmdline >> $@
	@echo $(DEFINES) >> $@
	@echo -DCORE_PRIVATE >> $@
	@echo -I..\include >> $@
	@echo -I..\modules\http >> $@
	@echo -I..\modules\aaa >> $@
	@echo -I..\os\netware >> $@
	@echo -I..\server\mpm\netware >> $@
	@echo -I$(APR)\include >> $@
	@echo -I$(APRUTIL)\include >> $@
	@echo -ir $(NOVELLLIBC) >> $@

$(APR)/include/%.h: $(subst /,\,$(APR))\include\%.hnw
	@echo Creating $(subst /,\,$@)
	copy $< $(subst /,\,$(APR))\include\$(@F)

$(APRUTIL)/include/%.h: $(subst /,\,$(APRUTIL))\include\%.hnw
	@echo Creating $(subst /,\,$@)
	copy $< $(subst /,\,$(APRUTIL))\include\$(@F)

$(PCRE)/%.h: $(subst /,\,$(PCRE))\%.hw
	@echo Creating $(subst /,\,$@)
	copy $< $(subst /,\,$(PCRE))\$(@F)
cc.opt : NWGNUmakefile $(APBUILD)/NWGNUenvironment.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUhead.inc
	@echo $(DL)-P$(DL)> $@
	@echo $(DL)-EP$(DL)>> $@
	@echo $(DL)-nosyspath$(DL)>> $@
	@echo $(DL)-w nocmdline$(DL)>> $@
	@echo $(DL)$(DEFINES)$(DL)>> $@
	@echo $(DL)-DCORE_PRIVATE$(DL) >> $@
	@echo $(DL)-I$(SRC)/include$(DL)>> $@
	@echo $(DL)-I$(HTTPD)$(DL)>> $@
	@echo $(DL)-I$(STDMOD)/aaa$(DL)>> $@
	@echo $(DL)-I$(NWOS)$(DL)>> $@
	@echo $(DL)-I$(SERVER)/mpm/netware$(DL)>> $@
	@echo $(DL)-I$(APR)/include$(DL)>> $@
	@echo $(DL)-I$(APRUTIL)/include$(DL)>> $@
	@echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@

$(PCRE)/%.h: $(PCRE)/%.h.generic
	@echo Creating $@
	$(call COPY,$<,$@)

$(PCRE)/%.h: $(PCRE)/%.hw
	@echo Creating $@
	$(call COPY,$<,$@)

ifneq "$(BUILDTOOL_AS_NLM)" "1"

$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
	@echo Creating $(subst /,\,$@)
	@$< $@
$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c
	@echo $(DL)GEN  $@$(DL)
	$< $@

%.exe: $(PCRE)/%.c
	@echo Creating Build Helper $@
	@$(WIN_CC) $(WIN_CFLAGS) $< -o $@
%.exe: $(PCRE)/%.c $(PCRE)/config.h $(PCRE)/pcre.h
	@echo $(DL)Creating Build Helper $@$(DL)
	$(HOST_CC) $(HOST_CFLAGS) -DHAVE_CONFIG_H $< -o $@

$(NWOS)/test_char.h: gen_test_char.exe $(AP_WORK)/server/gen_test_char.c
	@echo Creating $(subst /,\,$@)
	@$< > $@
$(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c
	@echo $(DL)GEN  $@$(DL)
	$< > $@

%.exe: $(AP_WORK)/server/%.c
	@echo Creating Build Helper $@
	@$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
%.exe: $(SERVER)/%.c
	@echo $(DL)Creating Build Helper $@$(DL)
	$(HOST_CC) $(HOST_CFLAGS) -DCROSS_COMPILE $< -o $@

else

@@ -93,6 +92,13 @@ endif

endif

#
# Check for minimum APR version
#
chkapr: $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
	@echo $(DL)Checking for APR version...$(DL)
	$(AWK) -v WANTED=$(APR_WANTED) -f $^

#
# You can use this target if all that is needed is to copy files to the
# installation area
@@ -100,18 +106,19 @@ endif
install :: nlms FORCE

clean ::
	$(CHK) nw_export.i                                 $(DEL) nw_export.i
	$(CHK) cc.opt                                      $(DEL) cc.opt
	$(CHK) NWGNUversion.inc                            $(DEL) NWGNUversion.inc
	$(CHK) $(subst /,\,$(PCRE))\config.h               $(DEL) $(subst /,\,$(PCRE))\config.h
	$(CHK) $(subst /,\,$(PCRE))\pcre.h                 $(DEL) $(subst /,\,$(PCRE))\pcre.h
	$(CHK) $(subst /,\,$(NWOS))\httpd.imp              $(DEL) $(subst /,\,$(NWOS))\httpd.imp
	$(MAKE) -C $(APR) -f NWGNUmakefile clean
	$(call DEL,$(SRC)/include/ap_config_layout.h)
	$(call DEL,$(PCRE)/config.h)
	$(call DEL,$(PCRE)/pcre.h)
	$(call DEL,$(DAV)/main/dav.imp)
	$(call DEL,$(NWOS)/httpd.imp)
	$(call DEL,nw_export.i)
	$(call DEL,cc.opt)
	$(call DEL,NWGNUversion.inc)
ifneq "$(BUILDTOOL_AS_NLM)" "1"
	$(CHK) $(subst /,\,$(NWOS))\chartables.c           $(DEL) $(subst /,\,$(NWOS))\chartables.c
	$(CHK) $(subst /,\,$(NWOS))\test_char.h            $(DEL) $(subst /,\,$(NWOS))\test_char.h
	$(CHK) dftables.exe                                $(DEL) dftables.exe
	$(CHK) gen_test_char.exe                           $(DEL) gen_test_char.exe
	$(call DEL,$(NWOS)/chartables.c)
	$(call DEL,$(NWOS)/test_char.h)
	$(call DEL,dftables.exe)
	$(call DEL,gen_test_char.exe)
endif

#
@@ -119,5 +126,5 @@ endif
# in this makefile
#

include $(AP_WORK)\build\NWGNUtail.inc
include $(APBUILD)/NWGNUtail.inc
    
+40 −41
Original line number Diff line number Diff line
# Include for creating start/stop/restart NCF scripts.

instscripts:: FORCE $(INSTALL)/$(BASEDIR)/ap2start.ncf $(INSTALL)/$(BASEDIR)/ap2auto.ncf $(INSTALL)/$(BASEDIR)/ap2rest.ncf $(INSTALL)/$(BASEDIR)/ap2stop.ncf

$(INSTALL)/$(BASEDIR)/ap2start.ncf:
	@echo # NCF to start Apache 2.x in own address space > $@
	@echo # Make sure that httpstk isn't listening on 80 >> $@
	@echo # httpcloseport 80 /silent >> $@
	@echo # search add SYS:/$(BASEDIR) >> $@
	@echo load address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2 >> $@
	@echo # If you have problems with 3rd-party modules try to load in OS space. >> $@
	@echo # load SYS:/$(BASEDIR)/apache2 >> $@
	@echo. >> $@

$(INSTALL)/$(BASEDIR)/ap2auto.ncf:
	@echo # NCF to start Apache 2.x in own address space > $@
	@echo # and let automatically restart in case it crashes >> $@
	@echo # Make sure that httpstk isn't listening on 80 >> $@
	@echo # httpcloseport 80 /silent >> $@
	@echo # search add SYS:/$(BASEDIR) >> $@
	@echo restart address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2 >> $@
	@echo. >> $@

$(INSTALL)/$(BASEDIR)/ap2rest.ncf:
	@echo # NCF to restart Apache 2.x in own address space > $@
	@echo apache2 restart -p $(BASEDIR) >> $@
	@echo # If you have loaded Apache2.x in OS space use the line below. >> $@
	@echo # apache2 restart >> $@
	@echo. >> $@

$(INSTALL)/$(BASEDIR)/ap2stop.ncf:
	@echo # NCF to stop Apache 2.x in own address space > $@
	@echo apache2 shutdown -p $(BASEDIR) >> $@
	@echo # If you have loaded Apache2.x in OS space use the line below. >> $@
	@echo # apache2 shutdown >> $@
	@echo. >> $@

$(INSTALL)/$(BASEDIR)/ap2prod.ncf:
	@echo # NCF to create a product record for Apache 2.x in product database > $@
	@echo PRODSYNC DEL APACHE$(VERSION_MAJMIN) >> $@
	@echo PRODSYNC ADD APACHE$(VERSION_MAJMIN) ProductRecord "$(VERSION_STR)" "Apache $(VERSION_STR) Webserver" >> $@
	@echo. >> $@

instscripts:: FORCE $(INSTALLBASE)/ap2start.ncf $(INSTALLBASE)/ap2auto.ncf $(INSTALLBASE)/ap2rest.ncf $(INSTALLBASE)/ap2stop.ncf

$(INSTALLBASE)/ap2start.ncf:
	@echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@
	@echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@
	@echo $(DL)# httpcloseport 80 /silent$(DL)>> $@
	@echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@
	@echo $(DL)load address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@
	@echo $(DL)# If you have problems with 3rd-party modules try to load in OS space.$(DL)>> $@
	@echo $(DL)# load SYS:/$(BASEDIR)/apache2$(DL)>> $@
	@$(ECHONL)>> $@

$(INSTALLBASE)/ap2auto.ncf:
	@echo $(DL)# NCF to start Apache 2.x in own address space$(DL)> $@
	@echo $(DL)# and let automatically restart in case it crashes$(DL)>> $@
	@echo $(DL)# Make sure that httpstk is not listening on 80$(DL)>> $@
	@echo $(DL)# httpcloseport 80 /silent$(DL)>> $@
	@echo $(DL)# search add SYS:/$(BASEDIR)$(DL)>> $@
	@echo $(DL)restart address space = $(BASEDIR) SYS:/$(BASEDIR)/apache2$(DL)>> $@
	@$(ECHONL)>> $@

$(INSTALLBASE)/ap2rest.ncf:
	@echo $(DL)# NCF to restart Apache 2.x in own address space$(DL)> $@
	@echo $(DL)apache2 restart -p $(BASEDIR)$(DL)>> $@
	@echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@
	@echo $(DL)# apache2 restart$(DL)>> $@
	@$(ECHONL)>> $@

$(INSTALLBASE)/ap2stop.ncf:
	@echo $(DL)# NCF to stop Apache 2.x in own address space$(DL)> $@
	@echo $(DL)apache2 shutdown -p $(BASEDIR)$(DL)>> $@
	@echo $(DL)# If you have loaded Apache2.x in OS space use the line below.$(DL)>> $@
	@echo $(DL)# apache2 shutdown$(DL)>> $@
	@$(ECHONL)>> $@

$(INSTALLBASE)/ap2prod.ncf:
	@echo $(DL)# NCF to create a product record for Apache 2.x in product database$(DL)> $@
	@echo $(DL)PRODSYNC DEL APACHE$(VERSION_MAJMIN)$(DL)>> $@
	@echo $(DL)PRODSYNC ADD APACHE$(VERSION_MAJMIN) ProductRecord "$(VERSION_STR)" "Apache $(VERSION_STR) Webserver"$(DL)>> $@
	@$(ECHONL)>> $@
Loading