[Top][All Lists]

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

Re: How to refer to the current directory (.)?

From: Paul Smith
Subject: Re: How to refer to the current directory (.)?
Date: Tue, 02 Feb 2010 00:12:27 -0500

On Mon, 2010-02-01 at 22:28 -0600, Peng Yu wrote:
> I have the following makefile, by which I want it to touch the current
> directory if the file 'a' is changed. It seems to be working. But I
> want to make sure if '.' has some special meaning in make (by simply
> looking though the index, I don't find any special meaning). Could
> somebody let me know?
> $ cat Makefile
> .PHONY: all
> all: .
> .: a
>         touch $@

There is no special meaning to ".".

Technically the POSIX standard reserves target names that start with
period and consist of one or more uppercase characters as reserved for
implementation extensions.  However, a simple period is not reserved and
is treated as a normal target.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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