X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=Makefile.in.in;h=e4bbc74c2e108e21c389c93f921d51798ad69444;hp=5d6f4f28b46cf1e9160f95eb4fb9a43126dae096;hb=831115c90f7559563cab4c37d81dbf907eef9284;hpb=2ecbafc1fad0c3a797e078ac76ade7639bd3b925 diff --git a/Makefile.in.in b/Makefile.in.in index 5d6f4f2..e4bbc74 100644 --- a/Makefile.in.in +++ b/Makefile.in.in @@ -49,17 +49,23 @@ ## make extraclean ## Still more severe - delete backup and autosave files, too. +#define NOT_C_CODE +#include "src/config.h" + #ifdef USE_GNU_MAKE -RECURSIVE_MAKE=$(MAKE) +RECURSIVE_MAKE_ARGS= #else @SET_MAKE@ -RECURSIVE_MAKE=@RECURSIVE_MAKE@ +RECURSIVE_MAKE_ARGS=@RECURSIVE_MAKE_ARGS@ #endif SHELL = /bin/sh LANG = C +LC_ALL = C RM = rm -f +MAKEPATH=./lib-src/make-path pwd = /bin/pwd +TAR = tar ## ==================== Things `configure' Might Edit ==================== @@ -68,6 +74,7 @@ CPP=@CPP@ LN_S=@LN_S@ CFLAGS=@CFLAGS@ CPPFLAGS=@CPPFLAGS@ +LDFLAGS=@LDFLAGS@ ## These help us choose version- and architecture-specific directories ## to install files in. @@ -92,6 +99,14 @@ PROGNAME=@PROGNAME@ ## not need to change them. This defaults to /usr/local. prefix=@prefix@ +## Variable data (as per each program update) goes here +## The default is ${PROGNAME} +inststaticdir=@inststaticdir@ + +## Static data (constant across program updates) goes here +## The default is ${PROGNAME}-${version} +instvardir=@instvardir@ + ## Like `prefix', but used for architecture-specific files. exec_prefix=@exec_prefix@ @@ -109,7 +124,6 @@ pkgdir=@pkgdir@ ## Where to install and expect the files that XEmacs modifies as it runs. ## These files are all architecture-independent. Right now, the ## only such data is the locking directory; -## ${lockdir} is a subdirectory of this. statedir=@statedir@ ## Where to install and expect executable files to be run by XEmacs @@ -151,11 +165,22 @@ blddir=@blddir@ ## themselves in separate directories. lispdir=@lispdir@ +## Where to install the module files distributed with +## XEmacs. This includes the XEmacs version, so that the +## module files for different versions of XEmacs will install +## themselves in separate directories. +moduledir=@moduledir@ + ## Directory XEmacs should search for lisp files specific ## to this site (i.e. customizations), before consulting ## ${lispdir}. sitelispdir=@sitelispdir@ +## Directory XEmacs should search for module files specific +## to this site (i.e. customizations), before consulting +## ${moduledir}. +sitemoduledir=@sitemoduledir@ + ## Where XEmacs will search for its lisp files while ## building. This is only used during the process of ## compiling XEmacs, to help XEmacs find its lisp files @@ -174,10 +199,8 @@ buildlispdir=${srcdir}/lisp ## at once. etcdir=@etcdir@ -## Where to create and expect the locking directory, where -## the XEmacs locking code keeps track of which files are -## currently being edited. -lockdir=@lockdir@ +## Where to put the DOC file. +docdir=@docdir@ ## Where to put executables to be run by XEmacs rather than ## the user. This path usually includes the XEmacs version @@ -201,7 +224,10 @@ INSTALL_DATA = @INSTALL_DATA@ MAKE_SUBDIR = @MAKE_SUBDIR@ ## Subdirectories that can be made recursively. -SUBDIR = ${MAKE_SUBDIR} man +SUBDIR = ${MAKE_SUBDIR} man + +## Subdirectories that must be cleaned on distclean +SUBDIR_DISTCLEAN = ${SUBDIR} modules/sample modules/ldap modules/zlib modules/base64 ## The makefiles of the directories in ${MAKE_SUBDIR}. SUBDIR_MAKEFILES = @SUBDIR_MAKEFILES@ @@ -214,9 +240,14 @@ INSTALL_ARCH_DEP_SUBDIR = @INSTALL_ARCH_DEP_SUBDIR@ ## When installing the info files, we need to do special things to ## avoid nuking an existing dir file, so we don't do that here; ## instead, we have written out explicit code in the `install' targets. +#ifdef HAVE_CHISE COPYDIR = ${srcdir}/etc ${srcdir}/lisp COPYDESTS = ${etcdir} ${lispdir} -GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize-adjust.h src/config.h lwlib/config.h src/sheap-adjust.h +#else +COPYDIR = ${srcdir}/etc ${srcdir}/lisp +COPYDESTS = ${etcdir} ${lispdir} +#endif +GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/config.h lwlib/config.h src/sheap-adjust.h GENERATED_LISP = lisp/finder-inf.el all: ${PROGNAME} all-elc info @@ -230,7 +261,7 @@ ${PROGNAME}: ${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP} .PHONY: ${SUBDIR} all beta all-elc all-elcs dump-elc dump-elcs autoloads finder ## Convenience target for XEmacs beta testers -beta: clean all-elc finder +beta: clean all-elc finder info ## Convenience target for XEmacs maintainers ## This would run `make-xemacsdist' if I were really confident that everything @@ -244,40 +275,73 @@ dist: all-elc info ## - src/depend from src/*.[ch] .PHONY: config configure depend config: configure depend -configure: ${srcdir}/configure -${srcdir}/configure: ${srcdir}/configure.in +configure: ${srcdir}/configure ${srcdir}/lib-src/config.values.in + +${srcdir}/configure : ${srcdir}/configure.in cd ${srcdir} && autoconf - cd ${srcdir} && /bin/sh lib-src/config.values.sh + +${srcdir}/lib-src/config.values.in : ${srcdir}/configure + cd ${srcdir} && $(SHELL) lib-src/config.values.sh depend ${srcdir}/src/depend: - cd ${srcdir}/src && \ - perl ./make-src-depend > depend.tmp && \ - $(RM) depend && mv depend.tmp depend + cd ./src && $(MAKE) $(RECURSIVE_MAKE_ARGS) depend ## Build XEmacs and recompile out-of-date and missing .elc files along ## the way. -all-elc all-elcs: lib-src lwlib dump-elcs src - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-elc.sh +all-elc all-elcs: ${PROGNAME} autoloads dump-elcs + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l update-elc-2.el -f batch-update-elc-2 lisp +#ifdef UTF2000 + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l update-elc-2.el -f batch-update-elc-2 lisp/utf-2000 +#endif ## Sub-target for all-elc. -dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs - cd ./src && $(RECURSIVE_MAKE) dump-elcs - -autoloads: src - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-autoloads.sh +dump-elc dump-elcs: ${PROGNAME} ${GENERATED_HEADERS} FRC.dump-elcs + cd ./src && $(MAKE) $(RECURSIVE_MAKE_ARGS) dump-elcs + +autoloads: lib-src lwlib src lisp/auto-autoloads.el lisp/custom-load.el + +FRC.lisp.auto.autoloads.el: +lisp/auto-autoloads.el: ${PROGNAME} FRC.lisp.auto.autoloads.el + $(RM) lisp/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -no-autoloads \ + -l autoload -f batch-update-directory lisp + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -f batch-byte-compile lisp/auto-autoloads.el + @$(RM) lisp/auto-autoloads.el~ +#ifdef MULE + $(RM) lisp/mule/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l autoload -f batch-update-directory lisp/mule + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -f batch-byte-compile lisp/mule/auto-autoloads.el + @$(RM) lisp/mule/auto-autoloads.el~ +#endif +#ifdef UTF2000 + $(RM) lisp/utf-2000/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l autoload -f batch-update-directory lisp/utf-2000 + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -f batch-byte-compile lisp/utf-2000/auto-autoloads.el + @$(RM) lisp/utf-2000/auto-autoloads.el~ +#endif -custom-loads: - MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-custom.sh +FRC.lisp.custom.load.el: +lisp/custom-load.el: ${PROGNAME} FRC.lisp.custom.load.el lisp/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -vanilla -l cus-dep \ + -f Custom-make-dependencies lisp finder: src @echo "Building finder database ..." + $(RM) lisp/finder-inf.el @(cd ./lisp; \ ${blddir}/src/${PROGNAME} -batch -vanilla \ -eval '(setq finder-compile-keywords-quiet t)' \ -l finder -f finder-compile-keywords ) @echo "Building finder database ...(done)" -lisp/finder-inf.el: +lisp/finder-inf.el: src @echo "Building finder database ..." @(cd ./lisp; \ ${blddir}/src/${PROGNAME} -batch -vanilla \ @@ -294,15 +358,9 @@ src/Emacs.ad.h: ${srcdir}/etc/Emacs.ad @(echo "/* Do not edit this file!" ; \ echo " Automatically generated from ${srcdir}/etc/Emacs.ad" ; \ echo " */" ; \ - /bin/sh ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \ + $(SHELL) ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \ src/Emacs.ad.h -src/puresize-adjust.h: ${srcdir}/src/puresize.h - @echo "Resetting \`src/puresize-adjust.h'."; \ - (echo "/* Do not edit this file!" ; \ - echo " Automatically generated by XEmacs */" ; \ - echo "#define PURESIZE_ADJUSTMENT 0") > $@ - src/sheap-adjust.h: @echo "Resetting \`src/sheap-adjust.h'."; \ (echo "/* Do not edit this file!" ; \ @@ -318,9 +376,12 @@ FRC.src FRC.lib-src FRC.lwlib FRC.dynodump pkg-src/FRC.tree-x: FRC.lisp.finder-inf.el: ${SUBDIR}: ${SUBDIR_MAKEFILES} ${GENERATED_HEADERS} FRC - cd ./$@ && $(RECURSIVE_MAKE) all + cd ./$@ && $(MAKE) $(RECURSIVE_MAKE_ARGS) all -Makefile: ${srcdir}/Makefile.in config.status +## Building modules depends on ellcc, found in lib-src. +modules/sample modules/ldap modules/zlib modules/base64: lib-src + +Makefile: ${srcdir}/Makefile.in.in config.status ./config.status src/Makefile: ${srcdir}/src/Makefile.in.in ${srcdir}/src/depend config.status @@ -379,7 +440,7 @@ install: all check-features install-arch-dep install-arch-indep install-arch-dep: mkdir for subdir in ${INSTALL_ARCH_DEP_SUBDIR}; do \ - (cd ./$${subdir} && $(RECURSIVE_MAKE) install prefix=${prefix} \ + (cd ./$${subdir} && $(MAKE) $(RECURSIVE_MAKE_ARGS) install prefix=${prefix} \ exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \ archlibdir=${archlibdir}) ; done if test "`(cd ${archlibdir} && $(pwd))`" != \ @@ -387,21 +448,35 @@ install-arch-dep: mkdir if test -f ../Installation; then \ ${INSTALL_DATA} ../Installation ${archlibdir}/Installation; \ fi; \ - for f in DOC config.values; do \ - ${INSTALL_DATA} lib-src/$${f} ${archlibdir}/$${f}; \ - done ; \ + ${INSTALL_DATA} lib-src/config.values ${docdir}/config.values; \ + ${INSTALL_DATA} lib-src/DOC ${docdir}/DOC; \ for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \ do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \ else true; fi +#ifdef PDUMP + ${INSTALL_DATA} src/${PROGNAME}.dmp ${bindir}/${PROGNAME}-${version}-`src/${PROGNAME} -sd`.dmp +#endif +#ifdef WIN32_NATIVE + ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME} + -chmod 0755 ${bindir}/${PROGNAME} +#else +# ifdef CYGWIN + ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe + -chmod 0755 ${bindir}/${PROGNAME}-${version}.exe + cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME} +# else ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version} -chmod 0755 ${bindir}/${PROGNAME}-${version} cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME} +# endif /* CYGWIN */ +#endif /* WIN32_NATIVE */ if test "${prefix}" != "${exec_prefix}"; then \ + $(MAKEPATH) ${exec_prefix}/lib/${instvardir}; \ for dir in \ - lib/${PROGNAME} \ - lib/${PROGNAME}-${version}/etc \ - lib/${PROGNAME}-${version}/info \ - lib/${PROGNAME}-${version}/lisp; do \ + lib/${inststaticdir} \ + lib/${instvardir}/etc \ + lib/${instvardir}/info \ + lib/${instvardir}/lisp; do \ if test ! -d ${exec_prefix}/$${dir}; then \ $(LN_S) ${prefix}/$${dir} ${exec_prefix}/$${dir}; fi; \ done; \ @@ -426,8 +501,8 @@ install-arch-indep: mkdir info -a "`(cd $${dir} && $(pwd))`" != \ "`(cd $${dest} && $(pwd))`" \ && (echo "Copying $${dir}..." ; \ - (cd $${dir} && tar -cf - . ) | \ - (cd $${dest} && umask 022 && tar -xf - );\ + (cd $${dir} && $(TAR) -cf - . ) | \ + (cd $${dest} && umask 022 && $(TAR) -xf - );\ chmod 0755 $${dest}; \ for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \ (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; \ @@ -443,12 +518,36 @@ install-arch-indep: mkdir info chmod 0644 ${infodir}/$${file}; \ done ; \ fi - ## Note it's `xemacs' not ${PROGNAME} cd ${srcdir}/etc && \ for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \ ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \ chmod 0644 ${mandir}/$${page}${manext} ; \ done +#ifdef HAVE_LIBCHISE + ${blddir}/src/${PROGNAME} -batch -vanilla -eval "\ +(let ((path (expand-file-name \"db\" chise-db-directory))\ + (data-dir \"${etcdir}/chise-db\")\ + (i 0)\ + (default-directory chise-db-directory)\ + len chise-dir pre)\ + (if (file-exists-p chise-db-directory)\ + (if (file-exists-p path)\ + (delete-file path))\ + (make-directory chise-db-directory t))\ + (setq len (min (length data-dir) (length path)))\ + (while (and (< i len)\ + (eq (aref path i) (aref data-dir i)))\ + (setq i (1+ i)))\ + (setq data-dir (substring data-dir i))\ + (setq chise-dir (substring path i))\ + (setq i 0)\ + (setq len (length chise-dir))\ + (while (< i len)\ + (if (eq (aref chise-dir i) ?/)\ + (setq pre (concat pre \"../\")))\ + (setq i (1+ i)))\ + (make-symbolic-link (concat pre data-dir) path t))" +#endif @echo "If you would like to save approximately 2M of disk space, do" @echo "make gzip-el" @echo "or you may run " @@ -457,17 +556,16 @@ install-arch-indep: mkdir info @echo "${lispdir}" gzip-el: - ${srcdir}/lib-src/gzip-el.sh ${lispdir} + $(SHELL) ${srcdir}/lib-src/gzip-el.sh ${lispdir} -MAKEPATH=./lib-src/make-path ## Build all the directories to install XEmacs in. ## Since we may be creating several layers of directories, ## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use ## make-path instead of mkdir. Not all mkdirs have the `-p' flag. mkdir: FRC.mkdir - ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \ - ${mandir} ${bindir} ${datadir} ${libdir} ${pkgdir} - -chmod 0777 ${lockdir} + ${MAKEPATH} ${COPYDESTS} ${docdir} ${infodir} ${archlibdir} \ + ${mandir} ${bindir} ${datadir} ${libdir} ${pkgdir} \ + ${sitelispdir} ${moduledir} ${sitemoduledir} ## Delete all the installed files that the `install' target would ## create (but not the noninstalled files such as `make all' would @@ -478,7 +576,7 @@ mkdir: FRC.mkdir #### would be extremely dangerous for anyone to use it. ##uninstall: ## (cd ./lib-src; \ -## $(RECURSIVE_MAKE) uninstall \ +## $(MAKE) $(RECURSIVE_MAKE_ARGS) uninstall \ ## prefix=${prefix} exec_prefix=${exec_prefix} \ ## bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir}) ## for dir in ${lispdir} ${etcdir} ; do \ @@ -512,7 +610,7 @@ FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean FRC.tags: ## target for GCC does not delete `libgcc.a', because recompiling it ## is rarely necessary and takes a lot of time. mostlyclean: FRC.mostlyclean - for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done ## `clean' ## Delete all files from the current directory that are normally @@ -523,7 +621,7 @@ mostlyclean: FRC.mostlyclean ## Delete `.dvi' files here if they are not part of the distribution. clean: FRC.clean - for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done $(RM) core ## `distclean' @@ -533,16 +631,13 @@ clean: FRC.clean ## `make distclean' should leave only the files that were in the ## distribution. top_distclean=\ - $(RM) config.status config.log config-tmp-* build-install Installation ; \ - for d in src lib-src lwlib dynodump ; do \ - $(RM) $$d/Makefile $$d/Makefile.in ; \ - done ; \ - $(RM) core .sbinit Makefile Makefile.in lock/*; \ - $(RM) lisp/finder-inf.el* Installation.el Installation.elc; \ - $(RM) packages mule-packages site-lisp + $(RM) config.status config.log confdefs.h config-tmp-* build-install Installation ; \ + $(RM) core .sbinit lock/* GNUmakefile Makefile Makefile.in ; \ + $(RM) lisp/finder-inf.el* Installation.el Installation.elc ; \ + $(RM) -r site-packages xemacs-packages mule-packages site-lisp distclean: FRC.distclean - for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in $(SUBDIR_DISTCLEAN); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done -${top_distclean} ## `realclean' @@ -557,7 +652,7 @@ distclean: FRC.distclean ## anything that needs to exist in order to run `configure' and then ## begin to build the program. realclean: FRC.realclean - for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done -${top_distclean} $(RM) TAGS @@ -566,7 +661,7 @@ realclean: FRC.realclean ## the coding standards seem to come from. It's like distclean, but ## it deletes backup and autosave files too. extraclean: - for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in $(SUBDIR); do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done $(RM) *~ \#* -${top_distclean} @@ -588,7 +683,7 @@ SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \ unlock: chmod u+w $(SOURCES) cpp/* -cd ./elisp && chmod u+w Makefile README *.texi - for d in src etc lib-src lisp; do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in src etc lib-src lisp; do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done cd ./lisp/term && chmod u+w README *.el cd ./man && chmod u+w *texi* ChangeLog split-man cd ./lwlib && chmod u+w *.[ch] Makefile.in.in @@ -596,7 +691,7 @@ unlock: relock: chmod u-w $(SOURCES) cpp/* -cd ./elisp && chmod u-w Makefile README *.texi - for d in src etc lib-src lisp; do (cd ./$$d && $(RECURSIVE_MAKE) $@); done + for d in src etc lib-src lisp; do (cd ./$$d && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@); done cd ./lisp/term && chmod u+w README *.el cd ./man && chmod u+w *texi* ChangeLog split-man cd ./lwlib && chmod u+w *.[ch] Makefile.in.in @@ -615,13 +710,13 @@ TAGS tags: FRC.tags xargs etags -a -l none -r "/^(def\\(var\\|un\\|alias\\|const\\|macro\\|subst\\|struct\\|face\\|group\\|custom\\|ine-\\(function\\|compiler-macro\\|[a-z-]+alias\\)\\)[ ]+'?\\([^ ]+\\)/\\3/" check: - cd ./src && $(RECURSIVE_MAKE) $@ + cd ./src && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@ info: FRC.info - cd ${srcdir}/man && $(RECURSIVE_MAKE) $@ + cd ${srcdir}/man && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@ dvi: - cd ${srcdir}/man && $(RECURSIVE_MAKE) $@ + cd ${srcdir}/man && $(MAKE) $(RECURSIVE_MAKE_ARGS) $@ ## Fix up version information in executables (Solaris-only) mcs: