Use a trick to make the makefile work from anywhere.

This commit is contained in:
Zed A. Shaw 2024-05-04 10:27:41 -04:00
parent 75663bfa46
commit 686ae0b6d2

View file

@ -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