Posts Tagged ‘make’

How to get a Makefile directory path

Posted: 27th September 2015 by Tim in Linux, Make
Tags: , , , , , ,

Sometimes in a Makefile you need to reference something from the directory where the Makefile lives. $(PWD) won’t work in this instance, since that will return the path from where make was called which may be different if, for example, you use the –directory option. In this case, we can use the following code to […]