views:

21

answers:

2

I'd like to get the current directory during a GNUmake file run put into a make variable.

What is the syntax to do this? Something like this?

DIR := $(PWD)
+1  A: 

Um, yes, that's exactly right. Anything else we can help you with?

Beta
+1  A: 

Um, no, $PWD is sometimes defined in your environment and thus inherited by make, but oftentimes not. You need $CURDIR.

DIR := ${CURDIR}
bobbogo