automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get the directory of the Makefile


From: Victor Porton
Subject: Get the directory of the Makefile
Date: Wed, 20 Sep 2017 01:05:56 +0300

I want to pass absolute (or relative with possible ../../..) path of
certain file (for example, laying in the same directory as Makefile or
in its subdirectory or its superdirectory) to my application.

For example, consider that I created application run-tests in a direct
subdirectory of the Makefile and I want to run

./run-tests ../data.txt

when I am in a direct subdirectory of the directory with the Makefile,
because data.txt lies in the same directory as the Makefile.

That is I want Automake to add the correct ../ prefix to data.txt.

How to get the path to my data.txt?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]