diff options
author | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-10-11 21:01:38 +0100 |
---|---|---|
committer | Mohammad Akhlaghi <mohammad@akhlaghi.org> | 2019-10-11 21:01:38 +0100 |
commit | d4835357d2e96fd8a3a33bfaf9f7b459ba31e978 (patch) | |
tree | 345dbaca1e8ba337c1aa26c8b5d0f647b3ccb134 /reproduce/analysis/make | |
parent | bf3f9e8110aeb0f7aa3d40de512465bc89eeba63 (diff) |
Properly working make clean when in group mode
Until now, when you ran `make clean', all the directories under
`$(BDIR)/tex/' would be deleted except for `macros' and `build'. This was
good for the single-user mode. But in group mode, this would delete the
user-specific TeX build directory because its called `build-USER', not
`build'.
With this commit, to fix the problem, we define the new `texbtopdir' and
based on the group condition, and use that to specify which directory to
not delete.
Diffstat (limited to 'reproduce/analysis/make')
-rw-r--r-- | reproduce/analysis/make/initialize.mk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk index 0e359c5..52e4ca1 100644 --- a/reproduce/analysis/make/initialize.mk +++ b/reproduce/analysis/make/initialize.mk @@ -89,13 +89,14 @@ endif # changed). So in terms of over-all efficiency and processing steps, this # doesn't change anything. ifeq (x$(GROUP-NAME),x) -texbdir = $(texdir)/build +texbtopdir = build final-paper = paper.pdf else user = $(shell whoami) -texbdir = $(texdir)/build-$(user) +texbtopdir = build-$(user) final-paper = paper-$(user).pdf endif +texbdir = $(texdir)/$(texbtopdir) tikzdir = $(texbdir)/tikz @@ -226,7 +227,7 @@ clean: clean-mmap # are using afterwards. shopt -s extglob rm -rf $(BDIR)/tex/macros/!(dependencies.tex|dependencies-bib.tex) - rm -rf $(BDIR)/!(software|tex) $(BDIR)/tex/!(macros|build) + rm -rf $(BDIR)/!(software|tex) $(BDIR)/tex/!(macros|$(texbtopdir)) rm -rf $(BDIR)/tex/build/!(tikz) $(BDIR)/tex/build/tikz/* distclean: clean |