comparison lib-src/Makefile.in.in @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents aabb7f5b1c81
children 2f8bb876ab1d
comparison
equal deleted inserted replaced
397:f4aeb21a5bad 398:74fd4e045ea6
51 prefix=@prefix@ 51 prefix=@prefix@
52 exec_prefix=@exec_prefix@ 52 exec_prefix=@exec_prefix@
53 bindir=@bindir@ 53 bindir=@bindir@
54 libdir=@libdir@ 54 libdir=@libdir@
55 srcdir=@srcdir@ 55 srcdir=@srcdir@
56 datadir=@datadir@
57 instvardir=@instvardir@
58 top_srcdir=@top_srcdir@
56 archlibdir=@archlibdir@ 59 archlibdir=@archlibdir@
57 configuration=@configuration@ 60 configuration=@configuration@
58 moduledir=@moduledir@ 61 moduledir=@moduledir@
59 sitemoduledir=@sitemoduledir@ 62 sitemoduledir=@sitemoduledir@
60 63
70 #define NOT_C_CODE 73 #define NOT_C_CODE
71 #include "../src/config.h" 74 #include "../src/config.h"
72 75
73 ## Things that a user might actually run, 76 ## Things that a user might actually run,
74 ## which should be installed in bindir. 77 ## which should be installed in bindir.
78 #ifdef WINDOWSNT
79 INSTALLABLES_BASE = etags ctags b2m ootags
80 #else
75 INSTALLABLES_BASE = etags ctags b2m gnuclient ootags 81 INSTALLABLES_BASE = etags ctags b2m gnuclient ootags
76 INSTALLABLE_SCRIPTS = rcs-checkin pstogif gnudoit gnuattach 82 #endif
83 INSTALLABLE_SCRIPTS = rcs-checkin gnudoit gnuattach
77 #ifdef HAVE_SHLIB 84 #ifdef HAVE_SHLIB
78 #ifdef HAVE_MS_WINDOWS 85 #ifdef HAVE_MS_WINDOWS
79 INSTALLABLES = $(INSTALLABLES_BASE) runxemacs rungnuclient ellcc 86 INSTALLABLES = $(INSTALLABLES_BASE) runxemacs rungnuclient ellcc
80 #else 87 #else
81 INSTALLABLES = $(INSTALLABLES_BASE) ellcc 88 INSTALLABLES = $(INSTALLABLES_BASE) ellcc
82 #endif 89 #endif
83 #else 90 #else
84 #ifdef HAVE_MS_WINDOWS 91 #ifdef HAVE_MS_WINDOWS
85 INSTALLABLES = $(INSTALLABLES_BASE) runxemacs rungnuclient 92 INSTALLABLES = $(INSTALLABLES_BASE) runxemacs rungnuclient
86 #else 93 #else
87 INSTALLABLES = $(INSTALLABLES_BASE) 94 INSTALLABLES = $(INSTALLABLES_BASE)
88 #endif 95 #endif
89 #endif 96 #endif
90 97
91 98
92 ## Things that Emacs runs internally, or during the build process, 99 ## Things that Emacs runs internally, or during the build process,
93 ## which should not be installed in bindir. 100 ## which should not be installed in bindir.
101 #ifdef WINDOWSNT
102 UTILITIES= make-path wakeup profile make-docfile digest-doc \
103 sorted-doc movemail cvtmail yow hexl \
104 mmencode
105 #else
94 UTILITIES= make-path wakeup profile make-docfile digest-doc \ 106 UTILITIES= make-path wakeup profile make-docfile digest-doc \
95 sorted-doc movemail cvtmail fakemail yow hexl \ 107 sorted-doc movemail cvtmail fakemail yow hexl \
96 gnuserv mmencode 108 gnuserv mmencode
109 #endif
97 ## These need to be conditional on I18N3 make-msgfile make-po 110 ## These need to be conditional on I18N3 make-msgfile make-po
98 111
99 ## Like UTILITIES, but they are not system-dependent, and should not be 112 ## Like UTILITIES, but they are not system-dependent, and should not be
100 ## deleted by the distclean target. 113 ## deleted by the distclean target.
101 GEN_SCRIPTS = rcs2log vcdiff gzip-el.sh 114 GEN_SCRIPTS = rcs2log vcdiff gzip-el.sh
147 ld_switch_all=@ld_switch_all@ 160 ld_switch_all=@ld_switch_all@
148 ld_libs_general=@ld_libs_general@ 161 ld_libs_general=@ld_libs_general@
149 162
150 ## We need to #define emacs to get the right versions of some files. 163 ## We need to #define emacs to get the right versions of some files.
151 164
152 cppflags = -Demacs -I../src $(CPPFLAGS) 165 ## To understand the order of -I flags, consider what happens if you run
166 ## ./configure in the source tree, and then run
167 ## $(srcdir).2.26/configure in some other build tree.
168 ## Where will the generated files like config.h be included from?
169 ## This is also why you _must_ use <...> instead of "..."
170 ## when #include'ing generated files.
171 cppflags = -Demacs -I. -I../src -I$(srcdir) -I$(top_srcdir)/src $(CPPFLAGS)
153 cflags = $(CFLAGS) $(cppflags) $(c_switch_general) 172 cflags = $(CFLAGS) $(cppflags) $(c_switch_general)
154 ldflags = $(LDFLAGS) $(ld_switch_general) $(ld_libs_general) 173 ldflags = $(LDFLAGS) $(ld_switch_general) $(ld_libs_general)
155 174
156 ## This is the default compilation command. 175 ## This is the default compilation command.
157 ## But we should never rely on it, because some make version 176 ## But we should never rely on it, because some make version
158 ## failed to find it for getopt.o. 177 ## failed to find it for getopt.o.
159 ## Using an explicit command made it work. 178 ## Using an explicit command made it work.
160 .c.o: 179 .c.o:
161 ${CC} -c $(cflags) $< 180 ${CC} -c $(cflags) $<
181
182 .PHONY : all maybe-blessmail install uninstall
162 183
163 all: ${UTILITIES} ${INSTALLABLES} srcdir-symlink.stamp 184 all: ${UTILITIES} ${INSTALLABLES} srcdir-symlink.stamp
164 185
165 ## Make symlinks for shell scripts if using --srcdir 186 ## Make symlinks for shell scripts if using --srcdir
166 srcdir-symlink.stamp: 187 srcdir-symlink.stamp:
216 done ; \ 237 done ; \
217 fi 238 fi
218 239
219 ## We do not need to install "wakeup" explicitly, because it will be 240 ## We do not need to install "wakeup" explicitly, because it will be
220 ## copied when this whole directory is copied. 241 ## copied when this whole directory is copied.
221 .PHONY : all maybe-blessmail install uninstall
222 install: ${archlibdir} 242 install: ${archlibdir}
223 @echo; echo "Installing utilities for users to run." 243 @echo; echo "Installing utilities for users to run."
224 for file in ${INSTALLABLES} ; do \ 244 for file in ${INSTALLABLES} ; do \
225 (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \ 245 (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
226 done 246 done
263 GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h 283 GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
264 getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h 284 getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
265 ${CC} -c $(cflags) ${srcdir}/getopt.c 285 ${CC} -c $(cflags) ${srcdir}/getopt.c
266 getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h 286 getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
267 ${CC} -c $(cflags) ${srcdir}/getopt1.c 287 ${CC} -c $(cflags) ${srcdir}/getopt1.c
268 alloca.o: ${srcdir}/../src/alloca.c 288 alloca.o: ${top_srcdir}/src/alloca.c
269 ${CC} -c $(cflags) ${srcdir}/../src/alloca.c 289 ${CC} -c $(cflags) ${srcdir}/../src/alloca.c
270 290
271 regex.o: ${srcdir}/../src/regex.c ${srcdir}/../src/regex.h 291 regex.o: ${srcdir}/../src/regex.c ${top_srcdir}/src/regex.h
272 $(CC) -c `echo $(cflags) | sed 's/-Demacs/ /'` \ 292 $(CC) -c `echo $(cflags) | sed 's/-Demacs/ /'` \
273 -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c 293 -DINHIBIT_STRING_HEADER ${top_srcdir}/src/regex.c
274 294
275 etags_args = -I. $(cflags) -I${srcdir} -I${srcdir}/../src \ 295 etags_args = $(cflags) -DVERSION='"${version}"' ${srcdir}/etags.c \
276 -DVERSION='"${version}"' ${srcdir}/etags.c \
277 $(GETOPTOBJS) regex.o $(ldflags) 296 $(GETOPTOBJS) regex.o $(ldflags)
278 etags_deps = ${srcdir}/etags.c $(GETOPTDEPS) regex.o ../src/config.h 297 etags_deps = ${srcdir}/etags.c $(GETOPTDEPS) regex.o ../src/config.h
279 298
280 etags: ${etags_deps} 299 etags: ${etags_deps}
281 $(CC) ${etags_args} -o $@ 300 $(CC) ${etags_args} -o $@
282 301
283 ellcc_args = -I. $(cflags) -I${srcdir} -I${srcdir}/../src \ 302 ellcc_args = $(cflags) ${srcdir}/ellcc.c $(ldflags)
284 ${srcdir}/ellcc.c $(ldflags)
285 ellcc_deps = ${srcdir}/ellcc.c ellcc.h ../src/config.h 303 ellcc_deps = ${srcdir}/ellcc.c ellcc.h ../src/config.h
286 304
287 ellcc: ${ellcc_deps} 305 ellcc: ${ellcc_deps}
288 $(CC) ${ellcc_args} -o $@ 306 $(CC) ${ellcc_args} -o $@
289 307
290 run_args = -I. $(cflags) -I${srcdir} -I${srcdir}/../src \ 308 run_args = $(cflags) -DVERSION='"${version}"' ${srcdir}/run.c \
291 -DVERSION='"${version}"' ${srcdir}/run.c \
292 $(ldflags) -Wl,--subsystem,windows -e _mainCRTStartup 309 $(ldflags) -Wl,--subsystem,windows -e _mainCRTStartup
293 run_deps = ${srcdir}/run.c ${srcdir}/run.h ${srcdir}/run.rc \ 310 run_deps = ${srcdir}/run.c ${srcdir}/run.h ${srcdir}/run.rc \
294 ${srcdir}/../nt/xemacs.ico ${srcdir}/../nt/file.ico \ 311 ${srcdir}/../nt/xemacs.ico ${srcdir}/../nt/file.ico \
295 ${srcdir}/../nt/lisp.ico 312 ${srcdir}/../nt/lisp.ico
296 313
297 run: ${run_deps} 314 run: ${run_deps}
298 windres --include-dir ${srcdir}/../nt -i run.rc -o run_res.o 315 windres --include-dir ${srcdir}/../nt -i run.rc -o run_res.o
303 cp run.exe $@.exe 320 cp run.exe $@.exe
304 321
305 rungnuclient: run 322 rungnuclient: run
306 cp run.exe $@.exe 323 cp run.exe $@.exe
307 324
308 ootags_args = -I. $(cflags) -I${srcdir} -I${srcdir}/../src \ 325 ootags_args = $(cflags) -DVERSION='"${version}"' ${srcdir}/ootags.c \
309 -DVERSION='"${version}"' ${srcdir}/ootags.c \
310 $(GETOPTOBJS) regex.o $(ldflags) 326 $(GETOPTOBJS) regex.o $(ldflags)
311 ootags_deps = ${srcdir}/ootags.c $(GETOPTDEPS) regex.o ../src/config.h 327 ootags_deps = ${srcdir}/ootags.c $(GETOPTDEPS) regex.o ../src/config.h
312 328
313 ootags: ${ootags_deps} 329 ootags: ${ootags_deps}
314 $(CC) ${ootags_args} -o $@ 330 $(CC) ${ootags_args} -o $@
315 331
316 ## ctags depends on etags to assure that parallel makes do not write 332 ## ctags depends on etags to assure that parallel makes do not write