Page 1 of 1

Current dir in makefile?

Posted: Tue Oct 07, 2008 3:18 pm
by CodeCat
This is probably a stupid question, but is there some predefined variable or something else in (GNU) makefiles that expands to the current directory? I want it to run a command that requires only absolute pathnames, so rather than tying it to one dir I would prefer it if make could fill it in. Looked in the make manual, but didn't find anything useful there.

Re: Current dir in makefile?

Posted: Tue Oct 07, 2008 4:31 pm
by Combuster
Try shelling pwd and grabbing the output.

Re: Current dir in makefile?

Posted: Tue Oct 07, 2008 10:44 pm
by Solar
$(CURDIR)

Re: Current dir in makefile?

Posted: Wed Oct 08, 2008 4:22 am
by CodeCat
Works, thanks! (Can't believe I missed that one)