[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #43550] Compiling files in a directory with the same name as the so
From: |
Taahir Ahmed |
Subject: |
[bug #43550] Compiling files in a directory with the same name as the source code fails |
Date: |
Thu, 06 Nov 2014 18:41:34 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 |
Follow-up Comment #1, bug #43550 (project make):
"foo" in the Makefile refers to the directory "foo". Because the directory
has no prerequisites, it is considered up to date as long as it exists
(up-to-date means newer than all prerequisites).
In general, non-phony targets should update a single rule with same name as
the target, so what you probably want is:
foo/foo: foo/foo.cpp
g++ -o $@ $<
The $@ and $< are shorthand for the rule target and the first prerequisite,
respectively.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43550>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/