apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fua...@apache.org
Subject svn commit: r1077882 - in /apr/apr/trunk: NWGNUmakefile build/NWGNUenvironment.inc build/NWGNUhead.inc build/NWGNUmakefile build/NWGNUtail.inc
Date Fri, 04 Mar 2011 11:19:50 GMT
Author: fuankg
Date: Fri Mar  4 11:19:49 2011
New Revision: 1077882

URL: http://svn.apache.org/viewvc?rev=1077882&view=rev
Log:
NetWare build overhaul in order to compile on Linux.

Part 2.

Modified:
    apr/apr/trunk/NWGNUmakefile
    apr/apr/trunk/build/NWGNUenvironment.inc
    apr/apr/trunk/build/NWGNUhead.inc
    apr/apr/trunk/build/NWGNUmakefile
    apr/apr/trunk/build/NWGNUtail.inc

Modified: apr/apr/trunk/NWGNUmakefile
URL: http://svn.apache.org/viewvc/apr/apr/trunk/NWGNUmakefile?rev=1077882&r1=1077881&r2=1077882&view=diff
==============================================================================
--- apr/apr/trunk/NWGNUmakefile (original)
+++ apr/apr/trunk/NWGNUmakefile Fri Mar  4 11:19:49 2011
@@ -423,24 +423,24 @@ nlms :: libs $(TARGET_nlm)
 # correct place.  (See $(APR_WORK)/build/NWGNUhead.inc for examples)
 #
 install :: nlms $(INSTDIRS) FORCE
-	$(CP) $(subst /,\,$(APR)\$(TARGET_nlm))             $(INSTALLBASE)\*.*
+	$(call CP,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/)
 ifndef DEST
-	-$(CP) $(subst /,\,$(APR))\STATUS                   $(INSTALLBASE)\*.apr
-	-$(CP) $(subst /,\,$(APR))\LICENSE                  $(INSTALLBASE)\*
-	-$(CP) $(subst /,\,$(APR))\CHANGES                  $(INSTALLBASE)\*.apr
-	@-$(XCP) $(subst /,\,$(APR))\docs                   $(INSTALLBASE)\docs\*.*
+	-$(call CP,$(APR)/STATUS,$(INSTALLBASE)/*.apr)
+	-$(call CP,$(APR)/LICENSE,$(INSTALLBASE)/)
+	-$(call CP,$(APR)/CHANGES,$(INSTALLBASE)/*.apr)
+	@-$(call XCP,$(APR)/docs,$(INSTALLBASE)/docs/)
 endif
 
 ifndef DEST
 installdev :: $(INSTDEVDIRS) FORCE
-	$(CP) $(subst /,\,$(APR))\include\*.h               $(INSTALLBASE)\include\*.*
-	$(CP) $(subst /,\,$(APR))\*.imp                     $(INSTALLBASE)\lib\*.*
-	$(CP) $(subst /,\,$(APR))\misc\netware\*.xdc        $(INSTALLBASE)\lib\*.*
-	$(CP) $(subst /,\,$(APR)\$(TARGET_lib))             $(INSTALLBASE)\lib\*.*
-	$(CP) $(subst /,\,$(APR)\$(TARGET_nlm))             $(INSTALLBASE)\bin\*.*
+	$(call CP,$(APR)/include/*.h,$(INSTALLBASE)/include/)
+	$(call CP,$(APR)/*.imp,$(INSTALLBASE)/lib/)
+	$(call CP,$(APR)/misc/netware/*.xdc,$(INSTALLBASE)/lib/)
+	$(call CP,$(APR)/$(TARGET_lib),$(INSTALLBASE)/lib/)
+	$(call CP,$(APR)/$(TARGET_nlm),$(INSTALLBASE)/bin/)
 
 $(INSTDEVDIRS) ::
-	$(CHKNOT) $@\NUL mkdir $@
+	$(call MD,$@)
 endif
 
 #

Modified: apr/apr/trunk/build/NWGNUenvironment.inc
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/NWGNUenvironment.inc?rev=1077882&r1=1077881&r2=1077882&view=diff
==============================================================================
--- apr/apr/trunk/build/NWGNUenvironment.inc (original)
+++ apr/apr/trunk/build/NWGNUenvironment.inc Fri Mar  4 11:19:49 2011
@@ -147,31 +147,27 @@ AWK	= awk
 # Declare Command and tool macros here
 #
 
-ifeq "$(OSTYPE)" "linux"
-DEL	= $(RM)
-MD	= mkdir -p
-DELTREE	= rmdir -p
-CP	= cp -av
+ifeq ($(findstring /sh,$(SHELL)),/sh)
+DEL	= $(RM) $1
+MD	= mkdir -p $1
+DELTREE	= rm -rf $1
+CP	= cp -av $1 $2
 XCP	= cp -ar
-CHK	= test -e
-CHKNOT	= test ! -e
 ECHONL	= echo ""
 DL	= '
 else
 ifeq "$(OS)" "Windows_NT"
 CMD	= cmd /c
-DEL	= del /q /f 2>NUL
-DELTREE	= rd /s /q 2>NUL
+DEL	= $(CMD) if exist $(subst /,\,$1) del /q /f 2>NUL $(subst /,\,$1)
+DELTREE	= rd /s /q 2>NUL $(subst /,\,$1)
 else
 CMD	= command /c
-DEL	= del
-DELTREE	= deltree /y
+DEL	= $(CMD) if exist $(subst /,\,$1) del 2>NUL $(subst /,\,$1)
+DELTREE	= deltree /y $(subst /,\,$1)
 endif
-MD	= md 2>NUL
-CP	= copy /y 2>NUL
-XCP	= xcopy /e /y 2>NUL
-CHK	= $(CMD) if exist
-CHKNOT	= $(CMD) if not exist
+MD	= $(CMD) if not exist $(subst /,\,$1)\NUL md 2>NUL $(subst /,\,$1)
+CP	= copy /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
+XCP	= xcopy /e /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
 ECHONL	= $(CMD) echo.
 endif
 
@@ -269,15 +265,15 @@ endif
 endif
 
 ifndef INSTALL
-INSTALL = $(APR_WORK)\Dist
-INSTDIRS = $(APR_WORK)\Dist
+INSTALL = $(APR_WORK)/Dist
+INSTDIRS = $(APR_WORK)/Dist
 BASEDIR = Apr
 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
@@ -301,14 +297,14 @@ endif
 
 endif
 
-INSTALLBASE := $(INSTALL)\$(BASEDIR)
+INSTALLBASE := $(INSTALL)/$(BASEDIR)
 
 INSTDEVDIRS := \
 	$(INSTDIRS) \
 	$(INSTALLBASE) \
-	$(INSTALLBASE)\include \
-	$(INSTALLBASE)\lib \
-	$(INSTALLBASE)\bin 
+	$(INSTALLBASE)/include \
+	$(INSTALLBASE)/lib \
+	$(INSTALLBASE)/bin 
 
 INSTDIRS += \
 	$(INSTALLBASE)

Modified: apr/apr/trunk/build/NWGNUhead.inc
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/NWGNUhead.inc?rev=1077882&r1=1077881&r2=1077882&view=diff
==============================================================================
--- apr/apr/trunk/build/NWGNUhead.inc (original)
+++ apr/apr/trunk/build/NWGNUhead.inc Fri Mar  4 11:19:49 2011
@@ -86,13 +86,12 @@ FORCE : ;
 
 clean :: $(SUBDIRS) $(APRTEST)
 	@echo Cleaning up $(CURDIR)
-	-$(DELTREE) $(OBJDIR)
-	$(CHK) *.err $(DEL) *.err
-	$(CHK) *.map $(DEL) *.map
-	$(CHK) *.d $(DEL) *.d
-	$(CHK) *.tmp $(DEL) *.tmp
-	-$(DELTREE) $(OBJDIR)
+	-$(call DELTREE,$(OBJDIR))
+	$(call DEL,*.err)
+	$(call DEL,*.map)
+#	$(call DEL,*.d)
+	$(call DEL,*.tmp)
 
 $(OBJDIR) ::
-	-$(MD) $@
+	$(call MD,$@)
 

Modified: apr/apr/trunk/build/NWGNUmakefile
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/NWGNUmakefile?rev=1077882&r1=1077881&r2=1077882&view=diff
==============================================================================
--- apr/apr/trunk/build/NWGNUmakefile (original)
+++ apr/apr/trunk/build/NWGNUmakefile Fri Mar  4 11:19:49 2011
@@ -53,27 +53,15 @@ endif
 
 $(APR)/include/%.h: $(APR)/include/%.hnw
 	@echo Creating $@
-ifeq "$(OSTYPE)" "linux"
-	$(CP) $< $@
-else
-	$(CP) $(subst /,\,$<) $(subst /,\,$@)
-endif
+	$(call CP,$<,$@)
 
 $(APR)/include/private/%.h: $(APR)/include/private/%.hnw
 	@echo Creating $@
-ifeq "$(OSTYPE)" "linux"
-	$(CP) $< $@
-else
-	$(CP) $(subst /,\,$<) $(subst /,\,$@)
-endif
+	$(call CP,$<,$@)
 
 $(APR)/include/private/%.h: $(APR)/include/private/%.hw
 	@echo Creating $@
-ifeq "$(OSTYPE)" "linux"
-	$(CP) $< $@
-else
-	$(CP) $(subst /,\,$<) $(subst /,\,$@)
-endif
+	$(call CP,$<,$@)
 
 $(APR)/include/private/apu_config.h: FORCE
 
@@ -85,15 +73,15 @@ install :: nlms FORCE
 
 
 clean ::
-	$(CHK) nw_export.i                                          $(DEL) nw_export.i
-	$(CHK) $(NLM_NAME)_cc.opt                                   $(DEL) $(NLM_NAME)_cc.opt
-	$(CHK) NWGNUversion.inc                                     $(DEL) NWGNUversion.inc
-	$(CHK) $(subst /,\,$(APR))\include\apr.h                    $(DEL) $(subst /,\,$(APR))\include\apr.h
-	$(CHK) $(subst /,\,$(APR))\include\apu_want.h               $(DEL) $(subst /,\,$(APR))\include\apu_want.h
-	$(CHK) $(subst /,\,$(APR))\include\apr_ldap.h               $(DEL) $(subst /,\,$(APR))\include\apr_ldap.h
-	$(CHK) $(subst /,\,$(APR))\include\private\apu_config.h     $(DEL) $(subst /,\,$(APR))\include\private\apu_config.h
-	$(CHK) $(subst /,\,$(APR))\include\private\apu_select_dbm.h $(DEL) $(subst /,\,$(APR))\include\private\apu_select_dbm.h
-	$(CHK) $(subst /,\,$(APR))\aprlib.imp                       $(DEL) $(subst /,\,$(APR))\aprlib.imp
+	$(call DEL,nw_export.i)
+	$(call DEL,$(NLM_NAME)_cc.opt)
+	$(call DEL,NWGNUversion.inc)
+	$(call DEL,$(APR)/include/apr.h)
+	$(call DEL,$(APR)/include/apu_want.h)
+	$(call DEL,$(APR)/include/apr_ldap.h)
+	$(call DEL,$(APR)/include/private/apu_config.h)
+	$(call DEL,$(APR)/include/private/apu_select_dbm.h)
+	$(call DEL,$(APR)/aprlib.imp)
 
 #
 # Include the 'tail' makefile that has targets that depend on variables defined

Modified: apr/apr/trunk/build/NWGNUtail.inc
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/NWGNUtail.inc?rev=1077882&r1=1077881&r2=1077882&view=diff
==============================================================================
--- apr/apr/trunk/build/NWGNUtail.inc (original)
+++ apr/apr/trunk/build/NWGNUtail.inc Fri Mar  4 11:19:49 2011
@@ -118,11 +118,7 @@ $(OBJDIR)/%.o: %.c $(OBJDIR)/$(CCOPT_NAM
 	$(CC) -o $@ $< @$(word 2, $^)
 
 $(OBJDIR)/$(CCOPT_NAME)_cc.opt: $(CCOPT_DEPENDS)
-ifeq "$(OSTYPE)" "linux"
-	$(DEL) $@
-else
-	$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
-endif
+	$(call DEL,$@)
 #	@echo CCOPT_DEPENDS=$^
 #	@echo Generating $@
 	@echo GEN  $@
@@ -151,11 +147,7 @@ $(OBJDIR)/%.o: %.cpp $(OBJDIR)/$(CCOPT_N
 	$(CCP) -o $@ $< @$(word 2, $^)
 
 $(OBJDIR)/$(CCOPT_NAME)_cpp.opt: $(CPPOPT_DEPENDS)
-ifeq "$(OSTYPE)" "linux"
-	$(DEL) $@
-else
-	$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
-endif
+	$(call DEL,$@)
 	@echo CPPOPT_DEPENDS=$^
 #	@echo Generating $@
 	@echo GEN  $@
@@ -189,21 +181,13 @@ endif # one target nlm or lib
 ifeq "$(words $(strip $(TARGET_lib)))" "1"
 
 $(TARGET_lib) : $(OBJDIR)/$(LIB_NAME)_lib.lst
-ifeq "$(OSTYPE)" "linux"
-	$(DEL) $@
-else
-	$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
-endif
+	$(call DEL,$@)
 #	@echo Generating $@
 	@echo AR   $@
 	$(LIB) -o $@ @$<
 
 $(OBJDIR)/aprlib_lib.lst: $(aprlib_LIBLST_DEPENDS)
-ifeq "$(OSTYPE)" "linux"
-	$(DEL) $@
-else
-	$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
-endif
+	$(call DEL,$@)
 ifneq "$(strip $(FILES_lib_objs))" ""
 #	@echo Generating $@
 	@echo GEN  $@
@@ -221,11 +205,7 @@ ifneq "$(strip $(FILES_lib_objs))" ""
 endif
 
 $(OBJDIR)/%_lib.lst: $($(LIB_NAME)_LIBLST_DEPENDS)
-ifeq "$(OSTYPE)" "linux"
-	$(DEL) $@
-else
-	$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
-endif
+	$(call DEL,$@)
 ifneq "$(strip $(FILES_lib_objs))" ""
 #	@echo Generating $@
 	@echo GEN  $@
@@ -258,13 +238,8 @@ $(TARGET_nlm) : $(FILES_nlm_objs) $(FILE
 # corresponding makefile
 
 $(OBJDIR)/$(NLM_NAME)_link.opt : $($(NLM_NAME)_LINKOPT_DEPENDS)
-ifeq "$(OSTYPE)" "linux"
-	$(DEL) $@
-	$(DEL) $(@:.opt=.def)
-else
-	$(CHK) $(subst /,\,$@) $(DEL) $(subst /,\,$@)
-	$(CHK) $(subst /,\,$(@:.opt=.def)) $(DEL) $(subst /,\,$(@:.opt=.def))
-endif
+	$(call DEL,$@)
+	$(call DEL,$(@:.opt=.def))
 #	@echo Generating $@
 	@echo GEN  $@
 	@echo -warnings off >> $@
@@ -383,7 +358,6 @@ endif # NO_LICENSE_FILE
 endif # multiple targets
 
 $(INSTDIRS) ::
-#	$(CHKNOT) $@\NUL mkdir $@
-	-$(MD) $@
+	$(call MD,$@)
 
 



Mime
View raw message