]> granicus.if.org Git - apache/blob - build/NWGNUmakefile
Create dav.imp dynamically from header to catch all exports.
[apache] / build / NWGNUmakefile
1 #
2 # Declare the sub-directories to be built here
3 #
4
5 SUBDIRS = \
6         $(APR_WORK)/build \
7         $(EOLIST) 
8
9 #
10 # Get the 'head' of the build environment.  This includes default targets and
11 # paths to tools
12 #
13
14 include $(AP_WORK)/build/NWGNUhead.inc
15
16 #
17 # build this level's files
18
19 FILES_prebuild_headers = \
20         $(NWOS)/test_char.h \
21         $(PCRE)/config.h \
22         $(PCRE)/pcre.h \
23         $(EOLIST) 
24     
25 nlms :: libs $(NWOS)/httpd.imp $(DAV)/main/dav.imp
26
27 libs :: chkapr $(NWOS)/chartables.c
28
29 $(DAV)/main/dav.imp : make_nw_export.awk $(DAV)/main/mod_dav.h
30         @echo $(DL)GEN  $@$(DL)
31         $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | $(SORT) >$@
32
33 $(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
34         @echo $(DL)GEN  $@$(DL)
35         $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | $(SORT) >$@
36     
37 nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
38         @echo $(DL)GEN  $@$(DL)
39         $(CC) $< @cc.opt
40
41 cc.opt : NWGNUmakefile $(APBUILD)/NWGNUenvironment.inc $(APBUILD)/NWGNUtail.inc $(APBUILD)/NWGNUhead.inc
42         @echo $(DL)-P$(DL)> $@
43         @echo $(DL)-EP$(DL)>> $@
44         @echo $(DL)-nosyspath$(DL)>> $@
45         @echo $(DL)-w nocmdline$(DL)>> $@
46         @echo $(DL)$(DEFINES)$(DL)>> $@
47         @echo $(DL)-I$(SRC)/include$(DL)>> $@
48         @echo $(DL)-I$(HTTPD)$(DL)>> $@
49         @echo $(DL)-I$(STDMOD)/aaa$(DL)>> $@
50         @echo $(DL)-I$(STDMOD)/core$(DL)>> $@
51         @echo $(DL)-I$(NWOS)$(DL)>> $@
52         @echo $(DL)-I$(SERVER)/mpm/netware$(DL)>> $@
53         @echo $(DL)-I$(APR)/include$(DL)>> $@
54         @echo $(DL)-I$(APRUTIL)/include$(DL)>> $@
55         @echo $(DL)-ir $(NOVELLLIBC)$(DL)>> $@
56
57 $(PCRE)/%.h: $(PCRE)/%.h.generic
58         @echo Creating $@
59         $(call COPY,$<,$@)
60
61 $(PCRE)/%.h: $(PCRE)/%.hw
62         @echo Creating $@
63         $(call COPY,$<,$@)
64
65 ifneq "$(BUILDTOOL_AS_NLM)" "1"
66
67 $(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c
68         @echo $(DL)GEN  $@$(DL)
69         $< $@
70
71 %.exe: $(PCRE)/%.c $(PCRE)/config.h $(PCRE)/pcre.h
72         @echo $(DL)Creating Build Helper $@$(DL)
73         $(HOST_CC) $(HOST_CFLAGS) -DHAVE_CONFIG_H $< -o $@
74
75 $(NWOS)/test_char.h: gen_test_char.exe $(SERVER)/gen_test_char.c
76         @echo $(DL)GEN  $@$(DL)
77         $< > $@
78
79 %.exe: $(SERVER)/%.c
80         @echo $(DL)Creating Build Helper $@$(DL)
81         $(HOST_CC) $(HOST_CFLAGS) -DCROSS_COMPILE $< -o $@
82
83 else
84
85 ifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
86 $(error Error: required source $(NWOS)/chartables.c not found!)
87 endif
88
89 ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
90 $(error Error: required header $(NWOS)/test_char.h not found!)
91 endif
92
93 endif
94
95 #
96 # Check for minimum APR version
97 #
98 chkapr: $(APR)/build/nw_ver.awk $(APR)/include/apr_version.h
99         @echo $(DL)Checking for APR version...$(DL)
100         $(AWK) -v WANTED=$(APR_WANTED) -f $^
101
102 #
103 # You can use this target if all that is needed is to copy files to the
104 # installation area
105 #
106 install :: nlms FORCE
107
108 clean ::
109         $(call DEL,$(PCRE)/config.h)
110         $(call DEL,$(PCRE)/pcre.h)
111         $(call DEL,$(DAV)/main/dav.imp)
112         $(call DEL,$(NWOS)/httpd.imp)
113         $(call DEL,nw_export.i)
114         $(call DEL,cc.opt)
115         $(call DEL,NWGNUversion.inc)
116 ifneq "$(BUILDTOOL_AS_NLM)" "1"
117         $(call DEL,$(NWOS)/chartables.c)
118         $(call DEL,$(NWOS)/test_char.h)
119         $(call DEL,dftables.exe)
120         $(call DEL,gen_test_char.exe)
121 endif
122
123 #
124 # Include the 'tail' makefile that has targets that depend on variables defined
125 # in this makefile
126 #
127
128 include $(APBUILD)/NWGNUtail.inc
129