update how the working dir is read in the makefile

This commit is contained in:
Sebastian Hugentobler 2019-09-27 18:15:04 +02:00
parent dbb9f99c7c
commit b981cb2dc2
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0

View File

@ -1,4 +1,5 @@
WORKING_DIR:=$(shell pwd) mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
WORKING_DIR := $(patsubst %/,%,$(dir $(mkfile_path)))
BOOKNAME=kommersbuch BOOKNAME=kommersbuch
SRC_DIR=src SRC_DIR=src
BUILD_DIR=build BUILD_DIR=build
@ -59,7 +60,7 @@ ${BUILD_MIDI_DIR}/%.midi: ${TMP_MIDI_DIR}/%-1.midi
cp $< $@ cp $< $@
${TMP_MIDI_DIR}/%-1.midi: ${SONG_DIR}/%.ly ${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 ${BUILD_OPUS_DIR}/%.opus: ${BUILD_MIDI_DIR}/%.midi
timidity $< -Ow -o - | opusenc - $@ timidity $< -Ow -o - | opusenc - $@