From dff1df9c65c16f31501d063a046764649c31b046 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 8 Nov 2000 12:15:04 +0000 Subject: [PATCH] * texi/Makefile.in (install-ja-info): Specify `EMACS' and `infodir'. (install-info): Ditto. (install-ja): Ditto. * lisp/lpath.el (md5): Fbind using `maybe-fbind'. * lisp/dgnushack.el (dgnushack-compose-package): Remove function. (dgnushack-install-package-info-ja): Remove function. (dgnushack-install-package-info): Remove function. (dgnushack-install-package-lick): Remove function. (dgnushack-install-package-pkginfo): Remove function. (dgnushack-install-package-info-files): Remove function. (dgnushack-install-package-manifest): New function. (dgnushack-remove-extra-files-in-package): New function. (dgnushack-gnus-product-name): Remove function. (dgnushack-examine-package-dir): Remove function. (dgnushack-exporting-files): Rename from `dgnushack-exported-files'. (dgnushack-unexporting-files): Rename from `dgnushack-unexported-files'; attempt to fix `load-path' for W3 and retry to load `w3-forms' if it is failed. (dgnushack-w3-dir): New variable. * lisp/Makefile.in (remove-extra-files-in-package): New target. (install-package-manifest): New target. (install-package-info-ja): Remove target. (install-package-info): Remove target. (install-package-lick): Remove target. (install-lisp): New target detached from `install'. (install): Call `clever' and `install-lisp'. (EXPORTING_FILES, GNUS_PRODUCT_NAME): New variables. * configure: Regenerate. * aclocal.m4 (AC_PATH_PACKAGEDIR): Examine `PACKAGEDIR' if it is not specified under XEmacs. (AC_EXAMINE_PACKAGEDIR): New function. (AC_PATH_LISPDIR): Don't say annotations about install-package if FSFmacs is used. (AC_DEFINE_GNUS_PRODUCT_NAME): Add substitution for `GNUS_PRODUCT_NAME'. * Makefile.in (remove-extra-files-in-package): New target. (install-package-manifest): New target. (install-package-info-ja): Examine `PACKAGEDIR' if it is not specified; call install-ja-info in texi/Makefile. (install-package-info): Examine `PACKAGEDIR' if it is not specified; call install-info in texi/Makefile. (install-package-lisp): Rename from `install-package-lick'; examine `PACKAGEDIR' if it is not specified; call `install-lisp' in lisp/Makefile. (install-package-ja): Call `xlick', `compose-package', `remove-extra-files-in-package', `install-package-lisp', `install-package-info', `install-package-info-ja' and `install-package-manifest'. (install-package): Call `xlick', `compose-package', `remove-extra-files-in-package', `install-package-lisp', `install-package-info' and `install-package-manifest'. (install-info-ja, install-info): Specify `infodir'. (EXAMINE_PACKAGEDIR, GNUS_PRODUCT_NAME, infodir): New variables. --- ChangeLog | 63 +++++++++++++++++ Makefile.in | 91 ++++++++++++++++++++++--- aclocal.m4 | 51 +++++++++++--- configure | 140 +++++++++++++++++++++++++++++++------- lisp/Makefile.in | 27 ++++---- lisp/dgnushack.el | 194 ++++++++++++++++++----------------------------------- lisp/lpath.el | 4 +- texi/Makefile.in | 9 ++- 8 files changed, 386 insertions(+), 193 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6f39fdf..9551e9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,66 @@ +2000-11-08 Katsumi Yamaoka + + * texi/Makefile.in (install-ja-info): Specify `EMACS' and + `infodir'. + (install-info): Ditto. + (install-ja): Ditto. + + * lisp/lpath.el (md5): Fbind using `maybe-fbind'. + + * lisp/dgnushack.el (dgnushack-compose-package): Remove function. + (dgnushack-install-package-info-ja): Remove function. + (dgnushack-install-package-info): Remove function. + (dgnushack-install-package-lick): Remove function. + (dgnushack-install-package-pkginfo): Remove function. + (dgnushack-install-package-info-files): Remove function. + (dgnushack-install-package-manifest): New function. + (dgnushack-remove-extra-files-in-package): New function. + (dgnushack-gnus-product-name): Remove function. + (dgnushack-examine-package-dir): Remove function. + (dgnushack-exporting-files): Rename from `dgnushack-exported-files'. + (dgnushack-unexporting-files): Rename from + `dgnushack-unexported-files'; attempt to fix `load-path' for W3 and + retry to load `w3-forms' if it is failed. + (dgnushack-w3-dir): New variable. + + * lisp/Makefile.in (remove-extra-files-in-package): New target. + (install-package-manifest): New target. + (install-package-info-ja): Remove target. + (install-package-info): Remove target. + (install-package-lick): Remove target. + (install-lisp): New target detached from `install'. + (install): Call `clever' and `install-lisp'. + (EXPORTING_FILES, GNUS_PRODUCT_NAME): New variables. + + * configure: Regenerate. + + * aclocal.m4 (AC_PATH_PACKAGEDIR): Examine `PACKAGEDIR' if it is + not specified under XEmacs. + (AC_EXAMINE_PACKAGEDIR): New function. + (AC_PATH_LISPDIR): Don't say annotations about install-package if + FSFmacs is used. + (AC_DEFINE_GNUS_PRODUCT_NAME): Add substitution for + `GNUS_PRODUCT_NAME'. + + * Makefile.in (remove-extra-files-in-package): New target. + (install-package-manifest): New target. + (install-package-info-ja): Examine `PACKAGEDIR' if it is not + specified; call install-ja-info in texi/Makefile. + (install-package-info): Examine `PACKAGEDIR' if it is not + specified; call install-info in texi/Makefile. + (install-package-lisp): Rename from `install-package-lick'; examine + `PACKAGEDIR' if it is not specified; call `install-lisp' in + lisp/Makefile. + (install-package-ja): Call `xlick', `compose-package', + `remove-extra-files-in-package', `install-package-lisp', + `install-package-info', `install-package-info-ja' and + `install-package-manifest'. + (install-package): Call `xlick', `compose-package', + `remove-extra-files-in-package', `install-package-lisp', + `install-package-info' and `install-package-manifest'. + (install-info-ja, install-info): Specify `infodir'. + (EXAMINE_PACKAGEDIR, GNUS_PRODUCT_NAME, infodir): New variables. + 2000-11-07 Tetsuo Tsukamoto * texi/gnus-ja.texi: Do not use characters other than ascii ones diff --git a/Makefile.in b/Makefile.in index f0c8650..eef14c0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,6 @@ prefix = @prefix@ datadir = @datadir@ +infodir = @infodir@ lispdir = @lispdir@ srcdir = @srcdir@ @@ -7,6 +8,24 @@ srcdir = @srcdir@ EMACS = @EMACS@ XEMACS = @XEMACS@ PACKAGEDIR = @PACKAGEDIR@ +GNUS_PRODUCT_NAME = @GNUS_PRODUCT_NAME@ + +# It will be used to look for the XEmacs package path if this file is +# mis-configured (e.g. configured for FSFmacs). +EXAMINE_PACKAGEDIR = $(XEMACS) -batch -q -no-site-file -eval \ + "(let (package-dir) \ + (if (boundp (quote early-packages)) \ + (let ((dirs (delq nil (append (if early-package-load-path \ + early-packages) \ + (if late-package-load-path \ + late-packages) \ + (if last-package-load-path \ + last-packages))))) \ + (while (and dirs (not package-dir)) \ + (if (file-directory-p (car dirs)) \ + (setq package-dir (car dirs) \ + dirs (cdr dirs)))))) \ + (princ (or package-dir \"\")))" 2>/dev/null all: lick info @@ -23,32 +42,82 @@ install-lisp: cd lisp && $(MAKE) EMACS="$(EMACS)" lispdir="$(lispdir)" install install-info: - cd texi && $(MAKE) EMACS="$(EMACS)" install + cd texi && $(MAKE) EMACS="$(EMACS)" infodir="$(infodir) install install-info-ja: - cd texi && $(MAKE) EMACS="$(EMACS)" install-ja + cd texi && $(MAKE) EMACS="$(EMACS)" infodir="$(infodir) install-ja ## Rule for XEmacs package. -install-package: xlick install-package-lick xinfo install-package-info +install-package: xlick compose-package remove-extra-files-in-package \ + install-package-lisp \ + install-package-info install-package-manifest -install-package-ja: install-package xinfo-ja install-package-info-ja +install-package-ja: xlick compose-package remove-extra-files-in-package \ + install-package-lisp \ + install-package-info install-package-info-ja \ + install-package-manifest package: xlick xinfo compose-package package-ja: xlick xinfo xinfo-ja compose-package # Sub-rule for XEmacs package. -install-package-lick: - cd lisp && $(MAKE) EMACS="$(XEMACS)" PACKAGEDIR="$(PACKAGEDIR)" \ - install-package-lick +install-package-lisp: + @if test x$(PACKAGEDIR) = x; then \ + package_dir=`$(EXAMINE_PACKAGEDIR)`; \ + else \ + package_dir="$(PACKAGEDIR)"; \ + fi; \ + echo "cd lisp && $(MAKE)" \ + "lispdir=$$package_dir""/lisp/$(GNUS_PRODUCT_NAME)" \ + "install-lisp"; \ + cd lisp && $(MAKE) \ + lispdir="$$package_dir""/lisp/$(GNUS_PRODUCT_NAME)" \ + install-lisp install-package-info: - cd lisp && $(MAKE) EMACS="$(XEMACS)" PACKAGEDIR="$(PACKAGEDIR)" \ - install-package-info + @if test x$(PACKAGEDIR) = x; then \ + package_dir=`$(EXAMINE_PACKAGEDIR)`; \ + else \ + package_dir="$(PACKAGEDIR)"; \ + fi; \ + echo "cd texi && $(MAKE) EMACS=$(XEMACS)" \ + "infodir=$$package_dir""/info install-info"; \ + cd texi && $(MAKE) EMACS="$(XEMACS)" \ + infodir="$$package_dir""/info" install-info install-package-info-ja: - cd lisp && $(MAKE) EMACS="$(XEMACS)" PACKAGEDIR="$(PACKAGEDIR)" \ - install-package-info-ja + @if test x$(PACKAGEDIR) = x; then \ + package_dir=`$(EXAMINE_PACKAGEDIR)`; \ + else \ + package_dir="$(PACKAGEDIR)"; \ + fi; \ + echo "cd texi && $(MAKE) EMACS=$(XEMACS)" \ + "infodir=$$package_dir""/info install-ja-info"; \ + cd texi && $(MAKE) EMACS="$(XEMACS)" \ + infodir="$$package_dir""/info" install-ja-info + +install-package-manifest: + @if test x$(PACKAGEDIR) = x; then \ + package_dir=`$(EXAMINE_PACKAGEDIR)`; \ + else \ + package_dir="$(PACKAGEDIR)"; \ + fi; \ + echo "cd lisp && $(MAKE) EMACS=$(XEMACS) PACKAGEDIR=$$package_dir" \ + "install-package-manifest"; \ + cd lisp && $(MAKE) EMACS="$(XEMACS)" PACKAGEDIR=$$package_dir \ + install-package-manifest + +remove-extra-files-in-package: + @if test x$(PACKAGEDIR) = x; then \ + package_dir=`$(EXAMINE_PACKAGEDIR)`; \ + else \ + package_dir="$(PACKAGEDIR)"; \ + fi; \ + echo "cd lisp && $(MAKE) EMACS=$(XEMACS) PACKAGEDIR=$$package_dir" \ + "remove-extra-files-in-package"; \ + cd lisp && $(MAKE) EMACS="$(XEMACS)" PACKAGEDIR=$$package_dir \ + remove-extra-files-in-package compose-package: cd lisp && $(MAKE) EMACS="$(XEMACS)" compose-package diff --git a/aclocal.m4 b/aclocal.m4 index fc0ba51..cf0b64b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,7 @@ AC_DEFUN(AC_DEFINE_GNUS_PRODUCT_NAME, [dnl Defining gnus product name. - GNUS_PRODUCT_NAME=$1]) + GNUS_PRODUCT_NAME=$1 + AC_SUBST(GNUS_PRODUCT_NAME)]) AC_DEFUN(AC_CHECK_EMACS, [dnl Check for Emacsen. @@ -95,8 +96,12 @@ AC_DEFUN(AC_PATH_LISPDIR, [ fi done fi - AC_MSG_RESULT([$lispdir + if test ${EMACS_FLAVOR} = xemacs; then + AC_MSG_RESULT([$lispdir (it will be ignored when \"make install-package[[-ja]]\" is done)]) + else + AC_MSG_RESULT([$lispdir]) + fi AC_SUBST(lispdir) ]) @@ -147,16 +152,44 @@ fi AC_MSG_RESULT("${W3}") ]) +AC_DEFUN(AC_EXAMINE_PACKAGEDIR, + [dnl Examine PACKAGEDIR. + AC_EMACS_LISP(PACKAGEDIR, + (let (package-dir)\ + (if (boundp (quote early-packages))\ + (let ((dirs (delq nil (append (if early-package-load-path\ + early-packages)\ + (if late-package-load-path\ + late-packages)\ + (if last-package-load-path\ + last-packages)))))\ + (while (and dirs (not package-dir))\ + (if (file-directory-p (car dirs))\ + (setq package-dir (car dirs)\ + dirs (cdr dirs))))))\ + (or package-dir \"\")), + "noecho")]) + AC_DEFUN(AC_PATH_PACKAGEDIR, [dnl Check for PACKAGEDIR. - AC_ARG_WITH(packagedir, - [ --with-packagedir=DIR package DIR for XEmacs], - [if test x$withval != xyes -a x$withval != x; then - AC_MSG_CHECKING([where the package should go]) - PACKAGEDIR=$withval + if test ${EMACS_FLAVOR} = xemacs; then + AC_MSG_CHECKING([where the XEmacs package is]) + AC_ARG_WITH(packagedir, + [ --with-packagedir=DIR package DIR for XEmacs], + [if test x$withval != xyes -a x$withval != x; then + PACKAGEDIR=$withval + else + AC_EXAMINE_PACKAGEDIR + fi], + AC_EXAMINE_PACKAGEDIR) + if test x$PACKAGEDIR = x; then + AC_MSG_RESULT("not found") + else AC_MSG_RESULT($PACKAGEDIR) - fi], - PACKAGEDIR=) + fi + else + PACKAGEDIR= + fi AC_SUBST(PACKAGEDIR)]) AC_DEFUN(AC_ADD_LOAD_PATH, diff --git a/configure b/configure index ee8726d..ca89cb3 100755 --- a/configure +++ b/configure @@ -536,8 +536,9 @@ fi GNUS_PRODUCT_NAME=t-gnus + echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:541: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:542: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -594,7 +595,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:598: checking for a BSD compatible install" >&5 +echo "configure:599: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -653,7 +654,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "makeinfo", so it can be a program name with args. set dummy makeinfo; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:657: checking for $ac_word" >&5 +echo "configure:658: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_MAKEINFO+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -692,7 +693,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:696: checking for $ac_word" >&5 +echo "configure:697: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -726,7 +727,7 @@ test -n "$EMACS" || EMACS="emacs" # Extract the first word of "$withval", so it can be a program name with args. set dummy $withval; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:730: checking for $ac_word" >&5 +echo "configure:731: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -763,7 +764,7 @@ if test "${with_xemacs+set}" = set; then # Extract the first word of "xemacs", so it can be a program name with args. set dummy xemacs; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:767: checking for $ac_word" >&5 +echo "configure:768: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_XEMACS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -794,7 +795,7 @@ fi # Extract the first word of "$withval", so it can be a program name with args. set dummy $withval; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:798: checking for $ac_word" >&5 +echo "configure:799: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_XEMACS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -831,7 +832,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:835: checking for $ac_word" >&5 +echo "configure:836: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -867,14 +868,14 @@ fi echo $ac_n "checking what a flavor does $EMACS have""... $ac_c" 1>&6 -echo "configure:871: checking what a flavor does $EMACS have" >&5 +echo "configure:872: checking what a flavor does $EMACS have" >&5 elisp="(cond ((featurep (quote xemacs)) \"XEmacs\")\ ((boundp (quote MULE)) \"MULE\")\ (t \"FSF Emacs\"))" if test -z ""noecho""; then echo $ac_n "checking for flavor""... $ac_c" 1>&6 -echo "configure:878: checking for flavor" >&5 +echo "configure:879: checking for flavor" >&5 fi if eval "test \"\${EMACS_cv_SYS_flavor+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -906,12 +907,12 @@ fi echo "$ac_t""$EMACS_cv_SYS_flavor" 1>&6 if test "$prefix" = "NONE"; then echo $ac_n "checking prefix for your Emacs""... $ac_c" 1>&6 -echo "configure:910: checking prefix for your Emacs" >&5 +echo "configure:911: checking prefix for your Emacs" >&5 elisp="(expand-file-name \"..\" invocation-directory)" if test -z ""noecho""; then echo $ac_n "checking for prefix""... $ac_c" 1>&6 -echo "configure:915: checking for prefix" >&5 +echo "configure:916: checking for prefix" >&5 fi if eval "test \"\${EMACS_cv_SYS_prefix+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -942,7 +943,7 @@ if test "${with_lispdir+set}" = set; then fi echo $ac_n "checking where lisp files should go""... $ac_c" 1>&6 -echo "configure:946: checking where lisp files should go" >&5 +echo "configure:947: checking where lisp files should go" >&5 if test -z "$lispdir"; then theprefix=$prefix if test "x$theprefix" = "xNONE"; then @@ -957,13 +958,17 @@ echo "configure:946: checking where lisp files should go" >&5 fi done fi - echo "$ac_t""$lispdir + if test ${EMACS_FLAVOR} = xemacs; then + echo "$ac_t""$lispdir (it will be ignored when \"make install-package[-ja]\" is done)" 1>&6 + else + echo "$ac_t""$lispdir" 1>&6 + fi echo $ac_n "checking for acceptable W3 version""... $ac_c" 1>&6 -echo "configure:967: checking for acceptable W3 version" >&5 +echo "configure:972: checking for acceptable W3 version" >&5 if eval "test \"\${EMACS_cv_ACCEPTABLE_W3+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -971,14 +976,14 @@ else if test -z ""noecho""; then echo $ac_n "checking for w3-form-encode-xwfu in w3_forms""... $ac_c" 1>&6 -echo "configure:975: checking for w3-form-encode-xwfu in w3_forms" >&5 +echo "configure:980: checking for w3-form-encode-xwfu in w3_forms" >&5 fi library=`echo w3_forms | tr _ -` elisp="(progn (fmakunbound (quote w3-form-encode-xwfu)) (condition-case nil (progn (require (quote $library)) (fboundp (quote w3-form-encode-xwfu))) (error (prog1 nil (message \"$library not found\")))))" if test -z ""noecho""; then echo $ac_n "checking for w3_forms""... $ac_c" 1>&6 -echo "configure:982: checking for w3_forms" >&5 +echo "configure:987: checking for w3_forms" >&5 fi if eval "test \"\${EMACS_cv_SYS_w3_forms+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1022,7 +1027,7 @@ if test "${EMACS_cv_ACCEPTABLE_W3}" = "yes"; then elisp="(file-name-directory (locate-library \"w3-forms\"))" if test -z ""noecho""; then echo $ac_n "checking for w3_dir""... $ac_c" 1>&6 -echo "configure:1026: checking for w3_dir" >&5 +echo "configure:1031: checking for w3_dir" >&5 fi if eval "test \"\${EMACS_cv_SYS_w3_dir+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1058,26 +1063,108 @@ fi echo "$ac_t"""${W3}"" 1>&6 - # Check whether --with-packagedir or --without-packagedir was given. + if test ${EMACS_FLAVOR} = xemacs; then + echo $ac_n "checking where the XEmacs package is""... $ac_c" 1>&6 +echo "configure:1069: checking where the XEmacs package is" >&5 + # Check whether --with-packagedir or --without-packagedir was given. if test "${with_packagedir+set}" = set; then withval="$with_packagedir" if test x$withval != xyes -a x$withval != x; then - echo $ac_n "checking where the package should go""... $ac_c" 1>&6 -echo "configure:1067: checking where the package should go" >&5 - PACKAGEDIR=$withval - echo "$ac_t""$PACKAGEDIR" 1>&6 - fi + PACKAGEDIR=$withval + else + +elisp="(let (package-dir)\ + (if (boundp (quote early-packages))\ + (let ((dirs (delq nil (append (if early-package-load-path\ + early-packages)\ + (if late-package-load-path\ + late-packages)\ + (if last-package-load-path\ + last-packages)))))\ + (while (and dirs (not package-dir))\ + (if (file-directory-p (car dirs))\ + (setq package-dir (car dirs)\ + dirs (cdr dirs))))))\ + (or package-dir \"\"))" +if test -z ""noecho""; then + echo $ac_n "checking for PACKAGEDIR""... $ac_c" 1>&6 +echo "configure:1092: checking for PACKAGEDIR" >&5 +fi +if eval "test \"\${EMACS_cv_SYS_PACKAGEDIR+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + OUTPUT=./conftest-$$ + echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 + eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 + retval=`cat ${OUTPUT}` + echo "=> ${retval}" >& 5 2>&1 + rm -f ${OUTPUT} + EMACS_cv_SYS_PACKAGEDIR=$retval + +fi + +PACKAGEDIR=${EMACS_cv_SYS_PACKAGEDIR} +if test -z ""noecho""; then + echo "$ac_t""$PACKAGEDIR" 1>&6 +fi + + fi else - PACKAGEDIR= + +elisp="(let (package-dir)\ + (if (boundp (quote early-packages))\ + (let ((dirs (delq nil (append (if early-package-load-path\ + early-packages)\ + (if late-package-load-path\ + late-packages)\ + (if last-package-load-path\ + last-packages)))))\ + (while (and dirs (not package-dir))\ + (if (file-directory-p (car dirs))\ + (setq package-dir (car dirs)\ + dirs (cdr dirs))))))\ + (or package-dir \"\"))" +if test -z ""noecho""; then + echo $ac_n "checking for PACKAGEDIR""... $ac_c" 1>&6 +echo "configure:1131: checking for PACKAGEDIR" >&5 +fi +if eval "test \"\${EMACS_cv_SYS_PACKAGEDIR+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + OUTPUT=./conftest-$$ + echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 + eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& 5 2>&1 + retval=`cat ${OUTPUT}` + echo "=> ${retval}" >& 5 2>&1 + rm -f ${OUTPUT} + EMACS_cv_SYS_PACKAGEDIR=$retval + +fi + +PACKAGEDIR=${EMACS_cv_SYS_PACKAGEDIR} +if test -z ""noecho""; then + echo "$ac_t""$PACKAGEDIR" 1>&6 +fi + fi + if test x$PACKAGEDIR = x; then + echo "$ac_t"""not found"" 1>&6 + else + echo "$ac_t""$PACKAGEDIR" 1>&6 + fi + else + PACKAGEDIR= + fi # Check whether --with-addpath or --without-addpath was given. if test "${with_addpath+set}" = set; then withval="$with_addpath" if test x$withval != xyes -a x$withval != x; then echo $ac_n "checking where to find the additional elisp libraries""... $ac_c" 1>&6 -echo "configure:1081: checking where to find the additional elisp libraries" >&5 +echo "configure:1168: checking where to find the additional elisp libraries" >&5 ADDITIONAL_LOAD_PATH=$withval echo "$ac_t""$ADDITIONAL_LOAD_PATH" 1>&6 fi @@ -1231,6 +1318,7 @@ s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g +s%@GNUS_PRODUCT_NAME@%$GNUS_PRODUCT_NAME%g s%@SET_MAKE@%$SET_MAKE%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 29bc438..fa8df3b 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -13,6 +13,8 @@ SHELL = /bin/sh VPATH = @srcdir@ PACKAGEDIR = @PACKAGEDIR@ W3DIR = @W3@ +GNUS_PRODUCT_NAME = @GNUS_PRODUCT_NAME@ +EXPORTING_FILES = $(EMACS) $(FLAGS) -f dgnushack-exporting-files 2>/dev/null all total: rm -f *.elc auto-autoloads.el custom-load.el @@ -29,10 +31,11 @@ clever some: W3DIR=$(W3DIR) lispdir=$(lispdir) \ srcdir=$(srcdir) $(EMACS) $(FLAGS) -f dgnushack-compile -install: clever +install: clever install-lisp + +install-lisp: $(SHELL) $(top_srcdir)/mkinstalldirs $(lispdir) - @for p in \ - `$(EMACS) $(FLAGS) -f dgnushack-exported-files 2>/dev/null`; do \ + @for p in `$(EXPORTING_FILES)`; do \ echo " $(INSTALL_DATA) $$p $(lispdir)/$$p"; \ $(INSTALL_DATA) $$p $(lispdir)/$$p; \ if test -f $$p"c"; then \ @@ -42,20 +45,18 @@ install: clever done # Rule for XEmacs package. -install-package-lick: +install-package-manifest: srcdir=$(srcdir) $(EMACS) $(FLAGS) \ - -f dgnushack-install-package-lick $(PACKAGEDIR) + -f dgnushack-install-package-manifest \ + $(PACKAGEDIR) $(GNUS_PRODUCT_NAME) -install-package-info: - srcdir=$(srcdir) $(EMACS) $(FLAGS) \ - -f dgnushack-install-package-info $(PACKAGEDIR) +compose-package: + srcdir=$(srcdir) $(EMACS) $(FLAGS) -f dgnushack-make-autoloads -install-package-info-ja: +remove-extra-files-in-package: srcdir=$(srcdir) $(EMACS) $(FLAGS) \ - -f dgnushack-install-package-info-ja $(PACKAGEDIR) - -compose-package: - srcdir=$(srcdir) $(EMACS) $(FLAGS) -f dgnushack-compose-package + -f dgnushack-remove-extra-files-in-package \ + $(PACKAGEDIR) $(GNUS_PRODUCT_NAME) # tags: diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el index 224fb93..9111cf6 100644 --- a/lisp/dgnushack.el +++ b/lisp/dgnushack.el @@ -52,8 +52,11 @@ (defvar srcdir (or (getenv "srcdir") ".")) -(push (or (getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir)) - load-path) +(defvar dgnushack-w3-dir + (file-name-as-directory + (or (getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir)))) +(push dgnushack-w3-dir load-path) + (load (expand-file-name "dgnuspath.el" srcdir) nil nil t) ;; If we are building w3 in a different directory than the source @@ -182,13 +185,24 @@ (defalias 'ange-ftp-re-read-dir 'ignore) (defalias 'define-mail-user-agent 'ignore) -(defconst dgnushack-unexported-files +(defconst dgnushack-unexporting-files (append '("dgnushack.el" "dgnuspath.el" "lpath.el" "ptexinfmt.el") - (condition-case nil - (progn (require 'w3-forms) nil) - (error '("nnweb.el" "nnlistserv.el" "nnultimate.el" - "nnslashdot.el" "nnwarchive.el" "webmail.el" - "nnwfm.el"))) + (unless (or (condition-case nil + (require 'w3-forms) + (error nil)) + ;; Maybe mis-configured Makefile is used (e.g. + ;; configured for FSFmacs but XEmacs is running). + (let ((lp (delete dgnushack-w3-dir + (copy-sequence load-path)))) + (when (condition-case nil + (let ((load-path lp)) + (require 'w3-forms)) + (error nil)) + ;; If success, fix `load-path' for compiling. + (setq load-path lp)))) + '("nnweb.el" "nnlistserv.el" "nnultimate.el" + "nnslashdot.el" "nnwarchive.el" "webmail.el" + "nnwfm.el")) (condition-case nil (progn (require 'bbdb) nil) (error '("gnus-bbdb.el"))) @@ -202,18 +216,18 @@ '("base64.el")) (when (and (fboundp 'md5) (subrp (symbol-function 'md5))) '("md5.el"))) - "Files not to be installed.") + "Files which will not be installed.") -(defconst dgnushack-exported-files - (let ((files (directory-files srcdir nil "^[^=].*\\.el$"))) - (dolist (file dgnushack-unexported-files) +(defconst dgnushack-exporting-files + (let ((files (directory-files srcdir nil "^[^=].*\\.el$" t))) + (dolist (file dgnushack-unexporting-files) (setq files (delete file files))) (sort files 'string-lessp)) - "Files to be installed.") + "Files which will be compiled and installed.") -(defun dgnushack-exported-files () - "Print files to be installed." - (princ (mapconcat 'identity dgnushack-exported-files " "))) +(defun dgnushack-exporting-files () + "Print name of files which will be installed." + (princ (mapconcat 'identity dgnushack-exporting-files " "))) (defun dgnushack-compile (&optional warn) ;;(setq byte-compile-dynamic t) @@ -228,14 +242,14 @@ You also then need to add the following to the lisp/dgnushack.el file: (push \"~/lisp/custom\" load-path) Modify to suit your needs.")) - (dolist (file dgnushack-exported-files) + (dolist (file dgnushack-exporting-files) (setq file (expand-file-name file srcdir)) (when (and (file-exists-p (setq elc (concat file "c"))) (file-newer-than-file-p file elc)) (delete-file elc))) (let (;;(byte-compile-generate-call-tree t) - (files dgnushack-exported-files) + (files dgnushack-exporting-files) file elc) (while (setq file (pop files)) (setq file (expand-file-name file srcdir)) @@ -271,7 +285,7 @@ Modify to suit your needs.")) command-line-args-left (cdr command-line-args-left))) ((file-directory-p file) (setq command-line-args-left - (nconc (directory-files file) + (nconc (directory-files file nil nil t) (cdr command-line-args-left)))) (t (setq files (cons file files) @@ -402,126 +416,50 @@ Modify to suit your needs.")) (require 'cus-load) (byte-compile-file "custom-load.el"))) -(defun dgnushack-examine-package-dir () - "Examine PACKAGEDIR." - (let ((package-dir (car command-line-args-left))) - (unless package-dir - (let (dirs) - (when (boundp 'early-packages) - (setq dirs (delq nil (append (when early-package-load-path - early-packages) - (when late-package-load-path - late-packages) - (when last-package-load-path - last-packages)))) - (while (and dirs (not package-dir)) - (when (file-directory-p (car dirs)) - (setq package-dir (car dirs) - dirs (cdr dirs))))))) - (or package-dir - (error "%s" " -You must specify the name of the package path as follows: - -% make install-package PACKAGEDIR=/usr/local/lib/xemacs/xemacs-packages/")))) - -(defun dgnushack-gnus-product-name () - "Return a product name of this gnus." - (require 'gnus) - (downcase gnus-product-name)) - -(defun dgnushack-make-manifest (product-name) - "Make MANIFEST file for XEmacs package." - (let (make-backup-files) - (message "Generating MANIFEST.%s for the package..." product-name) - (with-temp-file (concat "../MANIFEST." product-name) +(defun dgnushack-remove-extra-files-in-package () + "Remove extra files in the lisp directory of the XEmacs package." + (let ((lisp-dir (expand-file-name (concat "lisp/" + ;; GNUS_PRODUCT_NAME + (cadr command-line-args-left) + "/") + ;; PACKAGEDIR + (car command-line-args-left)))) + (when (file-directory-p lisp-dir) + (let (files) + (dolist (file dgnushack-exporting-files) + (setq files (nconc files (list file (concat file "c"))))) + (dolist (file (directory-files lisp-dir nil nil t t)) + (unless (member file files) + (setq file (expand-file-name file lisp-dir)) + (message "Removing %s..." file) + (condition-case nil + (delete-file file) + (error nil)))))))) + +(defun dgnushack-install-package-manifest () + "Install MANIFEST file as an XEmacs package." + (let* ((package-dir (car command-line-args-left)) + (product-name (cadr command-line-args-left)) + (name (expand-file-name (concat "pkginfo/MANIFEST." product-name) + package-dir)) + make-backup-files) + (message "Generating %s..." name) + (with-temp-file name (insert "pkginfo/MANIFEST." product-name "\n") (let ((lisp-dir (concat "lisp/" product-name "/")) - (files (sort (directory-files "." nil "\\.elc?$") 'string-lessp)) + (files (sort (directory-files "." nil "\\.elc?$" t) 'string-lessp)) file) (while (setq file (pop files)) - (unless (member file dgnushack-unexported-files) + (unless (member file dgnushack-unexporting-files) (insert lisp-dir file "\n"))) (setq files (sort (directory-files "../texi/" nil (concat dgnushack-info-file-regexp-en "\\|" - dgnushack-info-file-regexp-ja)) + dgnushack-info-file-regexp-ja) + t) 'string-lessp)) (while (setq file (pop files)) (insert "info/" file "\n")))))) -(defun dgnushack-install-package-info-files (package-dir regexp) - "Install info files as an XEmacs package." - (let ((files (sort (directory-files "../texi/" nil regexp) 'string-lessp)) - (info-dir (expand-file-name "info/" package-dir)) - file) - (unless (file-directory-p info-dir) - (make-directory info-dir)) - (while (setq file (pop files)) - (message "Copying ../texi/%s to %s..." file info-dir) - (copy-file (expand-file-name file "../texi/") - (expand-file-name file info-dir) - t t)))) - -(defun dgnushack-install-package-pkginfo (package-dir product-name) - "Install MANIFEST file." - (let ((manifest (concat "MANIFEST." product-name)) - (pkginfo-dir (expand-file-name "pkginfo/" package-dir))) - (unless (file-directory-p pkginfo-dir) - (make-directory pkginfo-dir)) - (message "Copying ../%s to %s..." manifest pkginfo-dir) - (copy-file (expand-file-name manifest "../") - (expand-file-name manifest pkginfo-dir) t t))) - -(defun dgnushack-install-package-lick () - "Install lisp files and MANIFEST file as an XEmacs package." - (dgnushack-make-autoloads) - (let ((package-dir (dgnushack-examine-package-dir)) - (product-name (dgnushack-gnus-product-name))) - (dgnushack-make-manifest product-name) - ;; Install lisp files. - (let ((lisp-dir (expand-file-name (concat "lisp/" product-name "/") - package-dir)) - (files (sort (directory-files "." nil "\\.elc?$") 'string-lessp))) - (unless (file-directory-p lisp-dir) - (make-directory lisp-dir t)) - (dolist (file dgnushack-unexported-files) - (setq files (delete file files))) - ;; Remove extra files. - (dolist (file (directory-files lisp-dir nil nil nil t)) - (unless (or (member file files) - (not (string-match "\\.elc?$" file))) - (setq file (expand-file-name file lisp-dir)) - (message "Removing %s..." file) - (condition-case nil - (delete-file file) - (error nil)))) - (while (setq file (pop files)) - (message "Copying %s to %s..." file lisp-dir) - (copy-file file (expand-file-name file lisp-dir) t t))) - (dgnushack-install-package-pkginfo package-dir product-name))) - -(defun dgnushack-install-package-info () - "Install English info files and MANIFEST file as an XEmacs package." - (let ((package-dir (dgnushack-examine-package-dir)) - (product-name (dgnushack-gnus-product-name))) - (dgnushack-make-manifest product-name) - (dgnushack-install-package-info-files package-dir - dgnushack-info-file-regexp-en) - (dgnushack-install-package-pkginfo package-dir product-name))) - -(defun dgnushack-install-package-info-ja () - "Install Japanese info files and MANIFEST file as an XEmacs package." - (let ((package-dir (dgnushack-examine-package-dir)) - (product-name (dgnushack-gnus-product-name))) - (dgnushack-make-manifest product-name) - (dgnushack-install-package-info-files package-dir - dgnushack-info-file-regexp-ja) - (dgnushack-install-package-pkginfo package-dir product-name))) - -(defun dgnushack-compose-package () - "Make auto-autoloads.el(c), custom-load.el(c) and MANIFEST file." - (dgnushack-make-autoloads) - (dgnushack-make-manifest (dgnushack-gnus-product-name))) - ;;; dgnushack.el ends here diff --git a/lisp/lpath.el b/lisp/lpath.el index 7fb7c1c..7b7de93 100644 --- a/lisp/lpath.el +++ b/lisp/lpath.el @@ -93,6 +93,7 @@ window-pixel-height window-pixel-width))) ;; T-gnus. +(maybe-fbind '(md5)) (if (featurep 'xemacs) (progn (maybe-fbind '(propertize)) @@ -109,9 +110,6 @@ (require 'custom) -(defun md5 (object &optional start end coding noerror) - ) - (defun nnkiboze-score-file (a) ) diff --git a/texi/Makefile.in b/texi/Makefile.in index d7995e8..a44c58c 100644 --- a/texi/Makefile.in +++ b/texi/Makefile.in @@ -187,13 +187,16 @@ install: $(INFO_DEPS) else : ; fi install-ja: $(INFO_DEPS_JA) - $(MAKE) INFO_DEPS='$(INFO_DEPS_JA)' install + $(MAKE) INFO_DEPS='$(INFO_DEPS_JA)' EMACS="$(EMACS)" \ + infodir="$(infodir)" install install-info: $(INFO_DEPS_INFO) - $(MAKE) INFO_DEPS='$(INFO_DEPS_INFO)' install + $(MAKE) INFO_DEPS='$(INFO_DEPS_INFO)' EMACS="$(EMACS)" \ + infodir="$(infodir)" install install-ja-info: $(INFO_DEPS_JA_INFO) - $(MAKE) INFO_DEPS='$(INFO_DEPS_JA_INFO)' install + $(MAKE) INFO_DEPS='$(INFO_DEPS_JA_INFO)' EMACS="$(EMACS)" \ + infodir="$(infodir)" install tmps: if [ ! -e tmp ]; then mkdir tmp; fi -- 1.7.10.4