Update distclean rule to preserve tarball contents#1169
Update distclean rule to preserve tarball contents#1169koutcher merged 1 commit intojonas:masterfrom
Conversation
Makefile
Outdated
| $(RM) doc/*.toc configure~ | ||
| $(RM) config.h config.log config.make config.status config.h.in~ | ||
|
|
||
| realclean: distclean |
There was a problem hiding this comment.
cc @sbakker
I also thought that make clean deletes all generated files, while make distclean preserves things like documentation and configure scripts.
In Tig it's the other way round, which is weird. However, Git does the same, so we should first understand why to see if it makes sense for us to deviate.
AFACT this behavior was originally introduced to Git in git/git@922aa80
this is the log message:
Do not remove distributed configure script
Before this patch the clean target has removed the
configure script that comes with Git tar file.
That made compiling Git for different architectures
inconvenient.
This patch excludes configure from the files to be
deleted by 'make clean' and adds new target 'distclean'
to preserve old functionality.
(if we stick to a separate target, maybe clean-all is a more familiar/discoverable name)
There was a problem hiding this comment.
I'm not stuck on the pristine name, it's just something I saw occasionally (possibly along with mrproper in the Linux kernel source). The Standard Targets section in the GNU make manual defines clean and distclean:
clean- delete files created by the Makefile during the build (compilation) process (.o,.a,.so, etc.), but not configuration files.distclean- delete all files that are created by configuring or building the program (so alsoconfig.status, but not theconfigurescript). It should return the state of the directory to that of the unpacked tarball.
There's also a maintainer-clean, but even that one is not supposed to delete the configure script. So veryclean is probably the best choice here.
There was a problem hiding this comment.
veryclean would be good for me.
|
What makes things a bit more complicated with Tig is the two-stage delivery process which adds generated artefacts that may not be reproducible to the release branch before using it to build the tarball. The current |
... and replace it with new veryclean rule. Closes jonas#1167
9ca69f8 to
69ba3fe
Compare
... and replace it with new veryclean rule. Closes jonas#1167
... and replace it with new realclean rule.
Closes #1167