From cbe30304c50c659b088a698c148b86a24da6b7d6 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Sun, 10 Jan 2021 03:32:54 +0000 Subject: make dist: removing temp files moved after project-specific files Until now, when you ran './project make dist', first it would delete the temporary files (like files ending in '~' or '.swp' created by some editors), then it had a place to add project-specific operations for the distribution. However, in the process of cleaning the temporary files, it would 'cd' into the directory that would later be packaged. So project-specific operations would first have to 'cd' back into the top source directory. This was prone to hard-to-find bugs. With this commit, to avoid the problem the project-specific operations are now placed before the cleaning phase. This is also technically good because in the project-specific operations there may also be temporary files that shouldn't go into the distribution tarball. --- reproduce/analysis/make/initialize.mk | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'reproduce') diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 3b1ffe5..81943db 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -374,16 +374,17 @@ $(project-package-contents): paper.pdf | $(texdir) sed -e's|{tikz/}|{tex/tikz/}|' $$pgfsettings > $$pgfsettings.new mv $$pgfsettings.new $$pgfsettings - # Clean temporary (currently those ending in `~') files. - cd $(texdir) - find $(project-package-name) -name \*~ -delete - find $(project-package-name) -name \*.swp -delete - # PROJECT SPECIFIC # ---------------- - # Put any project specific distribution steps here. + # Put any project-specific distribution steps here. + # ---------------- + # Clean temporary files that may have been created by text editors. + cd $(texdir) + find $(project-package-name) -name \*~ -delete + find $(project-package-name) -name \*.swp -delete + # Package into `.tar.gz' or '.tar.lz'. dist dist-lzip: $(project-package-contents) curdir=$$(pwd) -- cgit v1.2.1