From 28c1364820e3758c3af45e5d8b0d75f7b8cf60a3 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Sun, 7 May 2023 17:28:03 +0200 Subject: support special subdir Makefiles * dynamically find the location of common.mk * specify MAKEFILE_DIR in common.mk if not already defined --- common.mk | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common.mk') diff --git a/common.mk b/common.mk index cae111b7..dceb5997 100644 --- a/common.mk +++ b/common.mk @@ -1,3 +1,8 @@ +# The full path to the Makefile +MAKEFILE_PATH ?= $(abspath $(lastword $(MAKEFILE_LIST))) +# The path to the directory of the Makefile +MAKEFILE_DIR ?= $(dir $(MAKEFILE_PATH)) + IMGS := $(wildcard img/*) LATEX_BASE := $(MAKEFILE_DIR)latex -- cgit v1.2.3