Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-11-2010, 01:27 AM   #1
sonu kumar
LQ Newbie
Registered: Aug 2009
Location: India
Distribution: open suse
Posts: 28

Rep: Reputation: 17
Red face VPATH mechanism in make file

hi dear all,

i want to know, what is vpath mechanism in makefile?

i did google search this,but i couldn't understand it as i am beginner in linux os.

can anybody tell me? or either give me few simple links related to vpath mechanism.


Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-11-2010, 11:42 AM   #2
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
Google .. vpath ..
The first hit says : How Not to Use VPATH
QUOTE : "..rather than the current directory, is by prefixing all the
targets with that directory path. In other words, VPATH is useless
to us for this purpose.
QUOTE.. (with line numbers from 'grep -n vpath make_4.txt'
(html2txt make_4.html))

163: directory `src'. The |vpath| Directive Similar to the |VPATH| variable
164: but more selective is the |vpath| directive (note lower case), which
169: the |vpath| directive: |vpath pattern directories| Specify the search
173: variable. |vpath pattern| Clear out the search path associated with
174: pattern. |vpath| Clear all search paths previously specified with
175: |vpath| directives. A |vpath| pattern is a string containing a `%'
181: exactly, which is not useful very often.) `%' characters in a |vpath|
188: if the pattern in a |vpath| directive matches the name of the
191: example, vpath %.h ../headers tells |make| to look for any dependency
193: not found in the current directory. If several |vpath| patterns match
194: the dependency file's name, then |make| processes each matching |vpath|
196: directive. |make| handles multiple |vpath| directives in the order in
198: pattern are independent of each other. Thus, vpath %.c foo vpath %
199: blish vpath %.c bar will look for a file ending in `.c' in `foo', then
200: `blish', then `bar', while vpath %.c foo:bar vpath % blish will look
219: specified in |VPATH| or with |vpath| also happens during consideration
237: specified by matching |vpath| search paths and the |VPATH| search path,

Parallel Build Trees (a.k.a. VPATH Builds)

.. And then also ... another 733,000 hits .. .. ..

Last edited by knudfl; 01-11-2010 at 11:45 AM.
2 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help needed for make file problem : make: *** No rule to make target `flash', needed rameshsatyavaram Linux - Newbie 3 09-11-2008 02:13 AM
regarding VPATH in makefiles utkarshrawat Linux - General 5 10-02-2007 12:03 PM
Linux Traditional File Access Mechanism dolphine Linux - General 2 09-27-2006 02:43 PM
I accidentally deleted make file in /usr/local/bin, now cannot use make command.... Niceman2005 Linux - Software 2 11-17-2004 07:55 PM
specfying vpath in make files help gauravsahni Programming 0 11-10-2004 04:30 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration