From f8bce7e1a632e99ed0afd0f0c818aa501ae169fb Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Tue, 21 Mar 2023 14:18:14 -0400 Subject: [PATCH] Create a more automatic makefile for org-mode trees. Unfortunately, this seems to rebuild every source file every time so I still need to work on fixing that. --- org_mode_samples/Makefile | 25 +++++++++++++++++++ .../exit_matcher_investigation/Makefile | 24 ++++++++++++++++++ .../exit_matcher_investigation/README.org | 1 + 3 files changed, 50 insertions(+) create mode 100644 org_mode_samples/Makefile create mode 100644 org_mode_samples/exit_matcher_investigation/Makefile create mode 100644 org_mode_samples/exit_matcher_investigation/README.org diff --git a/org_mode_samples/Makefile b/org_mode_samples/Makefile new file mode 100644 index 0000000..abc7842 --- /dev/null +++ b/org_mode_samples/Makefile @@ -0,0 +1,25 @@ +SHELL := bash +.ONESHELL: +.SHELLFLAGS := -eu -o pipefail -c +.DELETE_ON_ERROR: +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules +SUBDIRS := $(wildcard */.) +OUT=out + +ifeq ($(origin .RECIPEPREFIX), undefined) + $(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later) +endif +.RECIPEPREFIX = > + +.PHONY: all +all: +> for dir in $(SUBDIRS); do \ +> make -C $$dir $@; \ +> done + +.PHONY: clean +clean: +> for dir in $(SUBDIRS); do \ +> make -C $$dir $@; \ +> done diff --git a/org_mode_samples/exit_matcher_investigation/Makefile b/org_mode_samples/exit_matcher_investigation/Makefile new file mode 100644 index 0000000..e11870d --- /dev/null +++ b/org_mode_samples/exit_matcher_investigation/Makefile @@ -0,0 +1,24 @@ +SHELL := bash +.ONESHELL: +.SHELLFLAGS := -eu -o pipefail -c +.DELETE_ON_ERROR: +MAKEFLAGS += --warn-undefined-variables +MAKEFLAGS += --no-builtin-rules +OUT=out +SRCFILES := $(wildcard *.org) +OUTFILES := $(patsubst %.org,%.org.tree.txt,$(SRCFILES)) + +ifeq ($(origin .RECIPEPREFIX), undefined) + $(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later) +endif +.RECIPEPREFIX = > + +.PHONY: all +all: ../common.el ../dump_org_ast.bash $(SRCFILES) +> for f in $(SRCFILES); do +> ../dump_org_ast.bash $$f $$f.tree.txt; \ +> done + +.PHONY: clean +clean: +> rm -rf $(OUTFILES) diff --git a/org_mode_samples/exit_matcher_investigation/README.org b/org_mode_samples/exit_matcher_investigation/README.org new file mode 100644 index 0000000..4380f41 --- /dev/null +++ b/org_mode_samples/exit_matcher_investigation/README.org @@ -0,0 +1 @@ +This folder is an investigation into whether or not my exit matchers should operate from the top down or bottom up.