-copy LICENSE $(INSTALL)\$(BASEDIR)\*.*
-copy README $(INSTALL)\$(BASEDIR)\*.*
-copy VERSIONING $(INSTALL)\$(BASEDIR)\*.*
-# $(CHK) STATUS copy STATUS $(INSTALL)\$(BASEDIR)\*.*
-copy STATUS $(INSTALL)\$(BASEDIR)\*.*
-copy support\dbmmanage.in $(INSTALL)\$(BASEDIR)\bin\dbmmanage.pl
-copy support\logresolve.pl.in $(INSTALL)\$(BASEDIR)\bin\logresolve.pl
-copy $(subst /,\,$(APR))\*.imp $(INSTALL)\$(BASEDIR)\lib\*.*
-copy $(subst /,\,$(NWOS))\*.imp $(INSTALL)\$(BASEDIR)\lib\*.*
-copy $(subst /,\,$(NWOS))\*.xdc $(INSTALL)\$(BASEDIR)\lib\*.*
+ -copy $(subst /,\,$(APBUILD))\NWGNU*.inc $(INSTALL)\$(BASEDIR)\build\*.*
#
# Any specialized rules here
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
+# LDAPSDK = C:/novell/ndk/cldapsdk/NetWare/libc
# endif
+ifdef LDAPSDK
+ifneq "$(wildcard $(LDAPSDK)/inc/ldap.h)" "$(LDAPSDK)/inc/ldap.h"
+$(error LDAPSDK does not point to a valid Novell CLDAP SDK)
+endif
+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
# 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
#
# 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
# Setup build tools
AWK = awk
-NOVI = $(NOVELLLIBC)\imports
+# Setup distribution tools
+ZIP = zip -qr9
+7ZA = 7za >NUL a
+
+#
+# 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
+
-INCDIRS = $(NOVELLLIBC)\include;$(NOVELLLIBC)\include\nks;$(NOVELLLIBC)\include\winsock;
+NOVI = $(NOVELLLIBC)/imports
+PRELUDE = $(NOVI)/libcpre.o
+
+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
+DEFINES = -DNETWARE
+ifndef USE_STDSOCKETS
+DEFINES += -DUSE_WINSOCK
+endif
ifndef DEBUG
-DEFINES += -DNDEBUG
+DEFINES += -DNDEBUG
+endif
+
+ifdef USE_STDSOCKETS
+VERSION_SKT = (BSDSOCK)
+else
+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
MWCW_MSL = "$(METROWERKS)/MSL"
CFLAGS = -c -nosyspath -Cpp_exceptions off -RTTI off -align 4 -w nocmdline -proc PII
+ifeq "$(REQUIRE_PROTOTYPES)" "1"
+CFLAGS += -r
+endif
+
# -g generate debugging information
# -O0 level 0 optimizations
-
ifeq "$(RELEASE)" "debug"
CFLAGS += -g -O0
endif
endif
# -prefix pre_nw.h #include pre_nw.h for all files
-
CFLAGS += -prefix pre_nw.h
INSTDIRS = $(AP_WORK)\Dist
endif
+ifeq ($(MAKECMDGOALS),installdev)
ifndef BASEDIR
-BASEDIR = Apache2
-export BASEDIR
+export BASEDIR = apache_$(VERSION_STR)-sdk
+endif
+else
+ifndef BASEDIR
+export BASEDIR = Apache2
+endif
endif
ifndef PORT
# 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
INSTDEVDIRS := \
$(INSTDIRS) \
+ $(INSTALL)\$(BASEDIR)\build \
$(INSTALL)\$(BASEDIR)\include \
$(INSTALL)\$(BASEDIR)\lib \
+ $(EOLIST)
INSTDIRS += \
$(INSTALL)\$(BASEDIR) \
$(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
-
-
-#
-# Setup base C compiler flags
-#
+ $(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)
-SUPMOD = $(AP_WORK)/support
-PCRE = $(AP_WORK)/srclib/pcre
-APRTEST = $(APR_WORK)/test
-HTTPD = $(AP_WORK)/modules/http
-XML = $(APU_WORK)/xml
+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)
#
# Internal Libraries
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
$(PCRE)/pcre.h \
$(EOLIST)
-nlms :: $(NWOS)/httpd.imp $(NWOS)/chartables.c
+nlms :: libs $(NWOS)/httpd.imp $(DAV)/main/dav.imp
+
+libs :: $(NWOS)/chartables.c
+
+#libs :: chkapr $(NWOS)/chartables.c
+
+$(DAV)/main/dav.imp : make_nw_export.awk $(DAV)/main/mod_dav.h
+ @echo $(DL)Creating $@$(DL)
+ $(AWK) -v EXPPREFIX=APACHE2 -f $^ >$@
$(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
+ @echo $(DL)Creating $@$(DL)
+ $(AWK) -v EXPPREFIX=APACHE2 -f $^ >$@
-nw_export.i : nw_export.inc $(FILES_prebuild_headers) $(NLM_NAME)_cc.opt
- @echo Generating $(subst /,\,$@)
- $(CC) $< @$(NLM_NAME)_cc.opt
-
-$(NLM_NAME)_cc.opt : NWGNUmakefile $(AP_WORK)\build\NWGNUenvironment.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUhead.inc
+nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
+ @echo $(DL)Creating $@$(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 -ir $(NOVELLLIBC) >> $@
$(APR)/include/%.h: $(subst /,\,$(APR))\include\%.hnw
- @echo Creating $(subst /,\,$@)
+ @echo $(DL)Creating $@$(DL)
copy $< $(subst /,\,$(APR))\include\$(@F)
$(APRUTIL)/include/%.h: $(subst /,\,$(APRUTIL))\include\%.hnw
- @echo Creating $(subst /,\,$@)
+ @echo $(DL)Creating $@$(DL)
copy $< $(subst /,\,$(APRUTIL))\include\$(@F)
$(PCRE)/%.h: $(subst /,\,$(PCRE))\%.hw
ifneq "$(BUILDTOOL_AS_NLM)" "1"
-$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
+$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c
@echo Creating $(subst /,\,$@)
@$< > $@
-%.exe: $(PCRE)/%.c
+%.exe: $(PCRE)/%.c $(PCRE)/config.h $(PCRE)/pcre.h
@echo Creating Build Helper $@
@$(WIN_CC) $(WIN_CFLAGS) $< -o $@
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
clean ::
$(CHK) nw_export.i $(DEL) nw_export.i
- $(CHK) $(NLM_NAME)_cc.opt $(DEL) $(NLM_NAME)_cc.opt
+ $(CHK) cc.opt $(DEL) cc.opt
$(CHK) NWGNUversion.inc $(DEL) NWGNUversion.inc
$(CHK) $(subst /,\,$(APR))\include\apr.h $(DEL) $(subst /,\,$(APR))\include\apr.h
$(CHK) $(subst /,\,$(APRUTIL))\include\apu.h $(DEL) $(subst /,\,$(APRUTIL))\include\apu.h
$(CHK) $(subst /,\,$(APRUTIL))\include\apr_ldap.h $(DEL) $(subst /,\,$(APRUTIL))\include\apr_ldap.h
$(CHK) $(subst /,\,$(PCRE))\config.h $(DEL) $(subst /,\,$(PCRE))\config.h
$(CHK) $(subst /,\,$(PCRE))\pcre.h $(DEL) $(subst /,\,$(PCRE))\pcre.h
+ $(CHK) $(subst /,\,$(DAV))\main\dav.imp $(DEL) $(subst /,\,$(DAV))\main\dav.imp
$(CHK) $(subst /,\,$(NWOS))\httpd.imp $(DEL) $(subst /,\,$(NWOS))\httpd.imp
ifneq "$(BUILDTOOL_AS_NLM)" "1"
$(CHK) $(subst /,\,$(NWOS))\chartables.c $(DEL) $(subst /,\,$(NWOS))\chartables.c
# If we are going to create an nlm, make sure we have assigned variables to
# use during the link.
#
-#echo NLM_NAME=$(NLM_NAME)
ifndef NLM_NAME
NLM_NAME = $(TARGET_nlm)
endif
NLM_COPYRIGHT = Licensed under the Apache License Version 2.0.
endif
+ifeq "$(NLM_FLAGS)" ""
+NLM_FLAGS = AUTOUNLOAD, PSEUDOPREEMPTION
+endif
+
+ifeq "$(NLM_STACK_SIZE)" ""
+NLM_STACK_SIZE = 65536
+endif
+
+ifeq "$(NLM_ENTRY_SYM)" ""
+NLM_ENTRY_SYM = _LibCPrelude
+endif
+
+ifeq "$(NLM_EXIT_SYM)" ""
+NLM_EXIT_SYM = _LibCPostlude
+endif
+
+ifeq "$(NLM_VERSION)" ""
+NLM_VERSION = $(VERSION)
+endif
+
#
# Create dependency lists based on the files available
#
@echo -nlmversion=$(VERSION) >> $@
endif
@echo -l $(NWOS) >> $@
- @echo -l $(AP)/$(OBJDIR) >> $@
@echo -l $(APR)/$(OBJDIR) >> $@
@echo -l $(APR) >> $@
@echo -l $(APRUTIL)/$(OBJDIR) >> $@
@echo -l $(XML)/$(OBJDIR) >> $@
@echo -nodefaults >> $@
@echo -map $(OBJDIR)\$(NLM_NAME).map>> $@
- @echo -threadname "$(NLM_THREAD_NAME)" >> $@
ifneq "$(NLM_STACK_SIZE)" ""
@echo -stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE)))) >> $@
else
ifneq "$(FILE_nlm_hlp)" ""
@echo Help $(FILE_nlm_hlp) >> $(OBJDIR)\$(NLM_NAME)_link.def
endif
+ @echo threadname "$(NLM_THREAD_NAME)" >> $(OBJDIR)\$(NLM_NAME)_link.def
ifneq "$(FILES_nlm_modules)" ""
@echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst /,\,$(module))) >> $(OBJDIR)\$(NLM_NAME)_link.def
endif
# See the License for the specific language governing permissions and
# limitations under the License.
#
-#
# Based on apr's make_export.awk, which is
# based on Ryan Bloom's make_export.pl
+#
BEGIN {
- printf(" (APACHE2)\n")
+}
+
+function add_symbol(sym_name) {
+ sub(" ", "", sym_name)
+ exports[++idx] = sym_name
}
# List of functions that we don't support, yet??
#/ap_some_name/{next}
-function add_symbol (sym_name) {
- if (count) {
- found++
- }
- gsub (/ /, "", sym_name)
- line = line sym_name ",\n"
-
- if (count == 0) {
- printf(" %s", line)
- line = ""
- }
-}
-
-/^[ \t]*AP([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
- sub("[ \t]*AP([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
+/^[ \t]*(AP|DAV)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)]([^ ]* )*[^(]+[(]/ {
+ sub("[ \t]*(AP|DAV)([RU]|_CORE)?_DECLARE[^(]*[(][^)]*[)][ \t]*", "")
sub("[(].*", "")
sub("([^ ]* (^([ \t]*[(])))+", "")
-
add_symbol($0)
next
}
symbol = args[2]
sub("^[ \t]+", "", symbol)
sub("[ \t]+$", "", symbol)
-
add_symbol("ap_hook_" symbol)
add_symbol("ap_hook_get_" symbol)
add_symbol("ap_run_" symbol)
next
}
+/^[ \t]*AP[RU]?_DECLARE_EXTERNAL_HOOK[^(]*[(][^)]*/ {
+ split($0, args, ",")
+ prefix = args[1]
+ sub("^.*[(]", "", prefix)
+ symbol = args[4]
+ sub("^[ \t]+", "", symbol)
+ sub("[ \t]+$", "", symbol)
+ add_symbol(prefix "_hook_" symbol)
+ add_symbol(prefix "_hook_get_" symbol)
+ add_symbol(prefix "_run_" symbol)
+ next
+}
+
/^[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(][^)]*[)]/ {
sub("[ \t]*APR_POOL_DECLARE_ACCESSOR[^(]*[(]", "", $0)
sub("[)].*$", "", $0)
next
}
-/^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;$/ {
- varname = $NF;
- gsub( /[*;]/, "", varname);
- gsub( /\[.*\]/, "", varname);
- add_symbol(varname);
+/^[ \t]*(extern[ \t]+)?AP[RU]?_DECLARE_DATA .*;/ {
+ gsub(/[*;\n\r]/, "", $NF)
+ gsub(/\[.*\]/, "", $NF)
+ add_symbol($NF)
+}
+
+
+END {
+ printf("Added %d symbols to export list.\n", idx) > "/dev/stderr"
+ # sort symbols with shell sort
+ increment = int(idx / 2)
+ while (increment > 0) {
+ for (i = increment+1; i <= idx; i++) {
+ j = i
+ temp = exports[i]
+ while ((j >= increment+1) && (exports[j-increment] > temp)) {
+ exports[j] = exports[j-increment]
+ j -= increment
+ }
+ exports[j] = temp
+ }
+ if (increment == 2)
+ increment = 1
+ else
+ increment = int(increment*5/11)
+ }
+ # print the array
+ printf(" (%s)\n", EXPPREFIX)
+ while (x < idx - 1) {
+ printf(" %s,\n", exports[++x])
+ }
+ printf(" %s\n", exports[++x])
}
-#END {
-# printf(" %s", line)
-#}
#
# Declare the sub-directories to be built here
#
-# To build with exerimental modules set the environment
-# variable EXPERIMENTAL=1
+# To build with exerimental modules set the environment
+# variable WITH_EXPERIMENTAL=1
# To build with the mod_ssl module set the environment
# variable WITH_MOD_SSL=1
endif
endif
-#If the mod_edir directory exists then build the mod_edir module
-ifeq "$(wildcard $(AP_WORK)\modules\mod_edir)" "$(AP_WORK)\modules\mod_edir"
-SUBDIRS += mod_edir \
+# Allow the experimental modules to be built if WITH_EXPERIMENTAL is defined
+ifeq "$(WITH_EXPERIMENTAL)" "1"
+SUBDIRS += experimental \
$(EOLIST)
endif
-# Allow the experimental modules to be built if EXPERIMENTAL is defined
-ifeq "$(EXPERIMENTAL)" "1"
-SUBDIRS += experimental \
+# Allow the test modules to be built if WITH_TEST is defined
+ifeq "$(WITH_TEST)" "1"
+SUBDIRS += test \
+ $(EOLIST)
+endif
+
+#If the mod_edir directory exists then build the mod_edir module
+ifeq "$(wildcard $(STDMOD)/mod_edir)" "$(STDMOD)/mod_edir"
+SUBDIRS += mod_edir \
$(EOLIST)
endif
+++ /dev/null
-
- (mod_dav)
- dav_add_all_liveprop_xmlns,
- dav_add_lock,
- dav_add_response,
- dav_add_vary_header,
- dav_auto_checkin,
- dav_auto_checkout,
- dav_buffer_append,
- dav_buffer_init,
- dav_buffer_place,
- dav_buffer_place_mem,
- dav_check_bufsize,
- dav_close_propdb,
- dav_core_find_liveprop,
- dav_core_insert_all_liveprops,
- dav_core_register_uris,
- dav_do_find_liveprop,
- dav_find_child,
- dav_get_allprops,
- dav_get_binding_hooks,
- dav_get_depth,
- dav_get_liveprop_info,
- dav_get_liveprop_ns_count,
- dav_get_liveprop_ns_index,
- dav_get_liveprop_supported,
- dav_get_lock_hooks,
- dav_get_locktoken_list,
- dav_get_propdb_hooks,
- dav_get_props,
- dav_get_resource_state,
- dav_get_search_hooks,
- dav_get_timeout,
- dav_get_vsn_hooks,
- dav_hook_find_liveprop,
- dav_hook_gather_propsets,
- dav_hook_insert_all_liveprops,
- dav_lock_get_activelock,
- dav_lock_parse_lockinfo,
- dav_lock_query,
- dav_lookup_provider,
- dav_lookup_uri,
- dav_new_error,
- dav_new_error_tag,
- dav_notify_created,
- dav_open_propdb,
- dav_prop_commit,
- dav_prop_exec,
- dav_prop_rollback,
- dav_prop_validate,
- dav_push_error,
- dav_register_liveprop_group,
- dav_register_provider,
- dav_set_bufsize,
- dav_unlock,
- dav_validate_request,
- dav_validate_root,
- dav_xml_get_cdata,
- dav_xmlns_add,
- dav_xmlns_add_uri,
- dav_xmlns_create,
- dav_xmlns_generate,
- dav_xmlns_get_prefix,
- dav_xmlns_get_uri