* [PATCH] Non-standard lispdir
@ 1998-12-05 12:45 Lloyd Zusman
1998-12-05 13:42 ` Karl Eichwalder
0 siblings, 1 reply; 5+ messages in thread
From: Lloyd Zusman @ 1998-12-05 12:45 UTC (permalink / raw)
I'm using pgnus-0.63.
I like to store the Gnus *.elc files in a non-standard area, and so
I have patched the `configure' script to allow a `--lispdir' parameter.
This lets us explicitly set the `lispdir' variable in the Makefiles
to a value of our choice.
Would it be possible to make this part of the offical Gnus `configure'
script?
Lloyd Zusman
ljz@asfast.com
---------------------------------- cut here ----------------------------------
*** configure.orig Sat Dec 5 07:20:48 1998
--- configure Sat Dec 5 07:37:31 1998
***************
*** 45,50 ****
--- 45,51 ----
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
+ lispdir=NONE
# Initialize some other variables.
subdirs=
***************
*** 157,162 ****
--- 158,164 ----
[PREFIX/com]
--localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
--libdir=DIR object code libraries in DIR [EPREFIX/lib]
+ --lispdir=DIR lisp code in DIR [PREFIX/lisp]
--includedir=DIR C header files in DIR [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
--infodir=DIR info documentation in DIR [PREFIX/info]
***************
*** 214,219 ****
--- 216,226 ----
| --libexe=* | --libex=* | --libe=*)
libexecdir="$ac_optarg" ;;
+ -lispdir | --lispdir | --lispdi | --lispd | --lisp)
+ ac_prev=lispdir ;;
+ -lispdir=* | --lispdir=* | --lispdi=* | --lispd=* | --lisp=*)
+ lispdir="$ac_optarg" ;;
+
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
***************
*** 659,667 ****
echo "$ac_t""no" 1>&6
fi
if test $EMACS != "no"; then
echo $ac_n "checking where .elc files should go""... $ac_c" 1>&6
! echo "configure:665: checking where .elc files should go" >&5
lispdir="\$(datadir)/emacs/site-lisp"
if test "x$prefix" = "xNONE"; then
if test -d $ac_default_prefix/share/emacs/site-lisp; then
--- 666,675 ----
echo "$ac_t""no" 1>&6
fi
+ if test "x$lispdir" = "xNONE"; then
if test $EMACS != "no"; then
echo $ac_n "checking where .elc files should go""... $ac_c" 1>&6
! echo "configure:672: checking where .elc files should go" >&5
lispdir="\$(datadir)/emacs/site-lisp"
if test "x$prefix" = "xNONE"; then
if test -d $ac_default_prefix/share/emacs/site-lisp; then
***************
*** 677,692 ****
else
if test -d $prefix/lib/emacs/site-lisp; then
lispdir="\$(prefix)/lib/emacs/site-lisp"
! fi
fi
fi
- echo "$ac_t""$lispdir" 1>&6
fi
# 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:690: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- 685,701 ----
else
if test -d $prefix/lib/emacs/site-lisp; then
lispdir="\$(prefix)/lib/emacs/site-lisp"
! fi
fi
fi
fi
+ echo "$ac_t""$lispdir" 1>&6
+ fi
# 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:697: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Non-standard lispdir
1998-12-05 12:45 [PATCH] Non-standard lispdir Lloyd Zusman
@ 1998-12-05 13:42 ` Karl Eichwalder
1998-12-10 4:20 ` Lloyd Zusman
0 siblings, 1 reply; 5+ messages in thread
From: Karl Eichwalder @ 1998-12-05 13:42 UTC (permalink / raw)
Cc: ding
Lloyd Zusman <ljz@asfast.com> writes:
| I like to store the Gnus *.elc files in a non-standard area, and so
| I have patched the `configure' script to allow a `--lispdir'
| parameter.
It's a good idea to make `lispdir' available to the `configure' script;
but the right approach would be to patch `configure.in' to let
`autoconf' do the dirty work. Have a look how the `w3' package tries to
solve the problem
(ftp://ftp.cs.indiana.edu/pub/elisp/w3/.betas/w3-4.0pre.31.tar.gz).
`w3' uses these AC macros:
AC_EMACS_PACKAGES
AC_PATH_LISPDIR
AC_EMACS_VERSION
I'm not sure whether these are the "official" ones -- they are working
pretty well. I'll check it the next week.
| This lets us explicitly set the `lispdir' variable in the Makefiles
| to a value of our choice.
That's already working; simply call `make' this way:
make lispdir=/usr/share/emacs/site-lisp/gnus
make lispdir=/usr/share/emacs/site-lisp/gnus install
--
Karl Eichwalder
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Non-standard lispdir
1998-12-05 13:42 ` Karl Eichwalder
@ 1998-12-10 4:20 ` Lloyd Zusman
1998-12-10 21:09 ` Karl Eichwalder
1998-12-11 8:47 ` Stephen Zander
0 siblings, 2 replies; 5+ messages in thread
From: Lloyd Zusman @ 1998-12-10 4:20 UTC (permalink / raw)
Karl Eichwalder <ke@gnu.franken.de> writes:
> Lloyd Zusman <ljz@asfast.com> writes:
>
> | I like to store the Gnus *.elc files in a non-standard area, and so
> | I have patched the `configure' script to allow a `--lispdir'
> | parameter.
>
> It's a good idea to make `lispdir' available to the `configure' script;
> but the right approach would be to patch `configure.in' to let
> `autoconf' do the dirty work. Have a look how the `w3' package tries to
> solve the problem
> [ ... ]
Thanks ... I very much appreciate this information. :)
> AC_EMACS_PACKAGES
> AC_PATH_LISPDIR
> AC_EMACS_VERSION
>
> I'm not sure whether these are the "official" ones -- they are working
> pretty well. I'll check it the next week.
Well, it looks like I'd have make use of a customized AC_INIT macro in order
to add a --lispdir argument to the Gnus `configure.in' script ... or am
I missing something? Any ideas?
> | This lets us explicitly set the `lispdir' variable in the Makefiles
> | to a value of our choice.
>
> That's already working; simply call `make' this way:
>
> make lispdir=/usr/share/emacs/site-lisp/gnus
> make lispdir=/usr/share/emacs/site-lisp/gnus install
Yes ... I know I can do this, but I was hoping to make this part of
`configure' so I only have to type the lisp directory once (during
initial configuration), and then call `make' as follows:
make
make install
--
Lloyd Zusman
ljz@asfast.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Non-standard lispdir
1998-12-10 4:20 ` Lloyd Zusman
@ 1998-12-10 21:09 ` Karl Eichwalder
1998-12-11 8:47 ` Stephen Zander
1 sibling, 0 replies; 5+ messages in thread
From: Karl Eichwalder @ 1998-12-10 21:09 UTC (permalink / raw)
Cc: ding
Lloyd Zusman <ljz@asfast.com> writes:
| Thanks ... I very much appreciate this information. :)
Okay, but I've to admit that I forgot to check the m4 marcos for
detection (X)Emacs...
| Well, it looks like I'd have make use of a customized AC_INIT macro in order
| to add a --lispdir argument to the Gnus `configure.in' script
Yes, kind of, at least.
| > make lispdir=/usr/share/emacs/site-lisp/gnus
| > make lispdir=/usr/share/emacs/site-lisp/gnus install
| Yes ... I know I can do this, but I was hoping to make this part of
| `configure' so I only have to type the lisp directory once (during
| initial configuration), and then call `make' as follows:
As you know, the simpliest ad hoc solution would be to write a small
shell script.
As an RPM package maker I can tell you that it's important to have both
place to specify the directories, since RPM has the nice feature to
install the compiled files under a different directory (RPM_BUILD_ROOT);
using RPM_BUILD_ROOT e.g., it's easy to write a file list (%files). For
interested parties, here's my spec file:
Summary: Pterodactyl Gnus (development version)
Name: pgnus
%define version 0.65
Version: %{version}
Release: 1
Copyright: GNU General Public License
Group: Emacs
Source: pgnus-%{version}.tar.gz
Patch: pgnus.dif
BuildRoot: /var/tmp/gnus-root
%description
Pterodactyl Gnus
%define INSTALL install -m755 -s
%define INSTALL_DIR install -d -m755
%define INSTALL_DATA install -m644
%prep
%setup -n $RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
# %patch -p1
./configure --prefix=/usr
%build
make lispdir="/usr/share/emacs/site-lisp/gnus"
%install
if [ ! "x" = "x$RPM_BUILD_ROOT" ] ; then
rm -fr $RPM_BUILD_ROOT
%{INSTALL_DIR} $RPM_BUILD_ROOT
fi
# install .el files first
%{INSTALL_DIR} $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/gnus
%{INSTALL_DATA} lisp/*.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/gnus
make prefix="$RPM_BUILD_ROOT/usr" \
lispdir="$RPM_BUILD_ROOT/usr/share/emacs/site-lisp/gnus" install
gzip -f $RPM_BUILD_ROOT/usr/info/*
rm -f $RPM_BUILD_ROOT/usr/info/dir.gz
if [ -x /usr/sbin/Check ] ; then
/usr/sbin/Check
fi
%clean
# rm -fr $RPM_BUILD_ROOT
%files
%attr(-,root,root) %doc GNUS-NEWS README
%attr(-,root,root) /usr/share/emacs/site-lisp/gnus
%attr(-,root,root) /usr/info/*
--
Karl Eichwalder
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Non-standard lispdir
1998-12-10 4:20 ` Lloyd Zusman
1998-12-10 21:09 ` Karl Eichwalder
@ 1998-12-11 8:47 ` Stephen Zander
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Zander @ 1998-12-11 8:47 UTC (permalink / raw)
Cc: ding
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
>>>>> "Lloyd" == Lloyd Zusman <ljz@asfast.com> writes:
Lloyd> Yes ... I know I can do this, but I was hoping to make this
Lloyd> part of `configure' so I only have to type the lisp
Lloyd> directory once (during initial configuration), and then
Lloyd> call `make' as follows:
Like the attached patch does, perhaps? :)
Note that it's actually --with-lispdir, rather than --lispdir but five
extra characters won't kill you.
This patch also fixes configure's long-standing inability to correctly
detect xemacs.
BTW, I love the MIME stuff, Lars :)
[-- Attachment #2: Patch to configure.in --]
[-- Type: text/plain, Size: 353 bytes --]
--- configure.in Sat Aug 29 10:55:03 1998
+++ configure.in.new Fri Dec 11 00:33:33 1998
@@ -1,6 +1,7 @@
AC_INIT(lisp/gnus.el)
AC_SET_MAKE
AC_PROG_INSTALL
+AC_ARG_WITH(lispdir, [ --with-lispdir=DIR put .el & .elc files in DIR [DATA/emacs]])
AM_PATH_LISPDIR
AC_PATH_PROG(MAKEINFO, makeinfo, no)
AC_OUTPUT(Makefile lisp/Makefile texi/Makefile)
[-- Attachment #3: Patch to aclocal.m4 --]
[-- Type: text/plain, Size: 1806 bytes --]
--- aclocal.m4 Sat Aug 29 10:55:03 1998
+++ aclocal.m4.new Fri Dec 11 00:41:45 1998
@@ -4,27 +4,31 @@
[# If set to t, that means we are running in a shell under Emacs.
# If you have an Emacs named "t", then use the full path.
test "$EMACS" = t && EMACS=
- AC_PATH_PROG(EMACS, emacs xemacs, no)
+ AC_PATH_PROGS(EMACS, emacs xemacs, no)
if test $EMACS != "no"; then
AC_MSG_CHECKING([where .elc files should go])
dnl Set default value
- lispdir="\$(datadir)/emacs/site-lisp"
- if test "x$prefix" = "xNONE"; then
- if test -d $ac_default_prefix/share/emacs/site-lisp; then
- lispdir="\$(prefix)/share/emacs/site-lisp"
+ if test "x$with_lispdir" = "x"; then
+ lispdir="\$(datadir)/emacs/site-lisp"
+ if test "x$prefix" = "xNONE"; then
+ if test -d $ac_default_prefix/share/emacs/site-lisp; then
+ lispdir="\$(prefix)/share/emacs/site-lisp"
+ else
+ if test -d $ac_default_prefix/lib/emacs/site-lisp; then
+ lispdir="\$(prefix)/lib/emacs/site-lisp"
+ fi
+ fi
else
- if test -d $ac_default_prefix/lib/emacs/site-lisp; then
- lispdir="\$(prefix)/lib/emacs/site-lisp"
- fi
+ if test -d $prefix/share/emacs/site-lisp; then
+ lispdir="\$(prefix)/share/emacs/site-lisp"
+ else
+ if test -d $prefix/lib/emacs/site-lisp; then
+ lispdir="\$(prefix)/lib/emacs/site-lisp"
+ fi
+ fi
fi
else
- if test -d $prefix/share/emacs/site-lisp; then
- lispdir="\$(prefix)/share/emacs/site-lisp"
- else
- if test -d $prefix/lib/emacs/site-lisp; then
- lispdir="\$(prefix)/lib/emacs/site-lisp"
- fi
- fi
+ lispdir="$with_lispdir"
fi
AC_MSG_RESULT($lispdir)
fi
[-- Attachment #4: Type: text/plain, Size: 93 bytes --]
--
Stephen
---
It should be illegal to yell "Y2K" in a crowded economy. :-) -- Larry Wall
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1998-12-11 8:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-05 12:45 [PATCH] Non-standard lispdir Lloyd Zusman
1998-12-05 13:42 ` Karl Eichwalder
1998-12-10 4:20 ` Lloyd Zusman
1998-12-10 21:09 ` Karl Eichwalder
1998-12-11 8:47 ` Stephen Zander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).