]> granicus.if.org Git - apache/blob - build/NWGNUmakefile
gnu-make's abspath seems broken when the path is already absolute.
[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 :: chkapr $(NWOS)/httpd.imp $(NWOS)/chartables.c
26
27 $(NWOS)/httpd.imp : make_nw_export.awk nw_export.i
28         @echo Generating $(subst /,\,$@)
29         $(AWK) -v EXPPREFIX=AP$(VERSION_MAJMIN) -f $^ | sort >$@
30     
31 nw_export.i : nw_export.inc $(FILES_prebuild_headers) cc.opt
32         @echo Generating $(subst /,\,$@)
33         $(CC) $< @cc.opt
34
35 cc.opt : NWGNUmakefile $(AP_WORK)\build\NWGNUenvironment.inc $(AP_WORK)\build\NWGNUtail.inc $(AP_WORK)\build\NWGNUhead.inc
36         $(CHK) $@ $(DEL) $@
37         @echo -P >> $@
38         @echo -EP >> $@
39         @echo -nosyspath >> $@
40         @echo -w nocmdline >> $@
41         @echo $(DEFINES) >> $@
42         @echo -DCORE_PRIVATE >> $@
43         @echo -I..\include >> $@
44         @echo -I..\modules\http >> $@
45         @echo -I..\modules\aaa >> $@
46         @echo -I..\modules\core >> $@
47         @echo -I..\os\netware >> $@
48         @echo -I..\server\mpm\netware >> $@
49         @echo -I$(APR)\include >> $@
50         @echo -I$(APRUTIL)\include >> $@
51         @echo -ir $(NOVELLLIBC) >> $@
52
53 $(PCRE)/%.h: $(subst /,\,$(PCRE))\%.hw
54         @echo Creating $(subst /,\,$@)
55         copy $< $(subst /,\,$(PCRE))\$(@F)
56
57 ifneq "$(BUILDTOOL_AS_NLM)" "1"
58
59 $(NWOS)/chartables.c: dftables.exe $(PCRE)/dftables.c $(FILES_prebuild_headers)
60         @echo Creating $(subst /,\,$@)
61         @$< $@
62
63 %.exe: $(PCRE)/%.c
64         @echo Creating Build Helper $@
65         @$(WIN_CC) $(WIN_CFLAGS) $< -o $@
66
67 $(NWOS)/test_char.h: gen_test_char.exe $(AP_WORK)/server/gen_test_char.c
68         @echo Creating $(subst /,\,$@)
69         @$< > $@
70
71 %.exe: $(AP_WORK)/server/%.c
72         @echo Creating Build Helper $@
73         @$(WIN_CC) $(WIN_CFLAGS) -DCROSS_COMPILE $< -o $@
74
75 else
76
77 ifneq "$(wildcard $(NWOS)/chartables.c)" "$(NWOS)/chartables.c"
78 $(error Error: required source $(NWOS)/chartables.c not found!)
79 endif
80
81 ifneq "$(wildcard $(NWOS)/test_char.h)" "$(NWOS)/test_char.h"
82 $(error Error: required header $(NWOS)/test_char.h not found!)
83 endif
84
85 endif
86
87 #
88 # Check for minimum APR version
89 #
90 chkapr: $(APR)\build\nw_ver.awk $(APR)\include\apr_version.h
91         @echo Checking for APR version...
92         @$(AWK) -v WANTED=$(APR_WANTED) -f $^
93
94 #
95 # You can use this target if all that is needed is to copy files to the
96 # installation area
97 #
98 install :: nlms FORCE
99
100 clean ::
101         $(CHK) $(subst /,\,$(PCRE))\config.h               $(DEL) $(subst /,\,$(PCRE))\config.h
102         $(CHK) $(subst /,\,$(PCRE))\pcre.h                 $(DEL) $(subst /,\,$(PCRE))\pcre.h
103         $(CHK) $(subst /,\,$(NWOS))\httpd.imp              $(DEL) $(subst /,\,$(NWOS))\httpd.imp
104         $(CHK) nw_export.i                                 $(DEL) nw_export.i
105         $(CHK) cc.opt                                      $(DEL) cc.opt
106         $(CHK) NWGNUversion.inc                            $(DEL) NWGNUversion.inc
107 ifneq "$(BUILDTOOL_AS_NLM)" "1"
108         $(CHK) $(subst /,\,$(NWOS))\chartables.c           $(DEL) $(subst /,\,$(NWOS))\chartables.c
109         $(CHK) $(subst /,\,$(NWOS))\test_char.h            $(DEL) $(subst /,\,$(NWOS))\test_char.h
110         $(CHK) dftables.exe                                $(DEL) dftables.exe
111         $(CHK) gen_test_char.exe                           $(DEL) gen_test_char.exe
112 endif
113
114 #
115 # Include the 'tail' makefile that has targets that depend on variables defined
116 # in this makefile
117 #
118
119 include $(AP_WORK)\build\NWGNUtail.inc
120