[Top][All Lists]

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

Re: retrieve current directory

From: Greg Chicares
Subject: Re: retrieve current directory
Date: Wed, 28 Jun 2006 17:12:30 +0000
User-agent: Thunderbird (Windows/20060516)

On 2006-6-28 16:05 UTC, Simeon Nifos wrote:
> I would like to be able in the Makefile to 
> retrieve the last part of the name of the current 
> directory. If for instance my current directory is:
> /home/simeon/c++/opengl
> I would like to be able to declare a variable in the
> Makefile which will be automatically initialized in 
> opengl

In this session, the prompt shows the current directory:

C:/tmp/tmp0/tmp1$cat GNUmakefile
current_subdir := $(notdir $(CURDIR))

.PHONY: all
        @echo current_subdir is $(current_subdir)
current_subdir is tmp1

reply via email to

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