Hi Cal.

I'll take a stab at the problem.  It looks like a compiler error -- just
because GNU make knows where to find dependency files (the header), doesn't
mean the C preprocessor knows where to find them.

Are you sure you're specifying -I ../inc in your compiler options?

     chad loder





"Cal McPherson" <[EMAIL PROTECTED]>@gnu.org on 06/29/2001 07:29:27
AM

Sent by:  [EMAIL PROTECTED]


To:   [EMAIL PROTECTED]
cc:

Subject:  search for dependancy fails

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.


_______________________________________________ Help-make mailing list
[EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make








_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to