[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
using $(patsubst) and $(shell) together
From: |
Nehal Mistry |
Subject: |
using $(patsubst) and $(shell) together |
Date: |
Sat, 23 Nov 2002 11:59:03 -0800 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020605 |
Hi,
i have a variable:
OBJ = src/ai/ai_magic.o src/ai/ai_plan.o
and so on... i want to convert it so that there is an '/obj'
between the basename and dirname... so it would be:
OBJ_2 = src/ai/obj/ai_magic.o src/ai/obj/ai_plan.o
so i tried doing this, but it did not work:
OBJ_2 = $(patsubst %, $(shell dirname %)/obj/$(shell basename %),
$(OBJ))
i think dirname and basename are not converting % correctly.
can someone help me out please
thx, Nehal
- using $(patsubst) and $(shell) together,
Nehal Mistry <=