From d4835357d2e96fd8a3a33bfaf9f7b459ba31e978 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Fri, 11 Oct 2019 21:01:38 +0100 Subject: 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. --- .file-metadata | Bin 6413 -> 6413 bytes reproduce/analysis/make/initialize.mk | 7 ++++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.file-metadata b/.file-metadata index d15fbaf..9fcebd9 100644 Binary files a/.file-metadata and b/.file-metadata differ 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 -- cgit v1.2.1