aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2021-01-10 03:32:54 +0000
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2021-01-10 03:32:54 +0000
commitcbe30304c50c659b088a698c148b86a24da6b7d6 (patch)
treec268a18779efe5ff8e04728af7de032dbf4119e9 /reproduce/analysis
parentd9a6855948fad17fa0fbc2017ab2be0238ca8b72 (diff)
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.
Diffstat (limited to 'reproduce/analysis')
-rw-r--r--reproduce/analysis/make/initialize.mk13
1 files changed, 7 insertions, 6 deletions
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)