* Making a script to update and compile from CVS
@ 2005-01-13 21:36 Lennart Borgman
2005-01-13 23:34 ` Miles Bader
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Lennart Borgman @ 2005-01-13 21:36 UTC (permalink / raw)
I saw someone made a try on EmacsWiki to automate the process of copying and
building Emacs from CVS. So I started to wonder how to do the building
process after a checkout update from CVS. There is no definitive answer in
INSTALL.CVS (unless you want to do "make bootstrap"). Doing "make autoloads
..." and "make recompile" are rather fast so there is no need to hesitate to
always do them (not even on an old pc like mine). Sometimes I have seen that
doing multiple "make recompile ..." are necessary.
Now I wonder in what order to do this. Should something like this be ok:
(in lisp)
make autoloads ...
make recompile ...
make recompile ...
make recompile ...
(in main)
make
make info
make install
(This is of course not failproof, but maybe useful.) Could please someone
who knows this better please comment on the order of things etc here?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
2005-01-13 21:36 Making a script to update and compile from CVS Lennart Borgman
@ 2005-01-13 23:34 ` Miles Bader
2005-01-15 0:12 ` Richard Stallman
2005-01-13 23:38 ` Stefan Monnier
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Miles Bader @ 2005-01-13 23:34 UTC (permalink / raw)
Cc: Emacs Devel
Hmmm, well I'm sure most developers have their own variation on this;
here's my works-most-of-the-time script (the "$E" parameter choose
which emacs tree to use, as I keep several different versions around):
#!/bin/sh
E="${1:-miles}"
BUILD="/usr/local/build/emacs/${E}"
SRC="/usr/local/src/emacs/${E}"
make -C$BUILD/lisp recompile \
&& make -C$BUILD \
&& make -C$BUILD/man \
&& make -C$BUILD/lispref \
&& make -C$BUILD/lispintro \
&& sudo $SRC/admin/quick-install-emacs -vp $BUILD
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
2005-01-13 21:36 Making a script to update and compile from CVS Lennart Borgman
2005-01-13 23:34 ` Miles Bader
@ 2005-01-13 23:38 ` Stefan Monnier
2005-01-14 10:26 ` Kai Großjohann
2005-01-14 19:39 ` Han Boetes
3 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2005-01-13 23:38 UTC (permalink / raw)
Cc: Emacs Devel
> Now I wonder in what order to do this. Should something like this be ok:
Here is what I do, typically:
% tla star-merge OR cvs update
% (cd lisp; make updates recompile)
% if some files failed to compile, (cd lisp; make recompile)
% make
I don't actually do `make install' because I always work directly "in situ",
which is important when I do C-h f so I can click to get to the source and
start editing directly in the Arch/CVS tree.
Sometimes the above fails because the changes require a more
complex bootstrap. In that case, I generally resort to my intuition and
knowledge to come up with an ad-hoc way to bootstrap, and if all else really
fails, I end up resorting to `make bootstrap' but since that takes a long
while I really make every effort to avoid it.
Sometimes the above succeeds but with incorrectly compiled .elc files
(typically because of macros which were not defined when the file was
compiled). I catch those problems "lazily" (i.e. only when and if
I actually use the code).
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
2005-01-13 21:36 Making a script to update and compile from CVS Lennart Borgman
2005-01-13 23:34 ` Miles Bader
2005-01-13 23:38 ` Stefan Monnier
@ 2005-01-14 10:26 ` Kai Großjohann
2005-01-14 19:39 ` Han Boetes
3 siblings, 0 replies; 9+ messages in thread
From: Kai Großjohann @ 2005-01-14 10:26 UTC (permalink / raw)
Perhaps just for completeness' sake: I always bootstrap:
make maintainer-clean
./configure ...
make bootstrap tags
make install
On Debian GNU/Linux, I use Jerome's wonderful package setup to
construct Debian packages. I wish there was something similar for
FreeBSD ports.
Kai
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
@ 2005-01-14 12:39 Robert J. Chassell
2005-01-14 18:58 ` Vinicius Jose Latorre
2005-01-14 21:40 ` Michael Albinus
0 siblings, 2 replies; 9+ messages in thread
From: Robert J. Chassell @ 2005-01-14 12:39 UTC (permalink / raw)
"Lennart Borgman" <lennart.borgman.073@student.lu.se> wrote
> I saw someone made a try on EmacsWiki to automate the process of
> copying and building Emacs from CVS.
Here is what I do:
;; Each day, as user `bob' in an instance of Emacs, I run this for CVS
;; updates:
(progn
(cd "/usr/local/src/emacs/")
(cvs-update "/usr/local/src/emacs/" t))
;; Next, I run the fast `make recompile' command.
;; The `make recompile' command recompiles all Lisp files which are
;; new; it does not create .elc files. It only recompiles a file if
;; an .elc is already present.
(progn
(cd "/usr/local/src/emacs/")
(compile
"time make -C lisp autoloads && cd lisp && \
time make recompile \
EMACS=/usr/local/src/emacs/src/emacs && \
cd /usr/local/src/emacs/ && \
time make info html"))
;; (Once in a while I rebuild the DVI documentation by running
;; `make info html dvi'.)
;; Occasionally, I run the `bootfast' command which recompiles all the
;; Emacs Lisp files. I have been warned that sometimes an old .elc
;; file will cause trouble, but that has not happened yet. Also, this
;; command deletes many other files. This command takes a long time.
(progn
(cd "/usr/local/src/emacs/")
(compile "date && time make bootfast"))
;; Finally, once in a great while, I configure and run `make bootstrap'
;; This takes a long time.
(progn
(cd "/usr/local/src/emacs/")
(compile
"./configure --with-type1 \
--with-x-toolkit=gtk --with-pop \
--prefix=/usr/local --with-sound=yes \
&& time make bootstrap"))
;; I have not had to update autoloads for months or maybe years, but
;; when I did, I used this command:
(progn
(cd "/usr/local/src/emacs/lisp/")
(compile "make autoloads EMACS=../src/emacs"))
;; For installation, I run the following in a root owned instance of Emacs:
(progn (cd "/usr/local/src/emacs/") (compile "time make install"))
;; To make tags, which I do occasionally:
(progn (cd "/usr/local/src/emacs/") (compile "time make TAGS"))
--
Robert J. Chassell
bob@rattlesnake.com GnuPG Key ID: 004B4AC8
http://www.rattlesnake.com http://www.teak.cc
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
2005-01-14 12:39 Robert J. Chassell
@ 2005-01-14 18:58 ` Vinicius Jose Latorre
2005-01-14 21:40 ` Michael Albinus
1 sibling, 0 replies; 9+ messages in thread
From: Vinicius Jose Latorre @ 2005-01-14 18:58 UTC (permalink / raw)
Here is what I do:
$
$ cd ~/work/emacs
$ cvs -z3 update -dPA
$ make maintainer-clean
$ ./configure --prefix=/home/download/emacs
$ make bootstrap &> .OUTPUT
$ tail .OUTPUT
$ pushd /home/download
$ rm -rf emacs-21.3.50-OLD
$ mv emacs-21.3.50 emacs-21.3.50-OLD
$ md emacs-21.3.50
$ popd
$ make install
$
Vinicius
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
2005-01-13 21:36 Making a script to update and compile from CVS Lennart Borgman
` (2 preceding siblings ...)
2005-01-14 10:26 ` Kai Großjohann
@ 2005-01-14 19:39 ` Han Boetes
3 siblings, 0 replies; 9+ messages in thread
From: Han Boetes @ 2005-01-14 19:39 UTC (permalink / raw)
Hi,
I checked out emacs in ~/nfs/Emacs/emacs--multi-tty And in
~/nfs/Emacs/openbsd and ~/nfs/Emacs/linux I run this ``script,''
which creates simple tarball packages, which you can install with:
tar xzf path/to/emacs\#21.3.50-$timestamp.pkg.tar.gz -C /
and uninstall with
cd /
tar tzf path/to/emacs\#21.3.50-$timestamp.pkg.tar.gz|xargs rm
Or get this simple package manager:
http://www.fukt.bth.se/~per/pkgutils/
Or change the ``install_target'' to whatever you like:
MAKE=gmake
SRCDIR=../emacs--multi-tty
opties='--without-sound'
CFLAGS='-Os -g -pipe' # -DGC_MCHECK=1
PKG=$PWD/../fake
beep()
{
echo -en '\a'
}
install_target()
{
if [ -e $PKG ]; then
echo sudo rm -rf $PKG
sudo rm -rf $PKG
fi
$MAKE install DESTDIR=$PKG #prefix=$PKG/usr/local
# find \
# $PKG/usr/local/share/emacs/21.3.50/{leim,lisp} \
# $PKG/usr/local/share/emacs/site-lisp \
# -name "*.el"|while read line; do
# if [ -r ${line}c ]; then
# rm $line
# fi
# done
find \
$PKG/usr/local -type d -name '.arch-ids'|xargs rm -rf
rm -rf $PKG/usr/local/var/ $PKG/usr/local/bin/emacs-*
beep
echo 'Are you there?'
read nop
echo sudo chown -R root:wheel $PKG
sudo chown -R root:wheel $PKG
cd $PKG
timestamp="$(date '+%Y%m%d')"
gtar czf "../emacs#21.3.50-$timestamp.pkg.tar.gz" usr
echo sudo rm -rf $PKG
sudo rm -rf $PKG
cd ~/nfs/Emacs
echo "sudo pkgadd -u emacs\#21.3.50-$timestamp.pkg.tar.gz"
}
con_figure()
{
CFLAGS=$CFLAGS CC=$CC $SRCDIR/configure $opties '--prefix=$(DESTDIR)/usr/local'
}
case $1 in
bootstrap)
[ -r Makefile ] && make maintainer-clean
con_figure
$MAKE bootstrap
install_target
;;
uninstall)
[ -r Makefile ] || con_figure
beep
sudo $MAKE uninstall
sudo rm -rf /usr/local/libexec/emacs
# sudo rm -rf /usr/local/share/emacs # niet doen!
sudo rm -rf /usr/local/var/games/emacs
;;
'')
con_figure
$MAKE $MAKEOPTS
cd lisp
$MAKE recompile EMACS=../src/emacs
cd -
$SRCDIR/admin/quick-install-emacs --prune-only .
install_target
;;
install)
install_target
;;
*)
echo 'what?'
false
;;
esac
# Han
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
2005-01-14 12:39 Robert J. Chassell
2005-01-14 18:58 ` Vinicius Jose Latorre
@ 2005-01-14 21:40 ` Michael Albinus
1 sibling, 0 replies; 9+ messages in thread
From: Michael Albinus @ 2005-01-14 21:40 UTC (permalink / raw)
Cc: emacs-devel
"Robert J. Chassell" <bob@rattlesnake.com> writes:
> ;; For installation, I run the following in a root owned instance of Emacs:
>
> (progn (cd "/usr/local/src/emacs/") (compile "time make install"))
What about:
(progn
(require 'tramp-util)
(cd "/su::/usr/local/src/emacs/")
(tramp-compile "time make install"))
Best regards, Michael.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Making a script to update and compile from CVS
2005-01-13 23:34 ` Miles Bader
@ 2005-01-15 0:12 ` Richard Stallman
0 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2005-01-15 0:12 UTC (permalink / raw)
Cc: lennart.borgman.073, emacs-devel
I think it is a good idea to add a make target designed to encapsulate
everything recommended for people to do when building from CVS.
Or perhaps to add some of these things into the `bootstrap' target,
so that it will work in more circumstances.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-01-15 0:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-13 21:36 Making a script to update and compile from CVS Lennart Borgman
2005-01-13 23:34 ` Miles Bader
2005-01-15 0:12 ` Richard Stallman
2005-01-13 23:38 ` Stefan Monnier
2005-01-14 10:26 ` Kai Großjohann
2005-01-14 19:39 ` Han Boetes
-- strict thread matches above, loose matches on Subject: below --
2005-01-14 12:39 Robert J. Chassell
2005-01-14 18:58 ` Vinicius Jose Latorre
2005-01-14 21:40 ` Michael Albinus
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.