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
all:
        @echo current_subdir is $(current_subdir)
C:/tmp/tmp0/tmp1$make
current_subdir is tmp1


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to