You have several problems here:
1. VPATH/vpath usage. VPATH/vpath are features not macro functions.
Try instead:
vpath %.texi /home/ssharma/docs-project/docs/src/
or
VPATH = /home/ssharma/docs-project/docs/src/
2. your 'install' commands must be changed to macros that will
evaluate to the dependency names as found via VPATH.
3. you should consider using pattern rules rather than the obsolete
suffix rules.
HTH
tim
On Wed, Sep 13, 2000 at 10:26:57AM -0700, Sudhir Sharma wrote:
> The following makefile searches the current directory for files that end in
> the suffix ".texi" and apply certain suffix rules to the specified targets.
>
> # Makefile for conversion and installation of Brightmail documentation
>
> .SUFFIXES : .texi .info .html .man
>
> TEXI_SRC:=${wildcard *.texi}
>
> ROFF_TRANSLATOR = texi2roff
> MACRO_PKG = -ms
> SAFE_MACRO_PKG = -It
> ROFF_UTIL = troff
> ROFF_OPT = -a
>
> .texi.info : # convert texinfo source files into formatted info pages
> makeinfo $< > $*.info
>
> .info.html : # convert info files into formatted html pages
> ./info2html $< > $*.html
>
> .texi.man : # convert texinfo source files into formatted man pages
> make ${ROFF_TRANSLATOR}
> ./${ROFF_TRANSLATOR} ${MACRO_PKG} ${SAFE_MACRO_PKG} $< |
> ${ROFF_UTIL} ${ROFF_OPT} ${MACRO_PKG} | col > $*.man
>
> all : ${TEXI_SRC:.texi=.info} ${TEXI_SRC:.texi=.html} ${TEXI_SRC:.texi=.man}
> install
>
> install : ${TEXI_SRC:.texi=.info} ${TEXI_SRC:.texi=.html}
> ${TEXI_SRC:.texi=.man}
> mv ${TEXI_SRC:.texi=.info} /home/ssharma/docs-proj/docs/info/
> mv ${TEXI_SRC:.texi=.html} /home/ssharma/docs-proj/docs/html/
> mv ${TEXI_SRC:.texi=.man} /home/ssharma/docs-proj/docs/man/
>
> But all the ".texi" files reside in another directory
> /home/ssharma/docs-project/docs/src/. I have consulted the GNU Make User's
> Manual and have attempted the following:
> TEXI_SRC:=${vpath %.texi src}
> instead of:
> TEXI_SRC:=${wildcard *.texi}
> as src is a subdirectory to the current directory.
>
> But it seems that make isn't searching the directory "src" and leaving the
> macro "TEXI_SRC" empty. If "vpath %.texi src" returns the ".texi" files from
> the directory "src", shouldn't this be valid?
>
> Sudhir Sharma
>
>
>