From 686ae0b6d26c54df872f9b88813855d723133e8f Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Sat, 4 May 2024 10:27:41 -0400 Subject: [PATCH] Use a trick to make the makefile work from anywhere. --- PPP3/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PPP3/Makefile b/PPP3/Makefile index a74bcc3..f7542fc 100644 --- a/PPP3/Makefile +++ b/PPP3/Makefile @@ -1,8 +1,10 @@ +ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) + all: - meson compile -C . 2>&1 | ../builddir/goc + meson compile -C . 2>&1 | ${ROOT_DIR}/builddir/goc build: meson compile -C . test: - @echo "../ex08.cpp:7:10: error: use of undeclared identifier \'oops\'" | ../builddir/goc + @echo "../ex08.cpp:7:10: error: use of undeclared identifier \'oops\'" | ${ROOT_DIR}/builddir/goc