comparison Makefile.in @ 280:7df0dd720c89 r21-0b38

Import from CVS: tag r21-0b38
author cvs
date Mon, 13 Aug 2007 10:32:22 +0200
parents 90d73dddcdc4
children 558f606b08ae
comparison
equal deleted inserted replaced
279:c20b2fb5bb0a 280:7df0dd720c89
60 60
61 CC=@CC@ 61 CC=@CC@
62 CPP=@CPP@ 62 CPP=@CPP@
63 LN_S=@LN_S@ 63 LN_S=@LN_S@
64 CFLAGS=@CFLAGS@ 64 CFLAGS=@CFLAGS@
65 CPPFLAGS=@CPPFLAGS@
65 66
66 ## These help us choose version- and architecture-specific directories 67 ## These help us choose version- and architecture-specific directories
67 ## to install files in. 68 ## to install files in.
68 69
69 ## This should be the number of the XEmacs version we're building, 70 ## This should be the number of the XEmacs version we're building,
71 version=@version@ 72 version=@version@
72 73
73 ## This should be the name of the configuration we're building XEmacs 74 ## This should be the name of the configuration we're building XEmacs
74 ## for, like `mips-dec-ultrix' or `sparc-sun-sunos'. 75 ## for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
75 configuration=@configuration@ 76 configuration=@configuration@
77
78 ## This will be the name of the generated binary and is set automatically
79 ## by configure.
80 PROGNAME=@PROGNAME@
76 81
77 ## ==================== Where To Install Things ==================== 82 ## ==================== Where To Install Things ====================
78 83
79 ## The default location for installation. Everything is placed in 84 ## The default location for installation. Everything is placed in
80 ## subdirectories of this directory. The default values for many of 85 ## subdirectories of this directory. The default values for many of
132 137
133 ## ==================== XEmacs-specific directories ==================== 138 ## ==================== XEmacs-specific directories ====================
134 139
135 ## These variables hold the values XEmacs will actually use. They are 140 ## These variables hold the values XEmacs will actually use. They are
136 ## based on the values of the standard Make variables above. 141 ## based on the values of the standard Make variables above.
137
138 progname=xemacs
139 142
140 ## Where to install the lisp files distributed with 143 ## Where to install the lisp files distributed with
141 ## XEmacs. This includes the XEmacs version, so that the 144 ## XEmacs. This includes the XEmacs version, so that the
142 ## lisp files for different versions of XEmacs will install 145 ## lisp files for different versions of XEmacs will install
143 ## themselves in separate directories. 146 ## themselves in separate directories.
209 COPYDIR = ${srcdir}/etc ${srcdir}/lisp 212 COPYDIR = ${srcdir}/etc ${srcdir}/lisp
210 COPYDESTS = ${etcdir} ${lispdir} 213 COPYDESTS = ${etcdir} ${lispdir}
211 GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize-adjust.h src/config.h lwlib/config.h src/sheap-adjust.h 214 GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize-adjust.h src/config.h lwlib/config.h src/sheap-adjust.h
212 GENERATED_LISP = lisp/finder-inf.el 215 GENERATED_LISP = lisp/finder-inf.el
213 216
214 all: xemacs all-elc info 217 all: ${PROGNAME} all-elc info
215 218
216 xemacs: ${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP} 219 ${PROGNAME}: ${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP}
217 220
218 ## For performance and consistency, no built-in rules 221 ## For performance and consistency, no built-in rules
219 .SUFFIXES: 222 .SUFFIXES:
220 223
221 .NO_PARALLEL: ${GENERATED_HEADERS} ${MAKE_SUBDIR} dump-elcs 224 .NO_PARALLEL: ${GENERATED_HEADERS} ${MAKE_SUBDIR} dump-elcs
247 $(RM) depend && mv depend.tmp depend 250 $(RM) depend && mv depend.tmp depend
248 251
249 ## Build XEmacs and recompile out-of-date and missing .elc files along 252 ## Build XEmacs and recompile out-of-date and missing .elc files along
250 ## the way. 253 ## the way.
251 all-elc all-elcs: lib-src lwlib dump-elcs src 254 all-elc all-elcs: lib-src lwlib dump-elcs src
252 MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-elc.sh 255 MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-elc.sh
253 256
254 ## Sub-target for all-elc. 257 ## Sub-target for all-elc.
255 dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs 258 dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs
256 cd src && $(RECURSIVE_MAKE) dump-elcs 259 cd src && $(RECURSIVE_MAKE) dump-elcs
257 260
258 autoloads: src 261 autoloads: src
259 MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-autoloads.sh 262 MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-autoloads.sh
260 263
261 custom-loads: 264 custom-loads:
262 MAKE='$(MAKE)' sh ${srcdir}/lib-src/update-custom.sh 265 MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-custom.sh
263 266
264 finder: src 267 finder: src
265 @echo "Building finder database ..." 268 @echo "Building finder database ..."
266 @(cd lisp; \ 269 @(cd lisp; \
267 ${blddir}/src/xemacs -batch -vanilla \ 270 ${blddir}/src/${PROGNAME} -batch -vanilla \
268 -eval '(setq finder-compile-keywords-quiet t)' \ 271 -eval '(setq finder-compile-keywords-quiet t)' \
269 -l finder -f finder-compile-keywords ) 272 -l finder -f finder-compile-keywords )
270 @echo "Building finder database ...(done)" 273 @echo "Building finder database ...(done)"
271 274
272 lisp/finder-inf.el: 275 lisp/finder-inf.el:
273 @echo "Building finder database ..." 276 @echo "Building finder database ..."
274 @(cd lisp; \ 277 @(cd lisp; \
275 ${blddir}/src/xemacs -batch -vanilla \ 278 ${blddir}/src/${PROGNAME} -batch -vanilla \
276 -eval '(setq finder-compile-keywords-quiet t)' \ 279 -eval '(setq finder-compile-keywords-quiet t)' \
277 -l finder -f finder-compile-keywords ) 280 -l finder -f finder-compile-keywords )
278 @echo "Building finder database ...(done)" 281 @echo "Building finder database ...(done)"
279 282
280 ## We have to force the building of Emacs.ad.h as well in order to get it 283 ## We have to force the building of Emacs.ad.h as well in order to get it
361 ## don't see the point in avoiding modifying paths.h. It creates an 364 ## don't see the point in avoiding modifying paths.h. It creates an
362 ## inconsistency in the build process. So we go ahead and depend on 365 ## inconsistency in the build process. So we go ahead and depend on
363 ## all. --cet 366 ## all. --cet
364 367
365 check-features: all 368 check-features: all
366 ${blddir}/src/xemacs -batch -l check-features.el 369 ${blddir}/src/${PROGNAME} -batch -l check-features.el
367 370
368 install-only: ${MAKE_SUBDIR} check-features install-arch-dep install-arch-indep 371 install-only: ${MAKE_SUBDIR} check-features install-arch-dep install-arch-indep
369 372
370 install: all check-features install-arch-dep install-arch-indep 373 install: all check-features install-arch-dep install-arch-indep
371 374
382 ${INSTALL_DATA} lib-src/$${f} ${archlibdir}/$${f}; \ 385 ${INSTALL_DATA} lib-src/$${f} ${archlibdir}/$${f}; \
383 done ; \ 386 done ; \
384 for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \ 387 for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \
385 do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \ 388 do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \
386 else true; fi 389 else true; fi
387 ${INSTALL_PROGRAM} src/xemacs ${bindir}/${progname}-${version} 390 ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}
388 -chmod 0755 ${bindir}/${progname}-${version} 391 -chmod 0755 ${bindir}/${PROGNAME}-${version}
389 cd ${bindir} && $(RM) ./xemacs && ${LN_S} ${progname}-${version} ./xemacs 392 cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
390 if test "${prefix}" != "${exec_prefix}"; then \ 393 if test "${prefix}" != "${exec_prefix}"; then \
391 for dir in \ 394 for dir in \
392 lib/xemacs \ 395 lib/${PROGNAME} \
393 lib/${progname}-${version}/etc \ 396 lib/${PROGNAME}-${version}/etc \
394 lib/${progname}-${version}/info \ 397 lib/${PROGNAME}-${version}/info \
395 lib/${progname}-${version}/lisp; do \ 398 lib/${PROGNAME}-${version}/lisp; do \
396 if test ! -d ${exec_prefix}/$${dir}; then \ 399 if test ! -d ${exec_prefix}/$${dir}; then \
397 $(LN_S) ${prefix}/$${dir} ${exec_prefix}/$${dir}; fi; \ 400 $(LN_S) ${prefix}/$${dir} ${exec_prefix}/$${dir}; fi; \
398 done; \ 401 done; \
399 fi 402 fi
400 403
429 for file in *.info* ; do \ 432 for file in *.info* ; do \
430 ${INSTALL_DATA} $${file} ${infodir}/$${file} ; \ 433 ${INSTALL_DATA} $${file} ${infodir}/$${file} ; \
431 chmod 0644 ${infodir}/$${file}; \ 434 chmod 0644 ${infodir}/$${file}; \
432 done ; \ 435 done ; \
433 fi 436 fi
437 ## Note it's `xemacs' not ${PROGNAME}
434 cd ${srcdir}/etc && \ 438 cd ${srcdir}/etc && \
435 for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \ 439 for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \
436 ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \ 440 ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
437 chmod 0644 ${mandir}/$${page}${manext} ; \ 441 chmod 0644 ${mandir}/$${page}${manext} ; \
438 done 442 done
447 ${srcdir}/lib-src/gzip-el.sh ${lispdir} 451 ${srcdir}/lib-src/gzip-el.sh ${lispdir}
448 452
449 MAKEPATH=./lib-src/make-path 453 MAKEPATH=./lib-src/make-path
450 ## Build all the directories to install XEmacs in. 454 ## Build all the directories to install XEmacs in.
451 ## Since we may be creating several layers of directories, 455 ## Since we may be creating several layers of directories,
452 ## (e.g. /usr/local/lib/${progname}-20.5/sparc-sun-solaris2.6), we use 456 ## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use
453 ## make-path instead of mkdir. Not all mkdirs have the `-p' flag. 457 ## make-path instead of mkdir. Not all mkdirs have the `-p' flag.
454 mkdir: FRC.mkdir 458 mkdir: FRC.mkdir
455 ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \ 459 ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \
456 ${mandir} ${bindir} ${datadir} ${libdir} ${pkgdir} 460 ${mandir} ${bindir} ${datadir} ${libdir} ${pkgdir}
457 -chmod 0777 ${lockdir} 461 -chmod 0777 ${lockdir}
472 # case `(cd $${dir} ; $(pwd))` in \ 476 # case `(cd $${dir} ; $(pwd))` in \
473 # `(cd ${srcdir} ; $(pwd))`* ) ;; \ 477 # `(cd ${srcdir} ; $(pwd))`* ) ;; \
474 # * ) $(RM) $${dir} ;; \ 478 # * ) $(RM) $${dir} ;; \
475 # esac ; \ 479 # esac ; \
476 # case $${dir} in \ 480 # case $${dir} in \
477 # ${datadir}/xemacs/${version}/* ) \ 481 # ${datadir}/${PROGNAME}/${version}/* ) \
478 # $(RM) -r ${datadir}/xemacs/${version} \ 482 # $(RM) -r ${datadir}/${PROGNAME}/${version} \
479 # ;; \ 483 # ;; \
480 # esac ; \ 484 # esac ; \
481 # done 485 # done
482 # cd ${infodir} && $(RM) cl* xemacs* forms* info* vip* 486 # cd ${infodir} && $(RM) cl* ${PROGNAME}* forms* info* vip*
483 # cd ${mandir} && $(RM) xemacs.1 etags.1 ctags.1 gnuserv.1 487 # cd ${mandir} && $(RM) xemacs.1 etags.1 ctags.1 gnuserv.1
484 # cd ${bindir} && $(RM) ${progname}-${version} xemacs 488 # cd ${bindir} && $(RM) ${PROGNAME}-${version} ${PROGNAME}
485 489
486 490
487 ## Some makes seem to remember that they've built something called FRC, 491 ## Some makes seem to remember that they've built something called FRC,
488 ## so you can only use a given FRC once per makefile. 492 ## so you can only use a given FRC once per makefile.
489 FRC FRC.src.paths.h FRC.mkdir FRC.dump-elcs FRC.info: 493 FRC FRC.src.paths.h FRC.mkdir FRC.dump-elcs FRC.info:
602 ## We have automated tests! 606 ## We have automated tests!
603 testdir = ${srcdir}/tests 607 testdir = ${srcdir}/tests
604 tests = ${testdir}/basic-lisp.el ${testdir}/database.el 608 tests = ${testdir}/basic-lisp.el ${testdir}/database.el
605 609
606 check: 610 check:
607 src/xemacs -batch -l ${testdir}/test-emacs.el -f batch-test-emacs ${tests} 611 src/${PROGNAME} -batch -l ${testdir}/test-emacs.el -f batch-test-emacs ${tests}
608 612
609 info: FRC.info 613 info: FRC.info
610 cd ${srcdir}/man && $(RECURSIVE_MAKE) $@ 614 cd ${srcdir}/man && $(RECURSIVE_MAKE) $@
611 615
612 dvi: 616 dvi:
614 618
615 ## Fix up version information in executables (Solaris-only) 619 ## Fix up version information in executables (Solaris-only)
616 mcs: 620 mcs:
617 date=`LANG=C LC_ALL=C date -u '+%e %b %Y'`; \ 621 date=`LANG=C LC_ALL=C date -u '+%e %b %Y'`; \
618 ident="@(#)RELEASE VERSION XEmacs ${version} $${date}"; \ 622 ident="@(#)RELEASE VERSION XEmacs ${version} $${date}"; \
619 for f in `file lib-src/* src/xemacs | grep ELF | sed -e 's/:.*//'`; do \ 623 for f in `file lib-src/* src/${PROGNAME} | grep ELF | sed -e 's/:.*//'`; do \
620 mcs -da "$${ident} `echo $${f} | sed 's/.*\///'`" $${f}; \ 624 mcs -da "$${ident} `echo $${f} | sed 's/.*\///'`" $${f}; \
621 done 625 done