help-make
[Top][All Lists]
Advanced

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

"vpath" not working the way i expected


From: Robert P. J. Day
Subject: "vpath" not working the way i expected
Date: Tue, 22 Feb 2005 12:04:11 -0500 (EST)

  for the first time, i incorporated "vpath" into a makefile and it's
not working the way i expected it to based on the docs.  the salient
bits of the makefile:

-------

vpath %.o ${BLDOSD}

${BLDOSD}/${TARGETDRV}: ${OBJS}
        ${CROSS_LD} $(LINKOPTS) $(LDFLAGS) -r $^ -o $@

${OBJS}: %.o: %.c
        @if [ ! -d $(BLDOSD) ]; then mkdir -p $(BLDOSD); fi
        ${CROSS_CC} ${CPP_INCLUDES} ${DEFINES} -c $< -o ${BLDOSD}/$@

-----

  in short, the sources are in the current directory, but i want to
build both the corresponding object files and the kernel driver in the
arch-specific ${BLDOSD} directory.

  everything goes swimmingly (object files created nicely under that
directory), but in the rule for ${BLDOSD}/${TARGETDRV}, the "$^"
variable appears to contain just the short names of the object files
-- "vpath" is not taken into account despite the fact that the
dependencies testing seems to find them.

  am i doing something trivially wrong here?

rday




reply via email to

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