Develop and Download Open Source Software

Browse CVS Repository

Contents of /canna/canna/Imakefile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.19 - (show annotations) (download)
Wed May 19 15:06:37 2004 UTC (19 years, 11 months ago) by aida_s
Branch: MAIN
CVS Tags: after_new_zipcode, before_new_zipcode, HEAD
Changes since 1.18: +2 -2 lines
* confwrapper: "." bashism. Many shells don't searches the current
  directory.
* Imakefile: $(CC) -> env $(CC) in case $(CC) is
  "LD_LIBRARY_PATH=/usr/X11R6/lib cc".
* canuum/Imakefile: ditto

1 /* $Id$ */
2 #include "./Canna.conf"
3
4 #define IHaveSubdirs
5 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
6 #ifndef ConfigureArgs
7 # define ConfigureArgs
8 #endif
9 #if UseInet6
10 # define CannaConfInet6 echo "#define INET6"
11 #else
12 # define CannaConfInet6 echo "/* #undef INET6 */"
13 #endif
14
15 CANNAROOT = .
16 WORLDOPTS = /* -k */
17 SUBDIRS = lib canna server cmd dic misc doc
18 INCLUDE = ./include/canna
19 RKIINCLUDE = ./include/RKindep
20 DEFINES = $(CANNA_DEFINES)
21 CONFIGURE_CMD = IN_MAKE=yes $(CANNAROOT)/confwrapper run ./configure --prefix=$(cannaPrefix) ConfigureArgs
22 PURE_CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) /* $(THREADS_CFLAGS) $(MODULE_CFLAGS) */
23 supportOldWchar = SupportOldWchar
24
25
26 AllTarget(cannaconf.h accanna.h pubconf.h)
27 MakeSubdirs($(SUBDIRS))
28 DependSubdirs($(SUBDIRS))
29
30 clean::
31 $(RM) -r include cannaconf.h
32 distclean::
33 $(RM) accanna.h config.log config.cache config.status pubconf.h cwenv.sh
34
35 includes:: cannaconf.h accanna.h pubconf.h
36 $(RM) -r include
37 MakeDir($(INCLUDE))
38 MakeDir($(RKIINCLUDE))
39
40 /* ������ cannaconf.h ������������ */
41 cannaconf.h: Canna.conf
42 @echo "creating $@"
43 #ifdef OS2Architecture
44 @echo "#ifndef CANNACONF_H" > junkjunk
45 @echo "#define CANNACONF_H" >> junkjunk
46 @echo "#include \"accanna.h\"" >> junkjunk
47 @echo "#ifdef malloc" >> junkjunk
48 @echo "# undef malloc" >> junkjunk
49 @echo "#endif" >> junkjunk
50 @echo "/* for cannaserver */" >> junkjunk
51 @echo "#define DICHOME '$(DicDir)'" >> junkjunk
52 @echo "#define ERRDIR '$(ErrDir)'" >> junkjunk
53 @echo "#define USE_INET_SOCKET" >> junkjunk
54 @echo "#define ACCESS_FILE '$(AccessFile)'" >> junkjunk
55 @echo "/* for lib/RKC */" >> junkjunk
56 @echo "#define CANNAHOSTFILE '$(cannaLibDir)/cannahost'" >> junkjunk
57 @echo "/* for lib/canna */" >> junkjunk
58 @echo "#define CANNALIBDIR '$(cannaLibDir)'" >> junkjunk
59 @echo "#define SUPPORT_OLD_WCHAR '$(supportOldWchar)'" >> junkjunk
60 @echo "/* for scripts */" >> junkjunk
61 @echo "#define CANNABINDIR $(cannaBinDir)" >> junkjunk
62 @echo "/* others */" >> junkjunk
63 @echo "#define CANNA_LIGHT $(cannaLight)" >> junkjunk
64 @echo "#ifdef nec" >> junkjunk
65 @echo "#undef nec" >> junkjunk
66 @echo "#endif" >> junkjunk
67 @CannaConfInet6 >> junkjunk
68 @echo "#endif /* !CANNACONF_H */" >> junkjunk
69 @sed -e "s/'/\\\"/" -e "s/'/\\\"/" < junkjunk > junk
70 @$(RM) junkjunk
71 #else
72 @(echo "#ifndef CANNACONF_H";\
73 echo "#define CANNACONF_H"; \
74 echo "#include \"accanna.h\""; \
75 echo "#ifdef malloc"; \
76 echo "# undef malloc"; \
77 echo "#endif"; \
78 echo "/* for cannaserver */"; \
79 echo "#define DICHOME \"$(DicDir)\""; \
80 echo "#define ERRDIR \"$(ErrDir)\""; \
81 echo "#define USE_UNIX_SOCKET"; \
82 echo "#define USE_INET_SOCKET"; \
83 echo "#define IR_UNIX_DIR \"$(UnixSockDir)\""; \
84 echo "#define IR_UNIX_SOCKNAME \"$(UnixSockName)\""; \
85 echo "#define ACCESS_FILE \"$(AccessFile)\""; \
86 echo "/* for lib/RKC */";\
87 echo "#define CANNAHOSTFILE \"$(cannaLibDir)/cannahost\"";\
88 echo "/* for lib/canna */";\
89 echo "#define CANNALIBDIR \"$(cannaLibDir)\""; \
90 echo "#define SUPPORT_OLD_WCHAR $(supportOldWchar)"; \
91 echo "/* for scripts */";\
92 echo "#define CANNABINDIR $(cannaBinDir)"; \
93 echo "/* others */";\
94 echo "#define CANNA_LIGHT $(cannaLight)"; \
95 echo "#ifdef nec"; \
96 echo "#undef nec"; \
97 echo "#endif"; \
98 CannaConfInet6; \
99 echo "#endif /* !CANNACONF_H */") > junk
100 #endif /* OS2Architecture */
101 @if test -r $@ && cmp -s junk $@; then \
102 echo "$@ unchanged"; \
103 rm junk; \
104 else \
105 mv junk $@; \
106 fi
107
108 XCOMM Invoke configure only when accanna.h does not exist for faster build
109 accanna.h pubconf.h:
110 $(CONFIGURE_CMD)
111 XCOMM If you want to invoke configure explicitly, do "make config"
112 config::
113 $(CONFIGURE_CMD)
114 reconfig::
115 $(RM) config.cache cwenv.sh
116 $(CONFIGURE_CMD)
117 XCOMM Invoked from confwrapper
118 cwenv.sh:
119 $(CANNAROOT)/confwrapper mkenv CPPFLAGS $(ALLDEFINES) > $@
120 $(CANNAROOT)/confwrapper mkenv CC env $(CC) >> $@
121 $(CANNAROOT)/confwrapper mkenv CFLAGS $(PURE_CFLAGS) >> $@
122
123 CANNAROOT = .
124 SERVERDIR = server dic/phono dic/ideo
125 CLIENTDIR = cmd dic/phono misc
126 SGSDIR = canna lib
127 MOSTDIR = lib canna server cmd dic/phono misc doc
128
129 install:: mkbindir mklibdir mkdicdir mkerrdir
130 instserver:: mkdicdir mkerrdir
131 instclient:: mkbindir mkdicdir
132 instsgs:: mklibdir
133 instmost:: mkbindir mklibdir mkdicdir mkerrdir
134
135 MakeDirectories(mkbindir, $(cannaBinDir))
136 MakeDirectories(mklibdir, $(cannaLibDir))
137 #ifdef InstallAsUser
138 MakeDirectories(mkdicdir, $(DicDir))
139 MakeDirectories(mkerrdir, $(ErrDir))
140 #else
141 MakeDirectoriesLong(mkdicdir, $(DicDir), $(cannaOwner), $(cannaGroup))
142 MakeDirectoriesLong(mkerrdir, $(ErrDir), $(cannaOwner), $(cannaGroup))
143 #endif
144
145 LinkFileList(includes,cannaconf.h,$(CANNAROOT)/include,..)
146 LinkFileList(includes,accanna.h,$(CANNAROOT)/include,..)
147 LinkFileList(includes,pubconf.h,$(CANNAROOT)/include/canna,../..)
148 InstallMultiple(pubconf.h,$(cannaIncDir))
149
150 canna::
151 @echo ""
152 @echo "Building canna"
153 @echo ""
154 @echo ""
155 $(MAKE) Makefiles
156 $(MAKE) clean
157 $(MAKE) includes
158 $(MAKE) -k depend
159 $(MAKE) $(WORLDOPTS)
160 @echo ""
161 @date
162 @echo ""
163
164 instserver::
165 @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
166 for i in $(SERVERDIR) ;\
167 do \
168 (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
169 $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
170 done
171
172 instclient::
173 @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
174 for i in $(CLIENTDIR) ;\
175 do \
176 (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
177 $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
178 done
179
180 instsgs::
181 @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
182 for i in $(SGSDIR) ;\
183 do \
184 (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
185 $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
186 done
187
188 instmost::
189 @case '${MFLAGS}' in *[ik]*) set +e;; esac; \
190 for i in $(MOSTDIR) ;\
191 do \
192 (cd $$i ; echo "installing" "in $(CURRENT_DIR)/$$i..."; \
193 $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' install); \
194 done

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26