]> granicus.if.org Git - apache/blobdiff - build/NWGNUtail.inc
Backport r1488022
[apache] / build / NWGNUtail.inc
index 0872a00ea66601353e7136d2c01fd2db940d1aa2..db38ff6123df4624b5c09095dca2ce51c70a317d 100644 (file)
@@ -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
@@ -25,129 +24,153 @@ NLM_SCREEN_NAME = DEFAULT
 endif
 
 ifndef NLM_COPYRIGHT
-NLM_COPYRIGHT = Copyright 2006 The Apache Software Foundation. Licensed under the Apache License Version 2.0.
+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
 #
 
-CCOPT_DEPENDS  = \
-                               $(AP_WORK)\build\NWGNUhead.inc \
-                               $(AP_WORK)\build\NWGNUenvironment.inc \
-                               $(AP_WORK)\build\NWGNUtail.inc \
-                               NWGNUmakefile \
+STANDARD_DEPENDS       = \
+                               $(APBUILD)/NWGNUhead.inc \
+                               $(APBUILD)/NWGNUenvironment.inc \
+                               $(APBUILD)/NWGNUtail.inc \
                                $(CUSTOM_INI) \
                                $(EOLIST)
 
-CPPOPT_DEPENDS = \
-                               $(AP_WORK)\build\NWGNUhead.inc \
-                               $(AP_WORK)\build\NWGNUenvironment.inc \
-                               $(AP_WORK)\build\NWGNUtail.inc \
-                               NWGNUmakefile \
-                               $(CUSTOM_INI) \
-                               $(EOLIST)
+CCOPT_DEPENDS  = $(STANDARD_DEPENDS)
 
 $(NLM_NAME)_LINKOPT_DEPENDS    = \
                                $(TARGET_lib) \
