List Info

Thread: some vpath help




some vpath help
user name
2006-05-04 18:29:11
Here is my makefile test case.  Unfortunately you cannot run
it.

PRD_TREE := /makefile_test/dev/bp1497/v0607/PRODUCT_TREE
SRC_TREE := /makefile_test/dev/bp1497/v0607/SOURCE_TREE
targets+ldb+celltools+tst := 
$(PRD_TREE)/ldb/celltools/bin/DBC_Util.tix
\
                             
$(PRD_TREE)/ldb/celltools/bin/GUI.tix
\
 
$(PRD_TREE)/ldb/celltools/bin/Infrastruct.tix \
                             
$(PRD_TREE)/ldb/celltools/bin/Math.tix
\
                             
$(PRD_TREE)/ldb/celltools/bin/Messager.tix
\
                             
$(PRD_TREE)/ldb/celltools/bin/MsgCodes.tix
\
                             
$(PRD_TREE)/ldb/celltools/bin/OraTcl.tix
\
                             
$(PRD_TREE)/ldb/celltools/bin/TclVSrpt.tix


all : $(targets+ldb+celltools+tst)

$(PRD_TREE)/ldb/celltools/bin/%.tix : \
  vpath $(PRD_TREE)/ldb/celltools/bin/%.tix \
  $(SRC_TREE)/ldb/celltools/pub
$(PRD_TREE)/ldb/celltools/bin/%.tix :
$(SRC_TREE)/ldb/celltools/tst/src/%.tix
        /usr/bin/cp $< $

the $(PRD_TREE)/ldb/celltools and the
$(SRC_TREE)/ldb/celltools/tst
are created by foreach loops 

when I try to run this I get:

make -f z
make: *** No rule to make target
`/makefile_test/dev/bp1497/v0607/PRODUCT_TREE/ldb/celltools/
bin/DBC_Util
.tix', \
needed by `all'.  Stop.

What is wrong?


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
some vpath help
user name
2006-05-04 18:35:19
%% "PATTON, BILLY \(SBCSI\)" <BP1497att.com> writes:

  pb> $(PRD_TREE)/ldb/celltools/bin/%.tix : \
  pb>   vpath $(PRD_TREE)/ldb/celltools/bin/%.tix \
  pb>   $(SRC_TREE)/ldb/celltools/pub

  pb> What is wrong?

I don't think you read the replies you got.  The ones where
people told
you that you couldn't put variable settings and
prerequisites on the
same line.

Just think, for a second, about how this looks to make after
make gets
done with the backslash/newline removal:

  > $(PRD_TREE)/ldb/celltools/bin/%.tix : vpath
$(PRD_TREE)/ldb/celltools/bin/%.tix
$(SRC_TREE)/ldb/celltools/pub

How in the world is make supposed to interpret THAT and get
what you
intended?


Second, "vpath
$(PRD_TREE)/ldb/celltools/bin/%.tix" is NOT a variable
setting, so you can't use it as a target-specific variable.

And finally, setting VPATH as a target-specific variable
won't work: as
discussed in the manual target-specific variables are ONLY
operative
inside the command script.  Obviously by the time make gets
around to
running a command script it's already long since found the
target and
prerequisites and chosen a rule.

-- 
------------------------------------------------------------
-------------------
 Paul D. Smith <psmithgnu.org>          Find
some GNU make tips at:
 http://www.gnu.org        
             http://make.paulandlesl
ey.org
 "Please remain calm...I may be mad, but I am a
professional." --Mad Scientist


_______________________________________________
Help-make mailing list
Help-makegnu.org
http:
//lists.gnu.org/mailman/listinfo/help-make
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )