help-make
[Top][All Lists]
Advanced

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

search for dependancy fails


From: Cal McPherson
Subject: search for dependancy fails
Date: Fri, 29 Jun 2001 11:29:27 -0000

Hi,
    I'm having a pisser of a problem with gnu make on redhat(7.1) linux(2.4.2-2smp).  I'm sure there's an obvious explanation for it but I just cannot get make to recognise a header in a different directory using either absolute/relative pathnames or VPATH, vpath.
 
When I run make with the following setup I get the error:
 
allocatlor.c:5:23: allocator.h: No such file or directory
make: *** [allocator.o] Error 1
 
I have the following files:
/mydir/inc/allocator.h
/mydir/src/allocator.c
/mydir/src/makefile
 
makefile looks like this:
 
 ##########################################
# my makefile
env %.h ../inc    # doesnt work with full path either
VPATH = ../inc # doesnt work with full path either
# by the way one of the above is commented out when the other is in use
 
all: allocator.o
allocator.o allocator.h  #doesnt work if i use absolute or relative path here..eg ../inc/allocator.hk
 
# end of makefile
###########################################
 
I'm using implicit rules here to be short and sweet but explicitly it doesnt work either.
I can get allocator.o to work ONLY if the #include is double quoted in allocator.c(ie #include "allocator.h" ) and the file allocator.h is in the src directory where the makefile resides.
 
Saw a link to you guys from http://www.paulandlesley.org/gmake/  so just sending a (not quite) last resort email while I try and figure out the problem.  Any ideas?
 
Thanx Cal


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


reply via email to

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