Always include the test/ directory in tarfiles

In hindsight, it's hard to see why not including it was ever an option.
* make-dist: Always include the test/ directory.
(with_tests): Remove.
(--tests, --no-tests): Make these options no-ops.
* Makefile.in (mostlyclean_dirs, maintainer_clean_dirs): Add "test".
(mostlyclean, clean, distclean, maintainer-clean):
Remove special-casing for "test".
($(CHECK_TARGETS)): Simplify.
This commit is contained in:
Glenn Morris 2021-05-10 10:42:53 -07:00
parent 02c80307f1
commit dc151c0001
2 changed files with 5 additions and 27 deletions

View file

@ -845,12 +845,11 @@ endef
### target for GCC does not delete 'libgcc.a', because recompiling it
### is rarely necessary and takes a lot of time.
mostlyclean_dirs = src oldXMenu lwlib lib lib-src nt doc/emacs doc/misc \
doc/lispref doc/lispintro
doc/lispref doc/lispintro test
$(foreach dir,$(mostlyclean_dirs),$(eval $(call submake_template,$(dir),mostlyclean)))
mostlyclean: $(mostlyclean_dirs:=_mostlyclean)
[ ! -d test ] || $(MAKE) -C test $@
### 'clean'
### Delete all files from the current directory that are normally
@ -865,7 +864,6 @@ clean_dirs = $(mostlyclean_dirs) nextstep admin/charsets admin/unidata
$(foreach dir,$(clean_dirs),$(eval $(call submake_template,$(dir),clean)))
clean: $(clean_dirs:=_clean)
[ ! -d test ] || $(MAKE) -C test $@
-rm -f ./*.tmp etc/*.tmp*
-rm -rf info-dir.*
-rm -rf native-lisp
@ -891,7 +889,6 @@ distclean_dirs = $(clean_dirs) leim lisp admin/grammars
$(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),distclean)))
distclean: $(distclean_dirs:=_distclean)
[ ! -d test ] || $(MAKE) -C test $@
${top_distclean}
### 'bootstrap-clean'
@ -900,7 +897,6 @@ distclean: $(distclean_dirs:=_distclean)
$(foreach dir,$(distclean_dirs),$(eval $(call submake_template,$(dir),bootstrap-clean)))
bootstrap-clean: $(distclean_dirs:=_bootstrap-clean)
[ ! -d test ] || $(MAKE) -C test $@
[ ! -f config.log ] || mv -f config.log config.log~
rm -rf ${srcdir}/info
rm -f ${srcdir}/etc/refcards/emacsver.tex
@ -922,12 +918,11 @@ top_maintainer_clean=\
rm -fr ${srcdir}/autom4te.cache
maintainer_clean_dirs = src leim lisp admin/charsets admin/grammars \
admin/unidata
admin/unidata test
$(foreach dir,$(maintainer_clean_dirs),$(eval $(call submake_template,$(dir),maintainer-clean)))
maintainer-clean: bootstrap-clean $(maintainer_clean_dirs:=_maintainer-clean)
[ ! -d test ] || $(MAKE) -C test $@
rm -rf ${srcdir}/info
rm -f ${srcdir}/etc/refcards/emacsver.tex
${top_maintainer_clean}
@ -958,12 +953,7 @@ TAGS tags: lib lib-src # src
CHECK_TARGETS = check check-maybe check-expensive check-all
.PHONY: $(CHECK_TARGETS)
$(CHECK_TARGETS): all
ifeq ($(wildcard test),test)
$(MAKE) -C test $@
else
@echo "You do not seem to have the test/ directory."
@echo "Maybe you used a release tarfile that lacks tests."
endif
test/%:
$(MAKE) -C test $*

View file

@ -52,7 +52,6 @@ make_tar=no
default_gzip=gzip
newer=""
with_info=yes
with_tests=yes
changelog=yes
verbose=no
@ -109,16 +108,10 @@ while [ $# -gt 0 ]; do
update=no
;;
## Include the test/ directory.
## This is for backward compatibility to when --no-tests was the default.
"--tests")
with_tests=yes
"--tests"|"--no-tests")
echo "The option $1 no longer does anything"
;;
## Exclude the test/ directory.
"--no-tests")
with_tests=no
;;
"--verbose")
verbose=yes
@ -136,7 +129,6 @@ while [ $# -gt 0 ]; do
echo " --no-update don't recompile or do analogous things"
echo " --no-changelog don't generate the top-level ChangeLog"
echo " --no-info don't include info files"
echo " --no-tests don't include the test/ directory"
echo " --snapshot same as --clean-up --no-update --tar"
echo " --tar make a tar file"
echo " --verbose noisier output"
@ -402,11 +394,7 @@ manifest=MANIFEST
# if .git is present.
if ( [ $update = yes ] || [ ! -f $manifest ] ) && [ -r .git ]; then
echo "Updating $manifest"
if [ $with_tests = yes ]; then
git ls-files > $manifest
else
git ls-files | grep -v '^test' >$manifest
fi || exit
git ls-files > $manifest || exit
printf '%s\n' $possibly_non_vc_files $info_files >>$manifest || exit
sort -u -o $manifest $manifest || exit
fi