Skip to content

Commit

Permalink
Update distclean rule to preserve tarball contents
Browse files Browse the repository at this point in the history
... and replace it with new realclean rule.

Closes jonas#1167
  • Loading branch information
koutcher committed Nov 19, 2021
1 parent 15aab28 commit 9ca69f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,15 +176,18 @@ uninstall:
$(QUIET_UNINSTALL_EACH)tools/uninstall.sh "$(DESTDIR)$(docdir)/tig/$(doc)";)

clean: clean-test clean-coverage
$(Q)$(RM) -r $(TARNAME) *.spec tig-*.tar.gz tig-*.tar.gz.sha256 .deps _book node_modules
$(Q)$(RM) -r $(TARNAME) tig-*.tar.gz tig-*.tar.gz.sha256 .deps _book node_modules
$(Q)$(RM) -r $(compdb_dir) compile_commands.json
$(Q)$(RM) $(EXE) $(TOOLS) $(OBJS) core doc/*.xml src/builtin-config.c
$(Q)$(RM) $(OBJS:%.o=%.gcda) $(OBJS:%.o=%.gcno)

distclean: clean
$(RM) -r doc/manual.html-chunked autom4te.cache
$(RM) doc/*.toc $(ALLDOC) aclocal.m4 configure
$(RM) config.h config.log config.make config.status config.h.in
$(RM) doc/*.toc configure~
$(RM) config.h config.log config.make config.status config.h.in~

realclean: distclean
$(RM) tig.spec $(ALLDOC) aclocal.m4 configure config.h.in

spell-check:
for file in $(TXTDOC) src/tig.c; do \
Expand Down Expand Up @@ -213,7 +216,7 @@ update-docs: tools/doc-gen
$(SED) -n '/endif::DOC_GEN_ACTIONS/,$$p' < "$$doc" >> "$$doc.gen" ; \
mv "$$doc.gen" "$$doc"

dist: configure tig.spec
dist: configure config.h.in aclocal.m4 tig.spec
$(Q)mkdir -p $(TARNAME) && \
cp Makefile tig.spec configure config.h.in aclocal.m4 $(TARNAME) && \
$(SED) -i "s/VERSION\s\+=\s\+[0-9]\+\([.][0-9]\+\)\+/VERSION = $(VERSION)/" $(TARNAME)/Makefile
Expand Down Expand Up @@ -279,7 +282,7 @@ test-todo: $(TESTS_TODO)

# Other autoconf-related rules are hidden in config.make.in so that
# they don't confuse Make when we aren't actually using ./configure
configure: configure.ac tools/*.m4
configure config.h.in aclocal.m4: configure.ac tools/*.m4
$(QUIET_GEN)./autogen.sh

site:
Expand All @@ -290,7 +293,7 @@ site:
.PHONY: all all-coverage all-debug clean clean-coverage clean-test doc \
doc-man doc-html dist distclean install install-doc \
install-doc-man install-doc-html install-release-doc-html \
install-release-doc-man rpm spell-check strip test \
install-release-doc-man realclean rpm spell-check strip test \
test-coverage update-docs update-headers $(TESTS)

ifdef NO_MKSTEMPS
Expand Down
2 changes: 1 addition & 1 deletion tools/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ git checkout release
HEAD="$(git rev-parse release)"
git merge --ff master
if test -n "$(git rev-list -1 release ^$HEAD)"; then
make distclean doc-man doc-html sysconfdir=++SYSCONFDIR++
make realclean doc-man doc-html sysconfdir=++SYSCONFDIR++
git commit -a -m "Update for version $TAG"
fi

Expand Down

0 comments on commit 9ca69f8

Please sign in to comment.