Skip to content

Commit c56e3ab

Browse files
author
Guenter Knauf
committed
NetWare build overhaul in order to compile on Linux.
Some more build fixes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1080725 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8f05599 commit c56e3ab

3 files changed

Lines changed: 42 additions & 28 deletions

File tree

NWGNUmakefile

Lines changed: 32 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ include $(AP_WORK)/build/NWGNUhead.inc
6161
XINCDIRS += \
6262
$(APR)/include \
6363
$(APRUTIL)/include \
64-
$(AP_WORK)/include \
64+
$(SRC)/include \
6565
$(STDMOD)/aaa \
6666
$(STDMOD)/core \
6767
$(STDMOD)/filters \
@@ -71,8 +71,8 @@ XINCDIRS += \
7171
$(STDMOD)/mappers \
7272
$(STDMOD)/proxy \
7373
$(STDMOD)/ssl \
74-
$(AP_WORK)/server \
75-
$(AP_WORK)/server/mpm/netware \
74+
$(SERVER) \
75+
$(SERVER)/mpm/netware \
7676
$(PCRE) \
7777
$(NWOS) \
7878
$(EOLIST)
@@ -328,9 +328,9 @@ FILE_nlm_copyright =
328328
# Any additional imports go here
329329
#
330330
FILES_nlm_Ximports = \
331-
@netware.imp \
332331
@aprlib.imp \
333332
@libc.imp \
333+
@netware.imp \
334334
GetCurrentAddressSpace \
335335
$(EOLIST)
336336

