httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1170539 - in /httpd/httpd/branches/2.0.x: NWGNUmakefile build/NWGNUenvironment.inc build/NWGNUmakefile build/NWGNUtail.inc build/make_nw_export.awk modules/NWGNUmakefile modules/dav/main/dav.imp
Date Wed, 14 Sep 2011 11:22:32 GMT
Author: fuankg
Date: Wed Sep 14 11:22:31 2011
New Revision: 1170539

URL: http://svn.apache.org/viewvc?rev=1170539&view=rev
Log:
Some more NetWare build fixes and improvements.

Added sort function to awk export script to eleminate
need for external sort; removed DAV import file and
generate it now at compile time from headers; moved
some link parameters from commandline to def file.

Modified:
    httpd/httpd/branches/2.0.x/NWGNUmakefile
    httpd/httpd/branches/2.0.x/build/NWGNUenvironment.inc
    httpd/httpd/branches/2.0.x/build/NWGNUmakefile
    httpd/httpd/branches/2.0.x/build/NWGNUtail.inc
    httpd/httpd/branches/2.0.x/build/make_nw_export.awk
    httpd/httpd/branches/2.0.x/modules/NWGNUmakefile
    httpd/httpd/branches/2.0.x/modules/dav/main/dav.imp

Modified: httpd/httpd/branches/2.0.x/NWGNUmakefile
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/NWGNUmakefile?rev=1170539&r1=1170538&r2=1170539&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/NWGNUmakefile (original)
+++ httpd/httpd/branches/2.0.x/NWGNUmakefile Wed Sep 14 11:22:31 2011
@@ -349,7 +349,6 @@ install :: nlms FORCE
 	-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
@@ -377,6 +376,7 @@ installdev :: FORCE
 	-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

Modified: httpd/httpd/branches/2.0.x/build/NWGNUenvironment.inc
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/build/NWGNUenvironment.inc?rev=1170539&r1=1170538&r2=1170539&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/build/NWGNUenvironment.inc (original)
+++ httpd/httpd/branches/2.0.x/build/NWGNUenvironment.inc Wed Sep 14 11:22:31 2011
@@ -38,11 +38,26 @@ 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
+# 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
@@ -50,7 +65,7 @@ endif
 # 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
@@ -62,8 +77,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
@@ -120,25 +135,71 @@ WIN_CC	= mwcc
 # 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"
@@ -163,9 +224,12 @@ WIN_CFLAGS += -lMSL_All_x86.lib -lkernel
 
 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
@@ -176,7 +240,6 @@ CFLAGS += -O4,p
 endif
 
 # -prefix pre_nw.h      #include pre_nw.h for all files
-
 CFLAGS += -prefix pre_nw.h
 
 
@@ -205,9 +268,14 @@ INSTALL = $(AP_WORK)\Dist
 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
@@ -221,7 +289,7 @@ 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
@@ -239,8 +307,10 @@ endif
 
 INSTDEVDIRS := \
 	$(INSTDIRS) \
+	$(INSTALL)\$(BASEDIR)\build \
 	$(INSTALL)\$(BASEDIR)\include \
 	$(INSTALL)\$(BASEDIR)\lib \
+	$(EOLIST) 
 
 INSTDIRS += \
 	$(INSTALL)\$(BASEDIR) \
@@ -254,52 +324,26 @@ INSTDIRS += \
 	$(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
@@ -307,8 +351,9 @@ XML		= $(APU_WORK)/xml
 
 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

Modified: httpd/httpd/branches/2.0.x/build/NWGNUmakefile
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/build/NWGNUmakefile?rev=1170539&r1=1170538&r2=1170539&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/build/NWGNUmakefile (original)
+++ httpd/httpd/branches/2.0.x/build/NWGNUmakefile Wed Sep 14 11:22:31 2011
@@ -24,17 +24,25 @@ FILES_prebuild_headers = \
 	$(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 >> $@
@@ -52,11 +60,11 @@ $(NLM_NAME)_cc.opt : NWGNUmakefile $(AP_
 	@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
@@ -65,11 +73,11 @@ $(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 $@
 
@@ -94,6 +102,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
 #
@@ -102,13 +117,14 @@ install :: nlms FORCE
 
 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

Modified: httpd/httpd/branches/2.0.x/build/NWGNUtail.inc
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/build/NWGNUtail.inc?rev=1170539&r1=1170538&r2=1170539&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/build/NWGNUtail.inc (original)
+++ httpd/httpd/branches/2.0.x/build/NWGNUtail.inc Wed Sep 14 11:22:31 2011
@@ -7,7 +7,6 @@
 # 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
@@ -28,6 +27,26 @@ ifndef NLM_COPYRIGHT
 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
 #
@@ -224,7 +243,6 @@ else
 	@echo -nlmversion=$(VERSION) >> $@
 endif
 	@echo -l $(NWOS) >> $@
-	@echo -l $(AP)/$(OBJDIR) >> $@
 	@echo -l $(APR)/$(OBJDIR) >> $@
 	@echo -l $(APR) >> $@
 	@echo -l $(APRUTIL)/$(OBJDIR) >> $@
@@ -245,7 +263,6 @@ endif
 	@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
@@ -279,6 +296,7 @@ endif
 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

Modified: httpd/httpd/branches/2.0.x/build/make_nw_export.awk
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/build/make_nw_export.awk?rev=1170539&r1=1170538&r2=1170539&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/build/make_nw_export.awk (original)
+++ httpd/httpd/branches/2.0.x/build/make_nw_export.awk Wed Sep 14 11:22:31 2011
@@ -13,35 +13,25 @@
 # 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
 }
@@ -51,13 +41,25 @@ function add_symbol (sym_name) {
     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)
@@ -79,13 +81,37 @@ function add_symbol (sym_name) {
     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)
-#}

Modified: httpd/httpd/branches/2.0.x/modules/NWGNUmakefile
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/modules/NWGNUmakefile?rev=1170539&r1=1170538&r2=1170539&view=diff
==============================================================================
--- httpd/httpd/branches/2.0.x/modules/NWGNUmakefile (original)
+++ httpd/httpd/branches/2.0.x/modules/NWGNUmakefile Wed Sep 14 11:22:31 2011
@@ -1,8 +1,8 @@
 #
 # 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
 
@@ -27,15 +27,21 @@ SUBDIRS += ssl \
 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
 



Mime
View raw message