From 3b85bbc6bfdb68e58a9b85d92b63f3fd508c77b5 Mon Sep 17 00:00:00 2001 From: Matthew Leffler Date: Mon, 10 Jun 2024 12:14:02 +0700 Subject: [PATCH 1/2] Add ability to run Make tasks in parallel --- latex/draft.sh | 10 ---------- latex/generate-icmls.sh | 10 ---------- latex/makefile | 6 ++++++ 3 files changed, 6 insertions(+), 20 deletions(-) delete mode 100755 latex/draft.sh delete mode 100755 latex/generate-icmls.sh diff --git a/latex/draft.sh b/latex/draft.sh deleted file mode 100755 index 850d101..0000000 --- a/latex/draft.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -(cd ../../ && find . -path "*/$1/02_edit/*" -or -path "*/$1/03_public/*" -not -path "*/.tooling/*" -name "*.md") | while read LINE; -do - f="$(echo $LINE | cut -c 3-)" - if [[ "$f" == *".md" ]];then - echo $f - make draft/${f%.*}.pdf - fi -done diff --git a/latex/generate-icmls.sh b/latex/generate-icmls.sh deleted file mode 100755 index fcc9608..0000000 --- a/latex/generate-icmls.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -(cd ../../ && find . -path "*/$1/03_public/*" -name "*.md") | while read LINE; -do - f="$(echo $LINE | cut -c 3-)" - if [[ "$f" == *".md" ]];then - echo $f - make icml/${f%.*}.icml - fi -done diff --git a/latex/makefile b/latex/makefile index 1f4bcb0..3277968 100644 --- a/latex/makefile +++ b/latex/makefile @@ -240,6 +240,12 @@ $(ICMLDIR)/%.icml: --standalone \ --output $(ICMLDIR)/$*.icml +pdfs/%: + make $(patsubst $(SRCDIR)/%.md,$(DFTDIR)/%.pdf,$(sort $(shell find ../../$* -path "*/02_edit/*" -or -path "*/03_public/*" -name "*.md"))) + +icmls/%: + make $(patsubst $(SRCDIR)/%.md,$(ICMLDIR)/%.icml,$(sort $(shell find ../../$* -path "*/03_public/*" -name "*.md"))) + #==[ LATEX SOURCECODE - WHOLE BOOK ]============================================ # This target generates the tex sourcecode for the whole book. there is nothing From 4fb3f3c86c1f3316c017a35a2250ffd2f962972d Mon Sep 17 00:00:00 2001 From: Matthew Leffler Date: Mon, 10 Jun 2024 12:26:57 +0700 Subject: [PATCH 2/2] Attempt to fix sub make command --- latex/makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/latex/makefile b/latex/makefile index 3277968..aad1cc1 100644 --- a/latex/makefile +++ b/latex/makefile @@ -241,10 +241,10 @@ $(ICMLDIR)/%.icml: --output $(ICMLDIR)/$*.icml pdfs/%: - make $(patsubst $(SRCDIR)/%.md,$(DFTDIR)/%.pdf,$(sort $(shell find ../../$* -path "*/02_edit/*" -or -path "*/03_public/*" -name "*.md"))) + +make $(patsubst $(SRCDIR)/%.md,$(DFTDIR)/%.pdf,$(sort $(shell find ../../$* -path "*/02_edit/*" -or -path "*/03_public/*" -name "*.md"))) icmls/%: - make $(patsubst $(SRCDIR)/%.md,$(ICMLDIR)/%.icml,$(sort $(shell find ../../$* -path "*/03_public/*" -name "*.md"))) + +make $(patsubst $(SRCDIR)/%.md,$(ICMLDIR)/%.icml,$(sort $(shell find ../../$* -path "*/03_public/*" -name "*.md"))) #==[ LATEX SOURCECODE - WHOLE BOOK ]============================================