From b981cb2dc2ec9907ab96c8575c63d179e7f6651a Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Fri, 27 Sep 2019 18:15:04 +0200 Subject: [PATCH] update how the working dir is read in the makefile --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 738a33c..9110593 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -WORKING_DIR:=$(shell pwd) +mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) +WORKING_DIR := $(patsubst %/,%,$(dir $(mkfile_path))) BOOKNAME=kommersbuch SRC_DIR=src BUILD_DIR=build @@ -59,7 +60,7 @@ ${BUILD_MIDI_DIR}/%.midi: ${TMP_MIDI_DIR}/%-1.midi cp $< $@ ${TMP_MIDI_DIR}/%-1.midi: ${SONG_DIR}/%.ly - lilypond --output=${TMP_MIDI_DIR} $< + lilypond --output=${TMP_MIDI_DIR} ${WORKING_DIR}/$< ${BUILD_OPUS_DIR}/%.opus: ${BUILD_MIDI_DIR}/%.midi timidity $< -Ow -o - | opusenc - $@