[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
VPATH question
From: |
Gisle Vanem |
Subject: |
VPATH question |
Date: |
Fri, 24 Feb 2023 08:44:50 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
Hello list.
I sometimes have issues when a 'VPATH' doesn't
do what I'd like. E.g. in this 'vpath-test.mak'
file:
#
# there is a 'apps/lib' directory here:
#
VPATH = apps
GEN_DIRS = ./lib
default all: $(GEN_DIRS)
$(GEN_DIRS):
mkdir --verbose $@
---------------
So I want to create a './lib' directory in
'Current Directory', but gnumake won't do it
since there is a 'lib' under 'apps'. Output:
gnumake: Nothing to be done for 'default'.
Why doesn't it understand the meaning of '.'?
It also drops the '.' in the --debug' output.
Only with a 'vpath %.c apps' it works as expected
off-course.
Besides I feel it's not very helpful explaining why
it won't do "Nothing..". E.g. if I make a typo:
default all: $(GEN_DIRS2)
it's the same bleeding message. Adding a '--debug=w',
would be nice with a 'why not' message. Only adding
'MAKEFLAGS += --warn-undefined-variables' is somewhat
helpful.
I'm using GNUmake 4.4.0.90 on Win-10.
--
--gv
- VPATH question,
Gisle Vanem <=