summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2011-12-27 19:42:33 +0100
committerStefan Fritsch <sf@sfritsch.de>2011-12-27 19:42:33 +0100
commitad14e19ad0400e289b06fb7728aea815e6ed49be (patch)
treebd29489cafb04b303940169ae7b00c1171a5a34c /build
parent02a0e3b89d2ea1b984365e692c910668d75c6dcd (diff)
downloadapache2-ad14e19ad0400e289b06fb7728aea815e6ed49be.tar.gz
Upstream tarball 2.2.12upstream/2.2.12
Diffstat (limited to 'build')
-rw-r--r--build/NWGNUenvironment.inc33
-rw-r--r--build/NWGNUmakefile61
-rw-r--r--build/NWGNUscripts.inc35
-rw-r--r--build/NWGNUtail.inc13
-rw-r--r--build/make_nw_export.awk2
-rw-r--r--build/nw_ver.awk12
6 files changed, 129 insertions, 27 deletions
diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc
index 4ef85f74..60b72047 100644
--- a/build/NWGNUenvironment.inc
+++ b/build/NWGNUenvironment.inc
@@ -38,11 +38,16 @@ endif
ifndef NOVELLLIBC
NOVELLLIBC = C:/novell/ndk/libc
endif
+ifneq "$(wildcard $(NOVELLLIBC)/include/ndkvers.h)" "$(NOVELLLIBC)/include/ndkvers.h"
+$(error NOVELLLIBC does not point to a valid Novell LIBC SDK)
+endif
-# This is a placeholder
-# ifndef LDAPSDK
-# LDAPSDK = C:/novell/ndk/cldapsdk
-# endif
+ifndef LDAPSDK
+LDAPSDK = C:/novell/ndk/cldapsdk/NetWare/libc
+endif
+ifneq "$(wildcard $(LDAPSDK)/inc/ldap.h)" "$(LDAPSDK)/inc/ldap.h"
+$(error LDAPSDK does not point to a valid Novell CLDAP SDK)
+endif
# This is a placeholder
# ifndef ZLIBSDK
@@ -62,8 +67,8 @@ endif
#
# Set the Release type that you want to build, possible values are:
#
-# debug - full debug switches are set
-# noopt - normal switches are set (default)
+# debug - full debug switches are set
+# noopt - normal switches are set (default)
# optimized - optimization switches are set
ifdef reltype
@@ -115,6 +120,7 @@ CC = mwccnlm
CPP = mwccnlm
LINK = mwldnlm
LIB = mwldnlm -type library -w nocmdline
+WIN_CC = mwcc
# Setup build tools
AWK = awk
@@ -127,7 +133,7 @@ endif
NOVI = $(NOVELLLIBC)\imports
-INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
+INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
ifneq "$(LDAPSDK)" ""
INCDIRS := $(INCDIRS);$(LDAPSDK)/inc
endif
@@ -149,13 +155,22 @@ else
VERSION_SKT = (WINSOCK)
endif
-#
# MetroWerks static Libraries
-
CLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\Runtime\mwcrtl.lib
MATH3S =
PLIB3S = $(METROWERKS)\Novell Support\Metrowerks Support\Libraries\MSL C++\MWCPP.lib
+# MetroWerks Win32 build flags to create build tool
+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
+
+ifndef BUILDTOOL_AS_NLM
+BUILDTOOL_AS_NLM = 1
+endif
+
# Base compile flags
# and prefix or precompiled header added here.
diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile
index 423a73d9..fac1a828 100644
--- a/build/NWGNUmakefile
+++ b/build/NWGNUmakefile
@@ -19,15 +19,16 @@ 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
+nlms :: $(NWOS)/httpd.imp $(NWOS)/chartables.c
$(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
@echo Generating $(subst /,\,$@)
- $(AWK) -f make_nw_export.awk nw_export.i | sort >$(NWOS)/httpd.imp
+ $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | sort >$@
nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
@echo Generating $(subst /,\,$@)
@@ -62,19 +63,61 @@ $(PCRE)/%.h: $(subst /,\,$(PCRE))\%.hw
@echo Creating $(subst /,\,$@)
copy $< $(subst /,\,$(PCRE))\$(@F)
+ifneq "$(BUILDTOOL_AS_NLM)" "1"
+
+$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
+ @echo Creating $(subst /,\,$@)
+ @$< $@
+
+%.exe: $(PCRE)/%.c
+ @echo Creating Build Helper $@
+ @$(WIN_CC) $(WIN_CFLAGS) $< -o $@
+
+$(NWOS)/test_char.h: gen_test_char.exe $(AP_WORK)/server/gen_test_char.c
+ @echo Creating $(subst /,\,$@)
+ @$< > $@
+
+%.exe: $(AP_WORK)/server/%.c
+ @echo Creating Build Helper $@
+ @$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
+
+else
+
+ifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
+$(error Error: required source $(NWOS)/chartables.c not found!)
+endif
+
+ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
+$(error Error: required header $(NWOS)/test_char.h not found!)
+endif
+
+endif
+
#
# You can use this target if all that is needed is to copy files to the
# installation area
#
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
+ $(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
+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
+endif
+
+#
+# Include the 'tail' makefile that has targets that depend on variables defined
+# in this makefile
+#
+
+include $(AP_WORK)\build\NWGNUtail.inc
diff --git a/build/NWGNUscripts.inc b/build/NWGNUscripts.inc
new file mode 100644
index 00000000..1149076a
--- /dev/null
+++ b/build/NWGNUscripts.inc
@@ -0,0 +1,35 @@
+# Include for creating start/stop/restart NCF scripts.
+
+instscripts:: FORCE $(INSTALL)/$(BASEDIR)/ap2start.ncf $(INSTALL)/$(BASEDIR)/ap2rest.ncf $(INSTALL)/$(BASEDIR)/ap2stop.ncf $(INSTALL)/$(BASEDIR)/ap2prod.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 $(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. >> $@
+
+
diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc
index 3169f9c8..2c04623d 100644
--- a/build/NWGNUtail.inc
+++ b/build/NWGNUtail.inc
@@ -58,7 +58,7 @@ $(NLM_NAME)_LINKOPT_DEPENDS = \
$(EOLIST)
ifeq "$(words $(strip $(TARGET_lib)))" "1"
-LIB_NAME = $(basename $(notdir $(TARGET_lib)))
+LIB_NAME = $(basename $(notdir $(TARGET_lib)))
$(LIB_NAME)_LIBLST_DEPENDS = \
$(FILES_lib_objs) \
$(AP_WORK)\build\NWGNUenvironment.inc \
@@ -82,17 +82,20 @@ endif
# Generic compiler rules
#
-$(AP_WORK)\build\NWGNUversion.inc : $(AP_WORK)\include\ap_release.h $(AP_WORK)\build\nw_ver.awk
+ifneq ($(MAKECMDGOALS),clean)
+$(AP_WORK)\build\NWGNUversion.inc : $(AP_WORK)\build\nw_ver.awk $(AP_WORK)\include\ap_release.h
@echo Generating $(subst /,\,$@)
- $(AWK) -f $(AP_WORK)\build\nw_ver.awk $(AP_WORK)\include\ap_release.h > $(AP_WORK)\build\NWGNUversion.inc
+ $(AWK) -f $^ > $@
-include $(AP_WORK)\build\NWGNUversion.inc
ifneq "$(strip $(VERSION_STR))" ""
VERSION_INC = $(AP_WORK)\build\NWGNUversion.inc
else
-VERSION = 2,0,0
-VERSION_STR = 2.0.0
+VERSION = 2,2,0
+VERSION_STR = 2.2.0
+VERSION_MAJMIN = 22
+endif
endif
diff --git a/build/make_nw_export.awk b/build/make_nw_export.awk
index b958903c..ca6e6a07 100644
--- a/build/make_nw_export.awk
+++ b/build/make_nw_export.awk
@@ -18,7 +18,7 @@
# based on Ryan Bloom's make_export.pl
BEGIN {
- printf(" (APACHE2)\n")
+ printf(" ("EXPPREFIX")\n")
}
# List of functions that we don't support, yet??
diff --git a/build/nw_ver.awk b/build/nw_ver.awk
index ea698191..385cd658 100644
--- a/build/nw_ver.awk
+++ b/build/nw_ver.awk
@@ -14,11 +14,15 @@
# limitations under the License.
BEGIN {
-
- # fetch Apache version numbers from input file and writes them to STDOUT
+ # fetch Apache version numbers from input file and write them to STDOUT
while ((getline < ARGV[1]) > 0) {
- if (match ($0, /^#define AP_SERVER_MAJORVERSION_NUMBER /)) {
+ if (match ($0, /^#define AP_SERVER_COPYRIGHT \\/)) {
+ if (((getline < ARGV[1]) > 0) && (split($0, c, "\"") == 3)) {
+ copyright_str = c[2];
+ }
+ }
+ else if (match ($0, /^#define AP_SERVER_MAJORVERSION_NUMBER /)) {
ver_major = $3;
}
else if (match ($0, /^#define AP_SERVER_MINORVERSION_NUMBER /)) {
@@ -36,6 +40,8 @@ BEGIN {
print "VERSION = " ver_nlm "";
print "VERSION_STR = " ver_str "";
+ print "VERSION_MAJMIN = " ver_major ver_minor "";
+ print "COPYRIGHT_STR = " copyright_str "";
}