help-make
[Top][All Lists]
Advanced

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

implicit rule for relative paths?


From: gk
Subject: implicit rule for relative paths?
Date: Wed, 09 Oct 2002 08:52:54 -0700

Hi all,

I am trying to find the cleanest way of writing a Makefile to only make targets in the current directory and handle all other files differently.

I can write an implicit rule to handle all files with an absolute path but not a relative path.
This is because you cannot use '%' wildcard char more than once:
/% : works
%/% : doesn't work

For example, this works for absolute paths:

foo: $(CURDIR)/goo/goo.xms
        @echo $@
        @touch $@
/% :
        @: $(call cdtouch,$@)

cdtouch = $(shell \
        cd $(dir $(1)); touch $(notdir $(1))\
)

Any ideas on how I can handle all relative paths?
Thanks,
Greg Keraunen <address@hidden>




reply via email to

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