-                               $(AP_WORK)\build\NWGNUenvironment.inc \
-                               NWGNUmakefile \
-                               $(AP_WORK)\build\NWGNUtail.inc \
-                               $(CUSTOM_INI) \
+                               $(STANDARD_DEPENDS) \
                                $(VERSION_INC) \
                                $(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 \
-                               NWGNUmakefile \
-                               $(AP_WORK)\build\NWGNUtail.inc \
+                               $(STANDARD_DEPENDS) \
                                $(CUSTOM_INI) \
                                $(EOLIST)
 endif
 
 ifeq "$(wildcard NWGNU$(LIB_NAME))" "NWGNU$(LIB_NAME)"
 $(LIB_NAME)_LIBLST_DEPENDS     += NWGNU$(LIB_NAME)
+CCOPT_DEPENDS  += NWGNU$(LIB_NAME)
+else
+CCOPT_DEPENDS  += NWGNUmakefile
 endif
 
 ifeq "$(wildcard NWGNU$(NLM_NAME))" "NWGNU$(NLM_NAME)"
 $(NLM_NAME)_LINKOPT_DEPENDS    += NWGNU$(NLM_NAME)
-CCOPT_DEPENDS  += NWGNU$(NLM_NAME)
-CPPOPT_DEPENDS         += NWGNU$(NLM_NAME)
+CCOPT_DEPENDS  += NWGNU$(NLM_NAME)
+else
+CCOPT_DEPENDS  += NWGNUmakefile
 endif
 
+CPPOPT_DEPENDS = $(CCOPT_DEPENDS)
+
 #
 # Generic compiler rules
 #
 
-$(AP_WORK)\build\NWGNUversion.inc : $(AP_WORK)\include\ap_release.h $(AP_WORK)\build\nw_ver.awk
-       @echo Generating $(subst /,\,$@)
-       awk -f $(AP_WORK)\build\nw_ver.awk $(AP_WORK)\include\ap_release.h > $(AP_WORK)\build\NWGNUversion.inc
+ifneq "$(MAKECMDGOALS)" "clean"
+ifneq "$(findstring clobber_,$(MAKECMDGOALS))" "clobber_"
+$(APBUILD)/NWGNUversion.inc: $(APBUILD)/nw_ver.awk $(SRC)/include/ap_release.h
+       @echo $(DL)GEN  $@$(DL)
+       $(AWK) -f $^ $(SRC)/.svn/all-wcprops > $@
 
--include $(AP_WORK)\build\NWGNUversion.inc
+-include $(APBUILD)/NWGNUversion.inc
 
 ifneq "$(strip $(VERSION_STR))" ""
-VERSION_INC = $(AP_WORK)\build\NWGNUversion.inc
+VERSION_INC = $(APBUILD)/NWGNUversion.inc
 else
-VERSION                = 2,0,0
-VERSION_STR    = 2.0.0
+VERSION                = 2,4,0
+VERSION_STR    = 2.4.0
+VERSION_MAJMIN = 24
+endif
+endif
+endif
+ifeq "$(USE_SVNREV)" "1"
+ifneq "$(strip $(SVN_REVISION))" ""
+CFLAGS += -DAP_SERVER_ADD_STRING=\"$(SVN_REVISION)\"
+endif
 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 $(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 $(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 $(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 $(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
@@ -160,22 +183,22 @@ 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 $(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 $(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
-       @echo Calling $<
+$(OBJDIR)/%.lib: NWGNU% $(STANDARD_DEPENDS) FORCE
+       @echo $(DL)Calling $<$(DL)
        $(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
 
 endif
@@ -184,117 +207,105 @@ endif
 # Rules to build nlms.
 #
 
-vpath libcpre.o $(NOVELLLIBC)\imports
-
 # 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 $(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 -desc "$(NLM_DESCRIPTION)" >> $@
-       @echo -o $(TARGET_nlm) >> $@
+$(OBJDIR)/$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
+       $(call DEL,$@)
+       $(call DEL,$(@:.opt=.def))
+       @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) >> $@
-else
-       @echo -copy "$(NLM_COPYRIGHT)" >> $@
+       @$(CAT) $(FILE_nlm_copyright)>> $@
 endif
 ifeq "$(RELEASE)" "debug"
-       @echo -g >> $@
-       @echo -sym internal >> $@
-       @echo -sym codeview4 >> $@
-       @echo -osym $(OBJDIR)\$(NLM_NAME).sym >> $@
-else
-       @echo -sym internal >> $@
-endif
-       @echo -screenname "$(NLM_SCREEN_NAME)" >> $@
-ifneq "$(NLM_VERSION)" ""
-       @echo -nlmversion=$(NLM_VERSION) >> $@
+       @echo $(DL)-g$(DL)>> $@
+       @echo $(DL)-sym internal$(DL)>> $@
+       @echo $(DL)-sym codeview4$(DL)>> $@
+       @echo $(DL)-osym $(OBJDIR)/$(NLM_NAME).sym$(DL)>> $@
 else
-       @echo -nlmversion=$(VERSION) >> $@
-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 $(SRC)/$(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 $(NWOS)$(DL)>> $@
+       @echo $(DL)-l $(APR)/$(OBJDIR)$(DL)>> $@
+       @echo $(DL)-l $(APR)$(DL)>> $@
+       @echo $(DL)-l $(APRUTIL)/$(OBJDIR)$(DL)>> $@
+       @echo $(DL)-l $(PCRE)/$(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 >> $@
-endif
-       @echo -l $(APULDAP)/$(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
-       @echo -stacksize 64000 >> $@
-endif
-ifneq "$(NLM_ENTRY_SYM)" ""
-       @echo -entry $(NLM_ENTRY_SYM) >> $@
-endif
-ifneq "$(NLM_EXIT_SYM)" ""
-       @echo -exit $(NLM_EXIT_SYM) >> $@
-endif
-ifneq "$(NLM_CHECK_SYM)" ""
-       @echo -check $(NLM_CHECK_SYM) >> $@
-endif
-ifneq "$(NLM_FLAGS)" ""
-       @echo -flags $(NLM_FLAGS) >> $@
+       @echo $(DL)-l $(LDAPSDK)/imports$(DL)>> $@
 endif
+       @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$(DL)>> $@
 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 $(DL)$(foreach libfile, $(notdir $(strip $(FILES_nlm_libs))),-l$(libfile))$(DL)>> $@
 endif
-       @echo -commandfile $(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 $(DL)copyright "$(NLM_COPYRIGHT)"$(DL)>> $(@:.opt=.def)
+endif
+       @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)
+       @echo $(DL)version $(NLM_VERSION) $(DL)>> $(@:.opt=.def)
+       @echo $(DL)start $(NLM_ENTRY_SYM)$(DL)>> $(@:.opt=.def)
+       @echo $(DL)exit $(NLM_EXIT_SYM)$(DL)>> $(@:.opt=.def)
+ifneq "$(NLM_CHECK_SYM)" ""
+       @echo $(DL)check $(NLM_CHECK_SYM)$(DL)>> $(@:.opt=.def)
 endif
+       @echo $(DL)$(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
 
@@ -305,10 +316,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% $($(NLM_NAME)_LINKOPT_DEPENDS) FORCE
+       @echo $(DL)Calling $<$(DL)
        $(MAKE) -f $< $(MAKECMDGOALS) RELEASE=$(RELEASE)
-       $(CMD) echo.
+       @$(ECHONL)
 
 else