## This option tells make-dist to make the distribution normally, then
## remove all files older than the given timestamp file. This is useful
## for creating incremental or patch distributions.
## This option tells make-dist to make the distribution normally, then
## remove all files older than the given timestamp file. This is useful
## for creating incremental or patch distributions.
echo " --newer=TIME don't include files older than TIME"
echo " --no-check don't check for bad file names etc."
echo " --no-update don't recompile or do analogous things"
echo " --newer=TIME don't include files older than TIME"
echo " --no-check don't check for bad file names etc."
echo " --no-update don't recompile or do analogous things"
echo " --snapshot same as --clean-up --no-update --tar --no-check"
echo " --tar make a tar file"
echo " --tests include the test/ directory"
echo " --snapshot same as --clean-up --no-update --tar --no-check"
echo " --tar make a tar file"
echo " --tests include the test/ directory"
### Make sure we're running in the right place.
if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/subr.el ]; then
### Make sure we're running in the right place.
if [ ! -d src -o ! -f src/lisp.h -o ! -d lisp -o ! -f lisp/subr.el ]; then
- echo "${progname}: Can't find \`src/lisp.h' and \`lisp/subr.el'." >&2
- echo "${progname} must be run in the top directory of the Emacs" >&2
- echo "distribution tree. cd to that directory and try again." >&2
+ printf '%s\n' "${progname}: Can't find 'src/lisp.h' and 'lisp/subr.el'." >&2
+ printf '%s\n' "${progname} must be run in the top directory of the Emacs" >&2
+ printf '%s\n' "distribution tree. cd to that directory and try again." >&2
sed -n 's/^AC_INIT(GNU Emacs,[ ]*\([^ ,)]*\).*/\1/p' <configure.ac
` || version=
if [ ! "${version}" ]; then
sed -n 's/^AC_INIT(GNU Emacs,[ ]*\([^ ,)]*\).*/\1/p' <configure.ac
` || version=
if [ ! "${version}" ]; then
### Make sure the subdirectory is available.
tempparent="make-dist.tmp.$$"
if [ -d ${tempparent} ]; then
### Make sure the subdirectory is available.
tempparent="make-dist.tmp.$$"
if [ -d ${tempparent} ]; then
- echo "${progname}: staging directory \`${tempparent}' already exists.
-Perhaps a previous invocation of \`${progname}' failed to clean up after
+ printf '%s\n' "${progname}: staging directory '${tempparent}' already exists.
+Perhaps a previous invocation of '${progname}' failed to clean up after
if [ x"${bogosities}" != x"" ]; then
echo "The following .elc files have no corresponding .el files:"
echo "${bogosities}"
if [ x"${bogosities}" != x"" ]; then
echo "The following .elc files have no corresponding .el files:"
echo "${bogosities}"
+if [ "$changelog" = yes ]; then
+ if test -d .git; then
+ echo "Making top-level ChangeLog"
+ make ChangeLog CHANGELOG=${tempdir}/ChangeLog || \
+ { x=$?; echo "make ChangeLog FAILED (try --no-changelog?)" >&2; exit $x; }
+ else
+ echo "No repository, so omitting top-level ChangeLog"
+ fi
+fi
+
### We copy in the top-level files before creating the subdirectories in
### hopes that this will make the top-level files appear first in the
### tar file; this means that people can start reading the INSTALL and
### README while the rest of the tar file is still unpacking. Whoopee.
echo "Making links to top-level files"
ln INSTALL README BUGS ${tempdir}
### We copy in the top-level files before creating the subdirectories in
### hopes that this will make the top-level files appear first in the
### tar file; this means that people can start reading the INSTALL and
### README while the rest of the tar file is still unpacking. Whoopee.
echo "Making links to top-level files"
ln INSTALL README BUGS ${tempdir}
files=`find lisp \( -name '*.el' -o -name '*.elc' -o -name 'ChangeLog*' \
-o -name 'README' \)`
### Don't distribute site-init.el, site-load.el, or default.el.
files=`find lisp \( -name '*.el' -o -name '*.elc' -o -name 'ChangeLog*' \
-o -name 'README' \)`
### Don't distribute site-init.el, site-load.el, or default.el.
ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC
ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
ln CXTERM-DIC/README CXTERM-DIC/*.tit ../${tempdir}/leim/CXTERM-DIC
ln SKK-DIC/README SKK-DIC/SKK-JISYO.L ../${tempdir}/leim/SKK-DIC
ln MISC-DIC/README MISC-DIC/*.* ../${tempdir}/leim/MISC-DIC
ln leim-ext.el ../${tempdir}/leim/leim-ext.el)
## FIXME Can we not just use the "find -type f" method for this one?
ln leim-ext.el ../${tempdir}/leim/leim-ext.el)
## FIXME Can we not just use the "find -type f" method for this one?
ln install-sh missing move-if-change ../${tempdir}/build-aux
ln update-copyright update-subdirs ../${tempdir}/build-aux
ln dir_top make-info-dir ../${tempdir}/build-aux)
ln install-sh missing move-if-change ../${tempdir}/build-aux
ln update-copyright update-subdirs ../${tempdir}/build-aux
ln dir_top make-info-dir ../${tempdir}/build-aux)
### Don't distribute the configured versions of
### config.in, paths.in, buildobj.h, or Makefile.in.
(cd src
echo " (It is ok if ln fails in some cases.)"
ln [a-zA-Z]*.[chm] ../${tempdir}/src
ln [a-zA-Z]*.in ../${tempdir}/src
### Don't distribute the configured versions of
### config.in, paths.in, buildobj.h, or Makefile.in.
(cd src
echo " (It is ok if ln fails in some cases.)"
ln [a-zA-Z]*.[chm] ../${tempdir}/src
ln [a-zA-Z]*.in ../${tempdir}/src
- ln [a-zA-Z]*.mk ../${tempdir}/src
- ln README ChangeLog ChangeLog.*[0-9] ../${tempdir}/src
- ln makefile.w32-in ../${tempdir}/src
+ ln deps.mk ../${tempdir}/src
+ ln README ChangeLog.*[0-9] ../${tempdir}/src
(cd nextstep/Cocoa/Emacs.base/Contents
ln PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents)
(cd nextstep/Cocoa/Emacs.base/Contents
ln PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents)
(cd nextstep/Cocoa/Emacs.base/Contents/Resources
ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources)
(cd nextstep/Cocoa/Emacs.base/Contents/Resources
ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources)
(cd nextstep/GNUstep/Emacs.base/Resources
ln README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources )
(cd nextstep/GNUstep/Emacs.base/Resources
ln README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources )
## It is important to distribute admin/ because it contains sources
## for generated lisp/international/uni-*.el files.
## It is important to distribute admin/ because it contains sources
## for generated lisp/international/uni-*.el files.
ln spellfile ../../${tempdir}/doc/lispref
ln two-volume.make two-volume-cross-refs.txt ../../${tempdir}/doc/lispref)
ln spellfile ../../${tempdir}/doc/lispref
ln two-volume.make two-volume-cross-refs.txt ../../${tempdir}/doc/lispref)
- ln *.texi *.in makefile.w32-in *.eps *.pdf ../../${tempdir}/doc/lispintro
- ln README ChangeLog* ../../${tempdir}/doc/lispintro
+ ln *.texi *.in *.eps *.pdf ../../${tempdir}/doc/lispintro
+ ln README ChangeLog.*[0-9] ../../${tempdir}/doc/lispintro
cd ../../${tempdir}/doc/man
rm -f emacs.1)
### It would be nice if they could all be symlinks to top-level copy, but
### you're not supposed to have any symlinks in distribution tar files.
cd ../../${tempdir}/doc/man
rm -f emacs.1)
### It would be nice if they could all be symlinks to top-level copy, but
### you're not supposed to have any symlinks in distribution tar files.
for subdir in . etc leim lib lib-src lisp lwlib msdos nt src; do
rm -f ${tempdir}/${subdir}/COPYING
cp COPYING ${tempdir}/${subdir}
done
if [ "${newer}" ]; then
for subdir in . etc leim lib lib-src lisp lwlib msdos nt src; do
rm -f ${tempdir}/${subdir}/COPYING
cp COPYING ${tempdir}/${subdir}
done
if [ "${newer}" ]; then
## We remove .elc files unconditionally, on the theory that anyone picking
## up an incremental distribution already has a running Emacs to byte-compile
## them with.
## We remove .elc files unconditionally, on the theory that anyone picking
## up an incremental distribution already has a running Emacs to byte-compile
## them with.
for dir in ${temppath}; do
[ -x ${dir}/$default_gzip ] || continue
found=1; break
done
if [ "$found" = "0" ]; then
for dir in ${temppath}; do
[ -x ${dir}/$default_gzip ] || continue
found=1; break
done
if [ "$found" = "0" ]; then