@@ -389,6 +389,8 @@ nlms :: libs $(TARGET_nlm)
389389
# Updated this target to create necessary directories and copy files to the
390390
# correct place. (See $(AP_WORK)/build/NWGNUhead.inc for examples)
391391
#
392+
MKCNF = $(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -v SSLPORT=$(SSLPORT) -v MODSSL=$(WITH_MOD_SSL) -v BSDSKT=$(USE_STDSOCKETS) -f build/mkconfNW.awk $1 > $2
393+
392394
install :: nlms instscripts FORCE
393395
$(call COPY,$(OBJDIR)/$(NLM_NAME).nlm, $(INSTALL)/$(BASEDIR)/)
394396
$(call COPY,ABOUT_APACHE, $(INSTALL)/$(BASEDIR)/)
@@ -405,19 +407,18 @@ install :: nlms instscripts FORCE
405407
$(call COPY,docs/conf/mime.types, $(INSTALL)/$(BASEDIR)/conf/)
406408
$(call COPY,docs/conf/charset.conv, $(INSTALL)/$(BASEDIR)/conf/)
407409
$(call COPY,docs/cgi-examples/printenv, $(INSTALL)/$(BASEDIR)/cgi-bin/printenv.pl)
408-
-$(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -v SSLPORT=$(SSLPORT) -v MODSSL=$(WITH_MOD_SSL) -v BSDSKT=$(USE_STDSOCKETS) -f build/mkconfNW.awk docs/conf/httpd.conf.in >$(INSTALL)/$(BASEDIR)/conf\httpd.conf
409-
$(call MKDIR,$(INSTALL)/$(BASEDIR)/conf/extra)
410-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-autoindex.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-autoindex.conf
411-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-dav.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-dav.conf
412-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-default.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-default.conf
413-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-info.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-info.conf
414-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-languages.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-languages.conf
415-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-manual.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-manual.conf
416-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-mpm.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-mpm.conf
417-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-multilang-errordoc.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-multilang-errordoc.conf
418-
-$(AWK) -v BDIR=$(BASEDIR) -f build/mkconfNW.awk docs/conf/extra/httpd-userdir.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-userdir.conf
419-
-$(AWK) -v BDIR=$(BASEDIR) -v PORT=$(PORT) -f build/mkconfNW.awk docs/conf/extra/httpd-vhosts.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-vhosts.conf
420-
-$(AWK) -v BDIR=$(BASEDIR) -v SSLPORT=$(SSLPORT) -f build/mkconfNW.awk docs/conf/extra/httpd-ssl.conf.in >$(INSTALL)/$(BASEDIR)/conf/extra/httpd-ssl.conf
410+
$(call MKCNF,docs/conf/httpd.conf.in, $(INSTALL)/$(BASEDIR)/conf/httpd.conf)
411+
$(call MKCNF,docs/conf/extra/httpd-autoindex.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-autoindex.conf)
412+
$(call MKCNF,docs/conf/extra/httpd-dav.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-dav.conf)
413+
$(call MKCNF,docs/conf/extra/httpd-default.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-default.conf)
414+
$(call MKCNF,docs/conf/extra/httpd-info.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-info.conf)
415+
$(call MKCNF,docs/conf/extra/httpd-languages.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-languages.conf)
416+
$(call MKCNF,docs/conf/extra/httpd-manual.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-manual.conf)
417+
$(call MKCNF,docs/conf/extra/httpd-mpm.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-mpm.conf)
418+
$(call MKCNF,docs/conf/extra/httpd-multilang-errordoc.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-multilang-errordoc.conf)
419+
$(call MKCNF,docs/conf/extra/httpd-userdir.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-userdir.conf)
420+
$(call MKCNF,docs/conf/extra/httpd-vhosts.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-vhosts.conf)
421+
$(call MKCNF,docs/conf/extra/httpd-ssl.conf.in, $(INSTALL)/$(BASEDIR)/conf/extra/httpd-ssl.conf)
421422
$(call COPYR,docs/docroot, $(INSTALL)/$(BASEDIR)/htdocs)
422423
$(call COPYR,docs/error, $(INSTALL)/$(BASEDIR)/error)
423424
$(call COPYR,docs/icons, $(INSTALL)/$(BASEDIR)/icons)
@@ -429,6 +430,20 @@ installdev :: FORCE
429430
$(call COPY,$(NWOS)/*.h, $(INSTALL)/$(BASEDIR)/include/)
430431
$(call COPY,$(APR)/include/*.h, $(INSTALL)/$(BASEDIR)/include/)
431432
$(call COPY,$(APRUTIL)/include/*.h, $(INSTALL)/$(BASEDIR)/include/)
433+
$(call COPY,$(STDMOD)/core/mod_so.h, $(INSTALL)/$(BASEDIR)/include/)
434+
$(call COPY,core/mod_watchdog.h, $(INSTALL)/$(BASEDIR)/include/)
435+
$(call COPY,cache/mod_cache.h, $(INSTALL)/$(BASEDIR)/include/)
436+
$(call COPY,database/mod_dbd.h, $(INSTALL)/$(BASEDIR)/include/)
437+
$(call COPY,dav/main/mod_dav.h, $(INSTALL)/$(BASEDIR)/include/)
438+
$(call COPY,filters/mod_include.h, $(INSTALL)/$(BASEDIR)/include/)
439+
$(call COPY,generators/mod_cgi.h, $(INSTALL)/$(BASEDIR)/include/)
440+
$(call COPY,generators/mod_status.h, $(INSTALL)/$(BASEDIR)/include/)
441+
$(call COPY,loggers/mod_log_config.h, $(INSTALL)/$(BASEDIR)/include/)
442+
$(call COPY,mappers/mod_rewrite.h, $(INSTALL)/$(BASEDIR)/include/)
443+
$(call COPY,proxy/mod_proxy.h, $(INSTALL)/$(BASEDIR)/include/)
444+
$(call COPY,proxy/mod_serf.h, $(INSTALL)/$(BASEDIR)/include/)
445+
$(call COPY,session/mod_session.h, $(INSTALL)/$(BASEDIR)/include/)
446+
$(call COPY,ssl/mod_ssl.h, $(INSTALL)/$(BASEDIR)/include/)
432447
$(call COPY,$(APR)/*.imp, $(INSTALL)/$(BASEDIR)/lib/)
433448
$(call COPY,$(NWOS)/*.imp, $(INSTALL)/$(BASEDIR)/lib/)
434449
$(call COPY,$(NWOS)/*.xdc, $(INSTALL)/$(BASEDIR)/lib/)

build/NWGNUenvironment.inc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ $(error LDAPSDK does not point to a valid Novell CLDAP SDK)
5050
endif
5151

5252
ifndef PCRESRC
53-
ifeq "$(wildcard $(AP_WORK)/srclib/pcre/pcre-config.in)" "$(AP_WORK)/srclib/pcre/pcre-config.in"
5453
PCRESRC = $(AP_WORK)/srclib/pcre
5554
endif
56-
endif
5755
ifneq "$(wildcard $(PCRESRC)/pcre-config.in)" "$(PCRESRC)/pcre-config.in"
5856
$(error PCRESRC does not point to a valid PCRE source tree)
5957
endif
@@ -144,8 +142,8 @@ ifeq ($(findstring /sh,$(SHELL)),/sh)
144142
DEL = rm -f $1
145143
RMDIR = rm -rf $1
146144
MKDIR = mkdir -p $1
147-
COPY = cp -av $1 $2
148-
COPYR = cp -ar $1 $2
145+
COPY = -cp -av $1 $2
146+
COPYR = -cp -ar $1 $2
149147
ECHONL = echo ""
150148
DL = '
151149
CAT = cat
@@ -160,8 +158,8 @@ RMDIR = $(shell if exist $(subst /,\,$1)\NUL deltree /y 2>NUL $(subst /,\,$1))
160158
ECHONL = command /c echo.
161159
endif
162160
MKDIR = $(shell if not exist $(subst /,\,$1)\NUL md 2>NUL $(subst /,\,$1))
163-
COPY = copy /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
164-
COPYR = xcopy /y /e 2>NUL $(subst /,\,$1) $(subst /,\,$2)
161+
COPY = -copy /y 2>NUL $(subst /,\,$1) $(subst /,\,$2)
162+
COPYR = -xcopy /y /e 2>NUL $(subst /,\,$1) $(subst /,\,$2)
165163
CAT = type
166164
endif
167165
@@ -245,7 +243,6 @@ endif
245243
246244
# -g generate debugging information
247245
# -O0 level 0 optimizations
248-
249246
ifeq "$(RELEASE)" "debug"
250247
CFLAGS += -g -O0
251248
endif
@@ -256,7 +253,6 @@ CFLAGS += -O4,p
256253
endif
257254
258255
# -prefix pre_nw.h #include pre_nw.h for all files
259-
260256
CFLAGS += -prefix pre_nw.h
261257
262258
@@ -329,6 +325,7 @@ INSTDIRS += \
329325
$(INSTALL)/$(BASEDIR)/bin \
330326
$(INSTALL)/$(BASEDIR)/cgi-bin \
331327
$(INSTALL)/$(BASEDIR)/conf \
328+
$(INSTALL)/$(BASEDIR)/conf/extra \
332329
$(INSTALL)/$(BASEDIR)/error \
333330
$(INSTALL)/$(BASEDIR)/htdocs \
334331
$(INSTALL)/$(BASEDIR)/icons \

build/NWGNUmakefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ FILES_prebuild_headers = \
2222
$(PCRE)/pcre.h \
2323
$(EOLIST)
2424

25-
nlms :: chkapr $(NWOS)/httpd.imp $(NWOS)/chartables.c
25+
nlms :: libs $(NWOS)/httpd.imp
26+
27+
libs :: chkapr $(NWOS)/chartables.c
2628

2729
$(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
2830
@echo $(DL)GEN $@$(DL)
@@ -58,11 +60,11 @@ $(PCRE)/%.h: $(PCRE)/%.hw
5860

5961
ifneq "$(BUILDTOOL_AS_NLM)" "1"
6062

61-
$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
63+
$(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c
6264
@echo $(DL)GEN $@$(DL)
6365
$< $@
6466

65-
%.exe: $(PCRE)/%.c
67+
%.exe: $(PCRE)/%.c $(PCRE)/config.h $(PCRE)/pcre.h
6668
@echo $(DL)Creating Build Helper $@$(DL)
6769
$(HOST_CC) $(HOST_CFLAGS) -DHAVE_CONFIG_H $< -o $@
6870

0 commit comments

Comments
 (0)