-## Copyright (C) 1995, 1997-1998, 2000-2014 Free Software Foundation, Inc.
+## Copyright (C) 1995, 1997-1998, 2000-2015 Free Software Foundation,
+## Inc.
## 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} must be run in the top directory of the Emacs" >&2
echo "distribution tree. cd to that directory and try again." >&2
exit 1
echo "${progname} must be run in the top directory of the Emacs" >&2
echo "distribution tree. cd to that directory and try again." >&2
exit 1
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
+ echo "${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}
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 makefile.w32-in ../${tempdir}/src
ln .gdbinit .dbxinit ../${tempdir}/src
cd ../${tempdir}/src
rm -f globals.h config.h epaths.h Makefile buildobj.h)
ln makefile.w32-in ../${tempdir}/src
ln .gdbinit .dbxinit ../${tempdir}/src
cd ../${tempdir}/src
rm -f globals.h config.h epaths.h Makefile buildobj.h)
ln rcs2log ../${tempdir}/lib-src
ln makefile.w32-in ../${tempdir}/lib-src
ln update-game-score.exe.manifest ../${tempdir}/lib-src)
ln rcs2log ../${tempdir}/lib-src
ln makefile.w32-in ../${tempdir}/lib-src
ln update-game-score.exe.manifest ../${tempdir}/lib-src)
(cd nt
ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt
ln config.nt emacs-src.tags ../${tempdir}/nt
ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
ln *.in gnulib.mk ../${tempdir}/nt
ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt
(cd nt
ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt
ln config.nt emacs-src.tags ../${tempdir}/nt
ln nmake.defs gmake.defs subdirs.el [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt
ln *.in gnulib.mk ../${tempdir}/nt
ln mingw-cfg.site epaths.nt INSTALL.OLD ../${tempdir}/nt
(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)
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}
for subdir in . etc leim lib lib-src lisp lwlib msdos nt src; do
rm -f ${tempdir}/${subdir}/COPYING
cp COPYING ${tempdir}/${subdir}