summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Knauf <fuankg@apache.org>2009-06-30 04:10:16 +0000
committerGuenter Knauf <fuankg@apache.org>2009-06-30 04:10:16 +0000
commite5c13ef2611eb15a628c382f74bebb204e9d5e5c (patch)
treea8880d1d35c9e001c63c01cc0920b30abad733a9
parentbca20658983a50f683225d2ce2c6ff347bc30980 (diff)
downloadapr-e5c13ef2611eb15a628c382f74bebb204e9d5e5c.tar.gz
build tweaks for NetWare (continued)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@789553 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--NWGNUmakefile5
-rw-r--r--build/NWGNUhead.inc6
-rw-r--r--build/NWGNUtail.inc79
3 files changed, 47 insertions, 43 deletions
diff --git a/NWGNUmakefile b/NWGNUmakefile
index d8e92869f..b43a6205d 100644
--- a/NWGNUmakefile
+++ b/NWGNUmakefile
@@ -19,7 +19,7 @@ endif
# paths to tools
#
ifndef APR_WORK
-export APR_WORK := $(strip $(shell pwd))
+export APR_WORK = $(CURDIR)
endif
include $(APR_WORK)/build/NWGNUhead.inc
@@ -418,9 +418,6 @@ $(INSTDEVDIRS) ::
$(CHKNOT) $@\NUL mkdir $@
endif
-test :: nlms FORCE
- $(MAKE) -C $(APRTEST) -f NWGNUmakefile
-
#
# Any specialized rules here
#
diff --git a/build/NWGNUhead.inc b/build/NWGNUhead.inc
index c02f47b8f..e9a5d097a 100644
--- a/build/NWGNUhead.inc
+++ b/build/NWGNUhead.inc
@@ -63,6 +63,10 @@ clobber_all :: clean clobber_install
clobber_install ::
-$(DELTREE) $(INSTALL) 2>NUL
+test :: default
+ $(MAKE) -C $(APRTEST) -f NWGNUmakefile RELEASE=$(RELEASE) DEST="$(INSTALL)" LM_LICENSE_FILE="$(LM_LICENSE_FILE)"
+ $(CMD) echo.
+
#
# build recursive targets
#
@@ -81,7 +85,7 @@ FORCE:
# Standard targets
#
-clean :: $(SUBDIRS)
+clean :: $(SUBDIRS) $(APRTEST)
@echo Cleaning up $(CURDIR)
-$(DELTREE) $(OBJDIR) 2> NUL
$(CHK) *.err $(DEL) *.err
diff --git a/build/NWGNUtail.inc b/build/NWGNUtail.inc
index 5c098172d..b68b3537c 100644
--- a/build/NWGNUtail.inc
+++ b/build/NWGNUtail.inc
@@ -7,7 +7,7 @@
# If we are going to create an nlm, make sure we have assigned variables to
# use during the link.
#
-echo NLM_NAME=$(NLM_NAME)
+#echo NLM_NAME=$(NLM_NAME)
ifndef NLM_NAME
NLM_NAME = $(TARGET_nlm)
endif
@@ -85,7 +85,7 @@ endif
$(APR)/build/NWGNUversion.inc : $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
@echo Generating $@
- $(AWK) -f $^ > $@
+ @$(AWK) -f $^ > $@
-include $(APR)/build/NWGNUversion.inc
@@ -97,20 +97,22 @@ VERSION_STR = 1.0.0
endif
ifeq "$(words $(strip $(TARGET_nlm)))" "1"
-INCLUDE_BLDCMDS=1
+INCLUDE_BLDCMDS = 1
+CCOPT_NAME = $(NLM_NAME)
endif
ifeq "$(words $(strip $(TARGET_lib)))" "1"
-INCLUDE_BLDCMDS=1
+INCLUDE_BLDCMDS = 1
+CCOPT_NAME = $(LIB_NAME)
endif
ifeq "$(INCLUDE_BLDCMDS)" "1"
-$(OBJDIR)/%.o: %.c $(OBJDIR)/$(NLM_NAME)_cc.opt
+$(OBJDIR)/%.o: %.c $(OBJDIR)/$(CCOPT_NAME)_cc.opt
@echo Compiling $<
- $(CC) $< -o $@ @$(OBJDIR)/$(NLM_NAME)_cc.opt
+ $(CC) -o $@ $< @$(word 2, $^)
-$(OBJDIR)/$(NLM_NAME)_cc.opt: $(CCOPT_DEPENDS)
+$(OBJDIR)/$(CCOPT_NAME)_cc.opt: $(CCOPT_DEPENDS)
$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
@echo CCOPT_DEPENDS=$^
@echo Generating $@
@@ -133,11 +135,11 @@ ifneq "$(strip $(XDEFINES))" ""
@echo $(XDEFINES) >> $@
endif
-$(OBJDIR)/%.o: %.cpp $(OBJDIR)/cpp.opt
+$(OBJDIR)/%.o: %.cpp $(OBJDIR)/$(CCOPT_NAME)_cpp.opt
@echo Compiling $<
- $(CPP) $< -o $@ @$(OBJDIR)/cpp.opt
+ $(CCP) -o $@ $< @$(word 2, $^)
-$(OBJDIR)/cpp.opt: $(CPPOPT_DEPENDS)
+$(OBJDIR)/$(CCOPT_NAME)_cpp.opt: $(CPPOPT_DEPENDS)
$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
@echo CPPOPT_DEPENDS=$^
@echo Generating $@
@@ -160,7 +162,7 @@ ifneq "$(strip $(XDEFINES))" ""
@echo $(XDEFINES) >> $@
endif
-endif # one target nlm
+endif # one target nlm or lib
#
# Rules to build libraries
@@ -173,12 +175,12 @@ ifeq "$(words $(strip $(TARGET_lib)))" "1"
$(TARGET_lib) : $(OBJDIR)/$(LIB_NAME)_lib.lst
$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
@echo Generating $@
- $(LIB) -o $(OBJDIR)/$(@F) @$?
+ $(LIB) -o $@ @$<
$(OBJDIR)/aprlib_lib.lst: $(aprlib_LIBLST_DEPENDS)
$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
- @echo Generating $@
ifneq "$(strip $(FILES_lib_objs))" ""
+ @echo Generating $@
@echo $(wordlist 1, 10, $(FILES_lib_objs)) >> $@
@echo $(wordlist 11, 20, $(FILES_lib_objs)) >> $@
@echo $(wordlist 21, 30, $(FILES_lib_objs)) >> $@
@@ -194,8 +196,9 @@ endif
$(OBJDIR)/%_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
- @echo Generating $@
ifneq "$(strip $(FILES_lib_objs))" ""
+ @echo Generating $@
+ @echo CWD $(CURDIR)
@echo $(FILES_lib_objs) >> $@
endif
@@ -224,8 +227,8 @@ $(TARGET_nlm) : $(FILES_nlm_objs) $(FILES_nlm_libs) $(OBJDIR)/$(NLM_NAME)_link.o
# 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
+ $(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
+ $(CHK) $(subst /,\,$(@:.opt=.def)) $(DEL) $(subst /,\,$(@:.opt=.def))
@echo Generating $@
@echo -warnings off >> $@
@echo -zerobss >> $@
@@ -265,59 +268,59 @@ endif
ifneq "$(FILES_nlm_libs)" ""
@echo $(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(subst /,\,$(libfile))) >> $@
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 -commandfile $(subst /,\,$(@:.opt=.def)) >> $@
+ @echo # Do not edit this file - it is created by make! > $(subst /,\,$(@:.opt=.def))
+ @echo # All your changes will be lost!! >> $(subst /,\,$(@:.opt=.def))
ifneq "$(FILE_nlm_msg)" ""
- @echo Messages $(FILE_nlm_msg) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo Messages $(FILE_nlm_msg) >> $(subst /,\,$(@:.opt=.def))
endif
ifneq "$(FILE_nlm_hlp)" ""
- @echo Help $(FILE_nlm_hlp) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo Help $(FILE_nlm_hlp) >> $(subst /,\,$(@:.opt=.def))
endif
ifeq "$(FILE_nlm_copyright)" ""
- @echo copyright "$(NLM_COPYRIGHT)" >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo copyright "$(NLM_COPYRIGHT)" >> $(subst /,\,$(@:.opt=.def))
endif
- @echo description "$(NLM_DESCRIPTION)" >> $(OBJDIR)\$(NLM_NAME)_link.def
- @echo threadname "$(NLM_THREAD_NAME)" >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo description "$(NLM_DESCRIPTION)" >> $(subst /,\,$(@:.opt=.def))
+ @echo threadname "$(NLM_THREAD_NAME)" >> $(subst /,\,$(@:.opt=.def))
ifneq "$(NLM_STACK_SIZE)" ""
- @echo stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE)))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo stacksize $(subst K,000,$(subst k,K,$(strip $(NLM_STACK_SIZE)))) >> $(subst /,\,$(@:.opt=.def))
else
- @echo stacksize 64000 >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo stacksize 64000 >> $(subst /,\,$(@:.opt=.def))
endif
- @echo screenname "$(NLM_SCREEN_NAME)" >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo screenname "$(NLM_SCREEN_NAME)" >> $(subst /,\,$(@:.opt=.def))
ifneq "$(NLM_VERSION)" ""
- @echo version $(NLM_VERSION) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo version $(NLM_VERSION) >> $(subst /,\,$(@:.opt=.def))
else
- @echo version $(VERSION) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo version $(VERSION) >> $(subst /,\,$(@:.opt=.def))
endif
ifneq "$(NLM_ENTRY_SYM)" ""
- @echo start $(NLM_ENTRY_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo start $(NLM_ENTRY_SYM) >> $(subst /,\,$(@:.opt=.def))
endif
ifneq "$(NLM_EXIT_SYM)" ""
- @echo exit $(NLM_EXIT_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo exit $(NLM_EXIT_SYM) >> $(subst /,\,$(@:.opt=.def))
endif
ifneq "$(NLM_CHECK_SYM)" ""
- @echo check $(NLM_CHECK_SYM) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo check $(NLM_CHECK_SYM) >> $(subst /,\,$(@:.opt=.def))
endif
ifneq "$(NLM_FLAGS)" ""
- @echo $(strip $(NLM_FLAGS)) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo $(strip $(NLM_FLAGS)) >> $(subst /,\,$(@:.opt=.def))
endif
ifneq "$(FILES_nlm_modules)" ""
- @echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst /,\,$(module))) >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo module $(foreach module,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_modules))),$(subst /,\,$(module))) >> $(subst /,\,$(@:.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 import $(foreach import,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_Ximports))),$(subst /,\,$(import))) >> $(subst /,\,$(@:.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 export $(foreach export,$(subst $(SPACE),$(COMMA),$(strip $(FILES_nlm_exports))),$(subst /,\,$(export))) >> $(subst /,\,$(@:.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 xdcdata $(XDCDATA) >> $(subst /,\,$(@:.opt=.def))
else
- @echo xdcdata $(APR)\misc\netware\apr.xdc >> $(OBJDIR)\$(NLM_NAME)_link.def
+ @echo xdcdata $(APR)\misc\netware\apr.xdc >> $(subst /,\,$(@:.opt=.def))
endif
endif