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


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to