Commit 4dde498b authored by Glenn Morris's avatar Glenn Morris

Remove the autogen/ directory

Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00806.html

* autogen: Remove directory.  Move update_autogen to admin/.
* autogen.sh: Remove reference to copy_autogen.
* GNUmakefile (configure):
* Makefile.in (bootstrap): Do not try to run copy_autogen.
* config.bat: Use msdos/autogen rather than autogen.

* admin/update_autogen: Move here from ../autogen.
(usage): Update.  Remove -l, add -A.
(autogendir): New variable.
(ldefs_flag): Default to set.
(genfiles): Reduce to only ms-dos relevant files.
(main): Make checking autogen sources optional.
Make copying of autogen files optional.

* msdos/autogen/config.in:
* msdos/autogen/Makefile.in: Move here from ../autogen.

* nt/INSTALL: Remove reference to copy_autogen.

* nt/config.nt: Comment.
parent ceb486d4
2013-11-05 Glenn Morris <rgm@gnu.org>
* autogen: Remove directory. Move update_autogen to admin/.
* autogen.sh: Remove reference to copy_autogen.
* GNUmakefile (configure):
* Makefile.in (bootstrap): Do not try to run copy_autogen.
* config.bat: Use msdos/autogen rather than autogen.
2013-11-05 Paul Eggert <eggert@cs.ucla.edu>
Simplify and port recent bool vector changes.
......
......@@ -68,8 +68,8 @@ default $(filter-out configure Makefile,$(MAKECMDGOALS)): Makefile
configure:
@echo >&2 'There seems to be no "configure" file in this directory.'
@echo >&2 'Running ./autogen.sh || autogen/copy_autogen ...'
./autogen.sh || autogen/copy_autogen
@echo >&2 'Running ./autogen.sh ...'
./autogen.sh
@echo >&2 '"configure" file built.'
Makefile: configure
......
......@@ -1065,11 +1065,11 @@ check-info-dir: info
# Bootstrapping does the following:
# * Remove files to start from a bootstrap-clean slate.
# * Run autogen.sh, falling back on copy_autogen if autogen.sh fails.
# * Run autogen.sh.
# * Rebuild Makefile, to update the build procedure itself.
# * Do the actual build.
bootstrap: bootstrap-clean FRC
cd $(srcdir) && { ./autogen.sh || autogen/copy_autogen; }
cd $(srcdir) && ./autogen.sh
$(MAKE) $(MFLAGS) MAKEFILE_NAME=force-Makefile force-Makefile
$(MAKE) $(MFLAGS) info all
......
2013-11-05 Glenn Morris <rgm@gnu.org>
* update_autogen: Move here from ../autogen.
(usage): Update. Remove -l, add -A.
(autogendir): New variable.
(ldefs_flag): Default to set.
(genfiles): Reduce to only ms-dos relevant files.
(main): Make checking autogen sources optional.
Make copying of autogen files optional.
2013-10-30 Glenn Morris <rgm@gnu.org>
* unidata/unidata-gen.el (unidata-gen-files): Use pop.
......
#!/bin/bash
### update_autogen - update the generated files in Emacs autogen/ directory
### update_autogen - update some auto-generated files in the Emacs tree
## Copyright (C) 2011-2013 Free Software Foundation, Inc.
......@@ -22,12 +22,12 @@
### Commentary:
## This is a helper script to update the pre-built generated files in
## the autogen/ directory. This is suitable for running from cron.
## This is a helper script to update some generated files in the Emacs
## repository. This is suitable for running from cron.
## Only Emacs maintainers need use this, so it uses bash features.
##
## With the -l option, it also updates the versioned loaddefs-like
## files in lisp/. These include ldefs-boot, cl-loaddefs, rmail, etc.
## By default, it updates the versioned loaddefs-like files in lisp,
## except ldefs-boot.el.
### Code:
......@@ -42,24 +42,25 @@ PD=${0%/*}
[ "$PD" = "$0" ] && PD=. # if PATH includes PWD
## This should be the autogen directory.
## This should be the admin directory.
cd $PD
cd ../
[ -d autogen ] || die "Could not locate autogen directory"
[ -d admin ] || die "Could not locate admin directory"
usage ()
{
cat 1>&2 <<EOF
Usage: ${PN} [-f] [-c] [-q] [-l [-L]] [-C] [-- make-flags]
Update the generated files in the Emacs autogen/ directory.
Usage: ${PN} [-f] [-c] [-q] [-A dir] [-L] [-C] [-- make-flags]
Update some auto-generated files in the Emacs tree.
By default, only does the versioned loaddefs-like files in lisp/.
This requires a build. Passes any non-option args to make (eg -- -j2).
Options:
-f: force an update even if the source files are locally modified.
-c: if the update succeeds and the generated files are modified,
commit them (caution).
-q: be quiet; only give error messages, not status messages.
-l: also update the versioned loaddefs-like files in lisp/.
This requires a build. Passes any non-option args to make (eg -- -j2).
-A: only update autotools files, copying into specified dir.
-L: also update ldefs-boot.el.
-C: start from a clean state. Slower, but more correct.
EOF
......@@ -73,18 +74,23 @@ force=
commit=
quiet=
clean=
ldefs_flag=
autogendir= # was "autogen"
ldefs_flag=1
lboot_flag=
## Parameters.
ldefs_in=lisp/loaddefs.el
ldefs_out=lisp/ldefs-boot.el
sources="configure.ac lib/Makefile.am"
## Files to copy into autogendir.
## Everything:
genfiles="
configure aclocal.m4 src/config.in lib/Makefile.in
build-aux/compile build-aux/config.guess build-aux/config.sub
build-aux/depcomp build-aux/install-sh build-aux/missing
"
## msdos-only:
genfiles="src/config.in lib/Makefile.in"
for g in $genfiles; do
basegen="$basegen ${g##*/}"
......@@ -97,7 +103,7 @@ tempfile=/tmp/$PN.$$
trap "rm -f $tempfile 2> /dev/null" EXIT
while getopts ":hcflqCL" option ; do
while getopts ":hcfqA:CL" option ; do
case $option in
(h) usage ;;
......@@ -105,10 +111,12 @@ while getopts ":hcflqCL" option ; do
(f) force=1 ;;
(l) ldefs_flag=1 ;;
(q) quiet=1 ;;
(A) autogendir=$OPTARG
[ -d "$autogendir" ] || die "No autogen directory: $autogendir"
;;
(C) clean=1 ;;
(L) lboot_flag=1 ;;
......@@ -130,8 +138,8 @@ OPTIND=1
echo "Running bzr status..."
bzr status -S $sources ${ldefs_flag:+lisp} >| $tempfile || \
die "bzr status error for sources"
bzr status -S ${autogendir:+$sources} ${ldefs_flag:+lisp} >| $tempfile || \
die "bzr status error for input files"
## The lisp portion could be more permissive, eg only care about .el files.
while read stat file; do
......@@ -175,31 +183,6 @@ fi
[ $retval -ne 0 ] && die "autoreconf error"
cp $genfiles autogen/
cd autogen
echo "Checking status of generated files..."
bzr status -S $basegen >| $tempfile || \
die "bzr status error for generated files"
modified=
while read stat file; do
[ "$stat" != "M" ] && die "Unexpected status ($stat) for generated $file"
modified="$modified $file"
done < $tempfile
cd ../
## Uses global $commit.
commit ()
{
......@@ -224,7 +207,36 @@ commit ()
} # function commit
commit "generated" $modified || die "bzr commit error"
[ "$autogendir" ] && {
oldpwd=$PWD
cp $genfiles $autogendir/
cd $autogendir || die "cd error for $autogendir"
echo "Checking status of generated files..."
bzr status -S $basegen >| $tempfile || \
die "bzr status error for generated files"
modified=
while read stat file; do
[ "$stat" != "M" ] && \
die "Unexpected status ($stat) for generated $file"
modified="$modified $file"
done < $tempfile
cd $oldpwd
commit "generated" $modified || die "bzr commit error"
exit 0
} # $autogendir
[ "$ldefs_flag" ] || exit 0
......
......@@ -191,13 +191,6 @@ autoreconf -i -I m4
instead of this script.
If all else fails, you can try using the pre-built versions of the
generated files by doing:
./autogen/copy_autogen
This is not recommended - see the comments in \`copy_autogen'.
Please report any problems with this script to bug-gnu-emacs@gnu.org .
EOF
......
This directory contains some pre-built generated files.
Most people do not need to use these files - instead you should
generate them yourself using eg `autogen.sh'.
File: Destination: Created by:
configure ../ autoconf
config.in ../src autoheader * also used by MSDOS bzr build
aclocal.m4 ../ aclocal
Makefile.in ../lib automake
compile ../build-aux automake
config.guess ../build-aux automake
config.sub ../build-aux automake
depcomp ../build-aux automake
install-sh ../build-aux automake
missing ../build-aux automake
There are also some scripts:
copy_autogen - copy pre-built generated files into place
update_autogen - regenerate generated files (for maintainers)
This diff is collapsed.
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
scriptversion=2009-10-06.20; # UTC
# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
# Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand `-c -o'.
Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file `INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
esac
ofile=
cfile=
eat=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as `compile cc -o foo foo.c'.
# So we strip `-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no `-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# `.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use `[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
## Helper script for those building Emacs from bzr without autoconf etc.
## This installs some pre-generated versions of the automatically
## generated files. It is highly recommended to install the necessary
## tools instead of using this. Note that if eg configure.ac
## is updated, the next time you run make it will attempt to
## regenerate configure and will fail if you do not have the required
## tools. You will have to run this script again.
test ! -d autogen || cd autogen || exit
if test ! -e config.in; then
echo "Cannot find autogen/ directory."
exit 1
fi
## Order implied by top-level Makefile's rules, for time-stamps.
cp -f compile config.guess config.sub depcomp install-sh missing \
../build-aux &&
cp aclocal.m4 ../ &&
cp configure ../ &&
touch ../src/stamp-h.in &&
cp config.in ../src/ &&
cp Makefile.in ../lib/ &&
echo "You can now run configure"
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -155,10 +155,10 @@ rm -f epaths.tmp
rem Create "config.h"
rm -f config.h2 config.tmp
if exist config.in sed -e '' config.in > config.tmp
if exist ..\autogen\config.in sed -e '' ../autogen/config.in > config.tmp
if exist ..\msdos\autogen\config.in sed -e '' ../msdos/autogen/config.in > config.tmp
if "%X11%" == "" goto src4
if exist config.in sed -f ../msdos/sed2x.inp < config.in > config.tmp
if exist ..\autogen\config.in sed -f ../msdos/sed2x.inp < ..\autogen\config.in > config.tmp
if exist ..\msdos\autogen\config.in sed -f ../msdos/sed2x.inp < ..\msdos\autogen\config.in > config.tmp
:src4
sed -f ../msdos/sed2v2.inp <config.tmp >config.h2
Rem See if they have libxml2 later than v2.2.0 installed
......@@ -279,7 +279,7 @@ If Exist sys_types.in.h update sys_types.in.h sys_types.in-h
If Exist time.in.h update time.in.h time.in-h
If Exist unistd.in.h update unistd.in.h unistd.in-h
If Exist Makefile.in sed -f ../msdos/sedlibcf.inp < Makefile.in > makefile.tmp
If Exist ..\autogen\Makefile.in sed -f ../msdos/sedlibcf.inp < ..\autogen\Makefile.in > makefile.tmp
If Exist ..\msdos\autogen\Makefile.in sed -f ../msdos/sedlibcf.inp < ..\msdos\autogen\Makefile.in > makefile.tmp
sed -f ../msdos/sedlibmk.inp < makefile.tmp > Makefile
rm -f makefile.tmp
Rem Create .Po files for new files in lib/
......
2013-11-05 Glenn Morris <rgm@gnu.org>
* autogen/config.in:
* autogen/Makefile.in: Move here from ../autogen.
2013-05-15 Stefan Monnier <monnier@iro.umontreal.ca>
* sed1x.inp: Don't rewrite DOC any more.
......
......@@ -64,13 +64,13 @@ MAKESHELL=/xyzzy/command
top_srcdir := $(subst \,/,$(shell cd))
# Q: Do we need to bootstrap?
# A: Only if we find autogen/README, i.e. we are building out of
# A: Only if we find msdos/autogen/README, i.e. we are building out of
# a VCS-checkout (not a release), and src/b-emacs.exe does not exist.
# This avoids building a bootstrap-emacs and recompiling Lisp files
# when building a pretest/release tarball. Recompiling Lisp files
# is BAD because lisp/Makefile.in requires a Unixy shell.
boot :=
ifneq ($(wildcard autogen/README),)
ifneq ($(wildcard msdos/autogen/README),)
ifeq ($(wildcard src/b-emacs.exe),)
boot := b-emacs.exe
endif
......
......@@ -281,12 +281,7 @@ Windows 9X as well).
To build a development snapshot from the Emacs Bazaar repository,
you will first need to generate the configure script and a few other
auto-generated files. (If this step, described below, somehow
fails, you can use the files in the autogen/ directory instead, but
they might be outdated, and, most importantly, you are well advised
not to disregard any failures in your local build procedures, as
these are likely to be symptoms of incorrect installation that will
bite you down the road.)
auto-generated files.
To generate the configure script, type this at the MSYS Bash prompt
from the top-level directory of the Emacs tree:
......
......@@ -18,8 +18,8 @@ You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
/* NOTE:
This file is intentionally kept in sync with autogen/config.in to
ease maintenance. Please do not remove non-Windows related stuff
*** WARNING This file is no longer being updated ***
Please do not remove non-Windows related stuff
unless strictly necessary. Also, before adding anything here
consider whether inc/ms-w32.h would be a better place; this is
particularly true for gcc vs. MSVC conditional defines, MinGW or
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment