[Top][All Lists]
[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.
Thanx Cal
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
- search for dependancy fails,
Cal McPherson <=