summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGuenter Knauf <fuankg@apache.org>2011-03-08 16:04:40 +0000
committerGuenter Knauf <fuankg@apache.org>2011-03-08 16:04:40 +0000
commit46b7e1d21098c1205e785f8705ead7186c3944ee (patch)
tree46112fb0f740ee3eb51c306efe92b928ac745f9a /build
parentc1e20231fe196f30cd862bb4ce63be3bb3d07818 (diff)
downloadhttpd-46b7e1d21098c1205e785f8705ead7186c3944ee.tar.gz
NetWare build overhaul in order to compile on Linux.
Take 1. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1079407 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r--build/NWGNUenvironment.inc135
-rw-r--r--build/NWGNUhead.inc71
-rw-r--r--build/NWGNUmakefile91
-rw-r--r--build/NWGNUtail.inc249
4 files changed, 282 insertions, 264 deletions
diff --git a/build/NWGNUenvironment.inc b/build/NWGNUenvironment.inc
index b0269b350a..b9cab4deee 100644
--- a/build/NWGNUenvironment.inc
+++ b/build/NWGNUenvironment.inc
@@ -118,6 +118,9 @@ endif
OBJDIR = obj_$(RELEASE)
+# Define minimum APR version to check for
+APR_WANTED = 1004000
+
#
# Setup compiler information
#
@@ -131,9 +134,36 @@ WIN_CC = mwcc
# Setup build tools
AWK = awk
+SORT = sort
-# Define minimum APR version to check for
-APR_WANTED = 1004000
+#
+# Declare Command and tool macros here
+#
+
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL = rm -f $1
+RMDIR = rm -rf $1
+MKDIR = mkdir -p $1
+COPY = cp -av $1 $2
+COPYR = cp -ar $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))
+ECHONL = cmd /c echo.
+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))
+ECHONL = command /c echo.
+endif
+MKDIR = $(shell if not exist $(subst /,\,$1)\NUL md 2>NUL $(subst /,\,$1))
+COPY = copy /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
+COPYR = xcopy /y /e 2>NUL $(subst /,\,$1) $(subst /,\,$2)
+CAT = type
+endif
ifdef IPV6
ifndef USE_STDSOCKETS
@@ -141,17 +171,23 @@ USE_STDSOCKETS=1
endif
endif
-NOVI = $(NOVELLLIBC)\imports
+NOVI = $(NOVELLLIBC)/imports
-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 := $(INCDIRS);$(LDAPSDK)/inc
+INCDIRS += $(LDAPSDK)/inc;
endif
ifneq "$(ZLIBSDK)" ""
-INCDIRS := $(INCDIRS);$(ZLIBSDK)
+#INCDIRS := $(INCDIRS);$(ZLIBSDK)
+INCDIRS += $(ZLIBSDK);
endif
ifneq "$(PCRESRC)" ""
-INCDIRS := $(INCDIRS);$(PCRESRC)
+#INCDIRS := $(INCDIRS);$(PCRESRC)
+INCDIRS += $(PCRESRC);
endif
DEFINES = -DNETWARE
@@ -169,9 +205,9 @@ 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"
@@ -217,7 +253,9 @@ endif
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
@@ -238,8 +276,8 @@ endif
endif
ifndef INSTALL
-INSTALL = $(AP_WORK)\Dist
-INSTDIRS = $(AP_WORK)\Dist
+INSTALL = $(AP_WORK)/Dist
+INSTDIRS = $(AP_WORK)/Dist
endif
ifndef BASEDIR
@@ -276,69 +314,40 @@ endif
INSTDEVDIRS := \
$(INSTDIRS) \
- $(INSTALL)\$(BASEDIR)\include \
- $(INSTALL)\$(BASEDIR)\lib \
+ $(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
-
-
-#
-# Setup base C compiler flags
-#
+ $(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 \
#
# Common directories
#
-STDMOD = $(AP_WORK)/modules
-NWOS = $(AP_WORK)/os/netware
-SERVER = $(AP_WORK)/server
-SRC = $(AP_WORK)
+SRC = $(subst \,/,$(AP_WORK))
+APBUILD = $(SRC)/build
+STDMOD = $(SRC)/modules
+HTTPD = $(SRC)/modules/http
+NWOS = $(SRC)/os/netware
+SERVER = $(SRC)/server
+SUPMOD = $(SRC)/support
APR = $(APR_WORK)
APRUTIL = $(APU_WORK)
APULDAP = $(APU_WORK)/ldap
-SUPMOD = $(AP_WORK)/support
-PCRE = $(PCRESRC)
-APRTEST = $(APR_WORK)/test
-HTTPD = $(AP_WORK)/modules/http
XML = $(APU_WORK)/xml
-PREBUILD_INST = $(AP_WORK)/nwprebuild
+APRTEST = $(APR_WORK)/test
+PCRE = $(PCRESRC)
+PREBUILD_INST = $(SRC)/nwprebuild
#
# Internal Libraries
diff --git a/build/NWGNUhead.inc b/build/NWGNUhead.inc
index 3b6ffcc9d8..2ae65206ff 100644
--- a/build/NWGNUhead.inc
+++ b/build/NWGNUhead.inc
@@ -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):
+ @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) *.dep $(DEL) *.dep
- $(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,$@)
diff --git a/build/NWGNUmakefile b/build/NWGNUmakefile
index ac3aeee311..401b3da3d2 100644
--- a/build/NWGNUmakefile
+++ b/build/NWGNUmakefile
@@ -25,54 +25,53 @@ FILES_prebuild_headers = \
nlms :: chkapr $(NWOS)/httpd.imp $(NWOS)/chartables.c
$(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 $^ | $(SORT) >$@
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 -I..\include >> $@
- @echo -I..\modules\http >> $@
- @echo -I..\modules\aaa >> $@
- @echo -I..\modules\core >> $@
- @echo -I..\os\netware >> $@
- @echo -I..\server\mpm\netware >> $@
- @echo -I$(APR)\include >> $@
- @echo -I$(APRUTIL)\include >> $@
- @echo -ir $(NOVELLLIBC) >> $@
-
-$(PCRE)/%.h: $(subst /,\,$(PCRE))\%.h.generic
- @echo Creating $(subst /,\,$@)
- copy $< $(subst /,\,$(PCRE))\$(@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)-I$(SRC)/include$(DL)>> $@
+ @echo $(DL)-I$(HTTPD)$(DL)>> $@
+ @echo $(DL)-I$(STDMOD)/aaa$(DL)>> $@
+ @echo $(DL)-I$(STDMOD)/core$(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 /,\,$@)
+ @echo $(DL)GEN $@$(DL)
@$< $@
%.exe: $(PCRE)/%.c
- @echo Creating Build Helper $@
+ @echo $(DL)Creating Build Helper $@$(DL)
@$(WIN_CC) $(WIN_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 $@
+%.exe: $(SERVER)/%.c
+ @echo $(DL)Creating Build Helper $@$(DL)
@$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
else
@@ -90,8 +89,8 @@ endif
#
# Check for minimum APR version
#
-chkapr: $(APR)\build\nw_ver.awk $(APR)\include\apr_version.h
- @echo Checking for 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 $^
#
@@ -101,17 +100,17 @@ chkapr: $(APR)\build\nw_ver.awk $(APR)\include\apr_version.h
install :: nlms FORCE
clean ::
- $(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
+ $(call DEL,$(PCRE)/config.h)
+ $(call DEL,$(PCRE)/pcre.h)
+ $(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 +118,5 @@ endif
# in this makefile
#
-include $(AP_WORK)/build/NWGNUtail.inc
+include $(APBUILD)/NWGNUtail.inc
diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc
index a972847598..483a86d7e2 100644
--- a/build/NWGNUtail.inc
+++ b/build/NWGNUtail.inc
@@ -27,31 +27,47 @@ 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 =
+endif
+
+ifeq "$(NLM_EXIT_SYM =
+NLM_EXIT_SYM =
+endif
+
#
# Create dependency lists based on the files available
#
CCOPT_DEPENDS = \
- $(AP_WORK)\build\NWGNUhead.inc \
- $(AP_WORK)\build\NWGNUenvironment.inc \
- $(AP_WORK)\build\NWGNUtail.inc \
+ $(APBUILD)/NWGNUhead.inc \
+ $(APBUILD)/NWGNUenvironment.inc \
+ $(APBUILD)/NWGNUtail.inc \
NWGNUmakefile \
$(CUSTOM_INI) \
$(EOLIST)
CPPOPT_DEPENDS = \
- $(AP_WORK)\build\NWGNUhead.inc \
- $(AP_WORK)\build\NWGNUenvironment.inc \
- $(AP_WORK)\build\NWGNUtail.inc \
+ $(APBUILD)/NWGNUhead.inc \
+ $(APBUILD)/NWGNUenvironment.inc \
+ $(APBUILD)/NWGNUtail.inc \
NWGNUmakefile \
$(CUSTOM_INI) \
$(EOLIST)
$(NLM_NAME)_LINKOPT_DEPENDS = \
$(TARGET_lib) \
- $(AP_WORK)\build\NWGNUenvironment.inc \
+ $(APBUILD)/NWGNUenvironment.inc \
NWGNUmakefile \
- $(AP_WORK)\build\NWGNUtail.inc \
+ $(APBUILD)/NWGNUtail.inc \
$(CUSTOM_INI) \
$(VERSION_INC) \
$(EOLIST)
@@ -60,9 +76,9 @@ ifeq "$(words $(strip $(TARGET_lib)))" "1"
LIB_NAME = $(basename $(notdir $(TARGET_lib)))
$(LIB_NAME)_LIBLST_DEPENDS = \
$(FILES_lib_objs) \
- $(AP_WORK)\build\NWGNUenvironment.inc \
+ $(APBUILD)/NWGNUenvironment.inc \
NWGNUmakefile \
- $(AP_WORK)\build\NWGNUtail.inc \
+ $(APBUILD)/NWGNUtail.inc \
$(CUSTOM_INI) \
$(EOLIST)
endif
@@ -100,56 +116,60 @@ endif
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
-$(OBJDIR)/%.o: %.c $(OBJDIR)\$(NLM_NAME)_cc.opt
- @echo Compiling $<
- $(CC) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\$(NLM_NAME)_cc.opt
+$(OBJDIR)/%.o: %.c $(OBJDIR)/$(NLM_NAME)_cc.opt
+# @echo Compiling $<
+ @echo $(DL)CC $<$(DL)
+ $(CC) -o $@ $< @$(word 2, $^)
-$(OBJDIR)\$(NLM_NAME)_cc.opt: $(CCOPT_DEPENDS)
- $(CHK) $@ $(DEL) $@
- @echo Generating $@
+$(OBJDIR)/$(NLM_NAME)_cc.opt: $(CCOPT_DEPENDS)
+ $(call DEL,$@)
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
ifneq "$(strip $(CFLAGS))" ""
- @echo $(CFLAGS) >> $@
+ @echo $(DL)$(CFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XCFLAGS))" ""
- @echo $(XCFLAGS) >> $@
+ @echo $(DL)$(XCFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XINCDIRS))" ""
- @echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >> $@
+ @echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
endif
ifneq "$(strip $(INCDIRS))" ""
- @echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
+ @echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
endif
ifneq "$(strip $(DEFINES))" ""
- @echo $(DEFINES) >> $@
+ @echo $(DL)$(DEFINES)$(DL)>> $@
endif
ifneq "$(strip $(XDEFINES))" ""
- @echo $(XDEFINES) >> $@
+ @echo $(DL)$(XDEFINES)$(DL)>> $@
endif
-$(OBJDIR)/%.o: %.cpp $(OBJDIR)\cpp.opt
- @echo Compiling $<
- $(CPP) $< -o=$(OBJDIR)\$(@F) @$(OBJDIR)\cpp.opt
+$(OBJDIR)/%.o: %.cpp $(OBJDIR)/$(NLM_NAME)_cpp.opt
+# @echo Compiling $<
+ @echo $(DL)CC $<$(DL)
+ $(CC) -o $@ $< @$(word 2, $^)
-$(OBJDIR)\cpp.opt: $(CPPOPT_DEPENDS)
- $(CHK) $@ $(DEL) $@
- @echo Generating $@
+$(OBJDIR)/$(NLM_NAME)_cpp.opt: $(CPPOPT_DEPENDS)
+ $(call DEL,$@)
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
ifneq "$(strip $(CFLAGS))" ""
- @echo $(CFLAGS) >> $@
+ @echo $(DL)$(CFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XCFLAGS))" ""
- @echo $(XCFLAGS) >> $@
+ @echo $(DL)$(XCFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(XINCDIRS))" ""
- @echo $(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir)) >> $@
+ @echo $(DL)$(foreach xincdir,$(strip $(subst ;,$(SPACE),$(XINCDIRS))),-I$(xincdir))$(DL)>> $@
endif
ifneq "$(strip $(INCDIRS))" ""
- @echo $(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir)) >> $@
+ @echo $(DL)$(foreach incdir,$(strip $(subst ;,$(SPACE),$(INCDIRS))),-I$(incdir))$(DL)>> $@
endif
ifneq "$(strip $(DEFINES))" ""
- @echo $(DEFINES) >> $@
+ @echo $(DL)$(DEFINES)$(DL)>> $@
endif
ifneq "$(strip $(XDEFINES))" ""
- @echo $(XDEFINES) >> $@
+ @echo $(DL)$(XDEFINES)$(DL)>> $@
endif
endif # one target nlm
@@ -162,21 +182,23 @@ endif # one target nlm
ifeq "$(words $(strip $(TARGET_lib)))" "1"
-$(TARGET_lib) : $(OBJDIR)\$(LIB_NAME)_lib.lst
- @echo Generating $@
- $(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
- $(LIB) -o $(OBJDIR)\$(@F) @$?
+$(TARGET_lib) : $(OBJDIR)/$(LIB_NAME)_lib.lst
+ $(call DEL,$@)
+# @echo Generating $@
+ @echo $(DL)AR $@$(DL)
+ $(LIB) -o $@ @$<
-$(OBJDIR)\$(LIB_NAME)_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
- $(CHK) $@ $(DEL) $@
- @echo Generating $@
+$(OBJDIR)/$(LIB_NAME)_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
+ $(call DEL,$@)
ifneq "$(strip $(FILES_lib_objs))" ""
- @echo $(foreach objfile,$(FILES_lib_objs),$(subst /,\,$(objfile)) ) >> $@
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
+ @echo $(DL)$(FILES_lib_objs)$(DL)>> $@
endif
else # We must have more than one target library so load the individual makefiles
-$(OBJDIR)/%.lib: NWGNU% $(AP_WORK)\build\NWGNUhead.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUenvironment.inc FORCE
+$(OBJDIR)/%.lib: NWGNU% $(APBUILD)/NWGNUhead.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUenvironment.inc FORCE
@echo Calling $<
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
@@ -186,121 +208,112 @@ endif
# Rules to build nlms.
#
-vpath libcpre.o $(NOVELLLIBC)\imports
+vpath libcpre.o $(NOVI)
# If we only have one target NLM then build it
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
-$(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)\$(NLM_NAME)_link.opt
- @echo Linking $@
- $(LINK) @$(OBJDIR)\$(NLM_NAME)_link.opt
+$(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)/$(NLM_NAME)_link.opt
+# @echo Linking $@
+ @echo $(DL)LINK $@$(DL)
+ $(LINK) @$(OBJDIR)/$(NLM_NAME)_link.opt
# This will force the link option file to be rebuilt if we change the
# corresponding makefile
-$(OBJDIR)\$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
- $(CHK) $(OBJDIR)\$(@F) $(DEL) $(OBJDIR)\$(@F)
- $(CHK) $(OBJDIR)\$(NLM_NAME)_link.def $(DEL) $(OBJDIR)\$(NLM_NAME)_link.def
- @echo Generating $@
- @echo -warnings off >> $@
- @echo -zerobss >> $@
- @echo -o $(TARGET_nlm) >> $@
+$(OBJDIR)/$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
+ $(call DEL,$@)
+ $(call DEL,$(@:.opt=.def))
+# @echo Generating $@
+ @echo $(DL)GEN $@$(DL)
+ @echo $(DL)-warnings off$(DL)>> $@
+ @echo $(DL)-zerobss$(DL)>> $@
+ @echo $(DL)-o $(TARGET_nlm)$(DL)>> $@
ifneq "$(FILE_nlm_copyright)" ""
- @-type $(FILE_nlm_copyright) >> $@
+ @-type $(FILE_nlm_copyright)$(DL)>> $@
endif
ifeq "$(RELEASE)" "debug"
- @echo -g >> $@
- @echo -sym internal >> $@
- @echo -sym codeview4 >> $@
- @echo -osym $(OBJDIR)\$(NLM_NAME).sym >> $@
+ @echo $(DL)-g$(DL)>> $@
+ @echo $(DL)-sym internal$(DL)>> $@
+ @echo $(DL)-sym codeview4$(DL)>> $@
+ @echo $(DL)-osym $(OBJDIR)/$(NLM_NAME).sym$(DL)>> $@
else
- @echo -sym internal >> $@
-endif
- @echo -l $(NWOS) >> $@
- @echo -l $(AP)/$(OBJDIR) >> $@
- @echo -l $(APR)/$(OBJDIR) >> $@
- @echo -l $(APRUTIL)/$(OBJDIR) >> $@
- @echo -l $(PCRE)/$(OBJDIR) >> $@
- @echo -l $(HTTPD)/$(OBJDIR) >> $@
- @echo -l $(SERVER)/$(OBJDIR) >> $@
- @echo -l $(STDMOD)/$(OBJDIR) >> $@
- @echo -l $(NWOS)/$(OBJDIR) >> $@
- @echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime" >> $@
- @echo -l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++" >> $@
+ @echo $(DL)-sym internal$(DL)>> $@
+endif
+ @echo $(DL)-l $(NWOS)$(DL)>> $@
+ @echo $(DL)-l $(AP)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(APR)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(APRUTIL)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(PCRE)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(HTTPD)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(SERVER)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(STDMOD)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(NWOS)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/Runtime"$(DL)>> $@
+ @echo $(DL)-l "$(METROWERKS)/Novell Support/Metrowerks Support/Libraries/MSL C++"$(DL)>> $@
ifneq "$(IPV6)" ""
- @echo -l $(NOVELLLIBC)\include\winsock\IPV6 >> $@
+ @echo $(DL)-l $(NOVELLLIBC)/include/winsock/IPV6$(DL)>> $@
endif
- @echo -l $(NOVELLLIBC)/imports >> $@
+ @echo $(DL)-l $(NOVELLLIBC)/imports$(DL)>> $@
ifneq "$(LDAPSDK)" ""
- @echo -l $(LDAPSDK)/lib/nlm >> $@
+ @echo $(DL)-l $(LDAPSDK)/imports$(DL)>> $@
endif
- @echo -l $(APULDAP)/$(OBJDIR) >> $@
- @echo -l $(XML)/$(OBJDIR) >> $@
- @echo -l $(SRC)/$(OBJDIR) >> $@
- @echo -nodefaults >> $@
- @echo -map $(OBJDIR)\$(NLM_NAME).map>> $@
+ @echo $(DL)-l $(APULDAP)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(XML)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-l $(SRC)/$(OBJDIR)$(DL)>> $@
+ @echo $(DL)-nodefaults$(DL)>> $@
+ @echo $(DL)-map $(OBJDIR)/$(NLM_NAME).map>> $@
ifneq "$(strip $(XLFLAGS))" ""
- @echo $(XLFLAGS) >> $@
+ @echo $(DL)$(XLFLAGS)$(DL)>> $@
endif
ifneq "$(strip $(FILES_nlm_objs))" ""
- @echo $(foreach objfile,$(strip $(FILES_nlm_objs)),$(subst /,\,$(objfile))) >> $@
+ @echo $(DL)$(foreach objfile,$(strip $(FILES_nlm_objs)),$(objfile))$(DL)>> $@
endif
ifneq "$(FILES_nlm_libs)" ""
- @echo $(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(subst /,\,$(libfile))) >> $@
+ @echo $(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(libfile))$(DL)>> $@
endif
- @echo -commandfile $(OBJDIR)\$(NLM_NAME)_link.def >> $@
- @echo # Do not edit this file - it is created by make! > $(OBJDIR)\$(NLM_NAME)_link.def
- @echo # All your changes will be lost!! >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)-commandfile $(@:.opt=.def)$(DL)>> $@
+ @echo $(DL)# Do not edit this file - it is created by make!$(DL)> $(@:.opt=.def)
+ @echo $(DL)# All your changes will be lost!!$(DL)>> $(@:.opt=.def)
ifneq "$(FILE_nlm_msg)" ""
- @echo Messages $(FILE_nlm_msg) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)Messages $(FILE_nlm_msg)$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILE_nlm_hlp)" ""
- @echo Help $(FILE_nlm_hlp) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)Help $(FILE_nlm_hlp)$(DL)>> $(@:.opt=.def)
endif
ifeq "$(FILE_nlm_copyright)" ""
- @echo copyright "$(NLM_COPYRIGHT)" >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)copyright "$(NLM_COPYRIGHT)"$(DL)>> $(@:.opt=.def)
endif
- @echo description "$(NLM_DESCRIPTION)" >> $(OBJDIR)\$(NLM_NAME)_link.def
- @echo threadname "$(NLM_THREAD_NAME)" >> $(OBJDIR)\$(NLM_NAME)_link.def
-ifneq "$(NLM_STACK_SIZE)" ""
- @echo stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE)))) >> $(OBJDIR)\$(NLM_NAME)_link.def
-else
- @echo stacksize 64000 >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
- @echo screenname "$(NLM_SCREEN_NAME)" >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)description "$(NLM_DESCRIPTION)"$(DL)>> $(@:.opt=.def)
+ @echo $(DL)threadname "$(NLM_THREAD_NAME)"$(DL)>> $(@:.opt=.def)
+ @echo $(DL)screenname "$(NLM_SCREEN_NAME)"$(DL)>> $(@:.opt=.def)
+ @echo $(DL)stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE))))$(DL)>> $(@:.opt=.def)
ifneq "$(NLM_VERSION)" ""
- @echo version $(NLM_VERSION) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)version $(NLM_VERSION)$(DL)>> $(@:.opt=.def)
else
- @echo version $(VERSION) >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
-ifneq "$(NLM_ENTRY_SYM)" ""
- @echo start $(NLM_ENTRY_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
-ifneq "$(NLM_EXIT_SYM)" ""
- @echo exit $(NLM_EXIT_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)version $(VERSION)$(DL)>> $(@:.opt=.def)
endif
+ @echo $(DL)start $(NLM_ENTRY_SYM =
+ @echo $(DL)exit $(NLM_EXIT_SYM =
ifneq "$(NLM_CHECK_SYM)" ""
- @echo check $(NLM_CHECK_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
-endif
-ifneq "$(NLM_FLAGS)" ""
- @echo $(strip $(NLM_FLAGS)) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)check $(NLM_CHECK_SYM)$(DL)>> $(@:.opt=.def)
endif
+ @echo $(strip $(NLM_FLAGS))$(DL)>> $(@:.opt=.def)
ifneq "$(FILES_nlm_modules)" ""
- @echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst /,\,$(module))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(module))$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILES_nlm_Ximports)" ""
- @echo import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(subst /,\,$(import))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(import))$(DL)>> $(@:.opt=.def)
endif
ifneq "$(FILES_nlm_exports)" ""
- @echo export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(subst /,\,$(export))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(export))$(DL)>> $(@:.opt=.def)
endif
-
# if APACHE_UNIPROC is defined, don't include XDCData
ifndef APACHE_UNIPROC
ifneq "$(string $(XDCDATA))" ""
- @echo xdcdata $(XDCDATA) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)xdcdata $(XDCDATA)$(DL)>> $(@:.opt=.def)
else
- @echo xdcdata $(NWOS)\apache.xdc >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(DL)xdcdata apache.xdc$(DL)>> $(@:.opt=.def)
endif
endif
@@ -311,10 +324,10 @@ else # more than one target so look for individual makefiles.
ifndef NO_LICENSE_FILE
-$(OBJDIR)/%.nlm: NWGNU% $(AP_WORK)\build\NWGNUhead.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
- @echo Calling $<
+$(OBJDIR)/%.nlm: NWGNU% $(APBUILD)/NWGNUhead.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUenvironment.inc $(CUSTOM_INI) $(VERSION_INC) FORCE
+ @echo $(DL)Calling $<$(DL)
$(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
- $(CMD) echo.
+ @$(ECHONL)
else