help-make
[Top][All Lists]
Advanced

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

Re: why does make strip / at the end of a directory prerequisite??


From: Lane Schwartz
Subject: Re: why does make strip / at the end of a directory prerequisite??
Date: Thu, 8 Sep 2011 08:45:21 -0400

On Unix-like systems which use / as the file path separator, the two
items you describe ("dir" and "dir/") are treated as exactly the same
item.

I may be wrong on this, but I believe that "/" is not allowed as part
of a file name on Linux.

If you remove the trailing "/" from the mkdir rule, it should work.

Lane


On Wed, Sep 7, 2011 at 10:01 PM, Mark Galeck (CW) <address@hidden> wrote:
> Hello,
>
> This ought to work  - it works on Windows GNU Make, but not on Linux:
>
>
> %/:
>        mkdir -p $@
>
> dir/foobar: dir/
>        touch $@
>
>
>
>
> GNU Make on Linux thinks that dir is the prerequisite, not dir/, and bombs.
>
>
> Is this a bug??
>
> Mark
>
>
>
>
> _______________________________________________
> Help-make mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/help-make
>



-- 
When a place gets crowded enough to require ID's, social collapse is not
far away.  It is time to go elsewhere.  The best thing about space travel
is that it made it possible to go elsewhere.
                -- R.A. Heinlein, "Time Enough For Love"



reply via email to

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