bug-make
[Top][All Lists]
Advanced

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

Problem with absolute path


From: Juergen Schmidt
Subject: Problem with absolute path
Date: Wed, 30 Jun 2004 18:09:53 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616

Hi,

i have problem with make when i try to generate the output anywhere and using an absolute path. Please see my simple test makefile (when i run make i am in /local/test/maketest where the source "maketest.c" is located):

**********************************************************
OUT=/local/test/maketest/myoutputdir
#OUT=./myoutputdir

.PHONY: ALL
ALL : Maketest

.SECONDARY:

$(OUT)/obj/%.o : %.c
   mkdir -p $(@D)
   gcc -c $< -o $(OUT)/obj/$*.o

$(OUT)/bin/% : $(OUT)/obj/%.o
   mkdir -p $(@D)
   gcc -o $@ $<


Maketest : $(OUT)/bin/maketest
   @echo "**************************"
   @echo " Maketest build succesful"
   @echo ""
   @echo " make maketest.run"
   @echo "**************************"


%.run : $(OUT)/bin/%
   cd $(<D) && $*
**********************************************************

The source is trivail and it should be simply build.

When i change the variable OUT to a relative path (the second verson of OUT) everything works fine. Do i make something wrong?

Regards Juergen





reply via email to

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