This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Removing dependencies


Bill Moseley wrote:
> I'm also finding on non GNU-make (like on BSD) that I cannot build in a
> separate build directory -- that I need to build where I untar the source.
> Otherwise make thinks the targets do not exist.  I assume that's because
> VPATH only applies to source files not targets as well?  Or it my Makefile
> that is the problem?

I think your makefile has the problem.  I am sure that others will
correct me if I am totally mistaken.

> doc_DATA = \
> 	INSTALL \
> 	README
> 
> INSTALL: $(top_srcdir)/pod/INSTALL.pod
> 	-rm -f $(top_srcdir)/INSTALL
> 	-pod2text $(top_srcdir)/pod/INSTALL.pod > $(top_srcdir)/INSTALL
> 
> README: $(top_srcdir)/pod/README.pod
> 	-rm -f $(top_srcdir)/README
> 	-pod2text $(top_srcdir)/pod/README.pod > $(top_srcdir)/README

I think the problem is that you are building into $(top_srcdir) but
you should be building into $(top_builddir).  When you build in the
same directory as you untar these two directories are the same and
things work.  But when you try to build in a build dir they are
different and therefore missing there.

Try this instead.

INSTALL: $(top_srcdir)/pod/INSTALL.pod
	-rm -f $(top_srcdir)/INSTALL
	-pod2text $(top_srcdir)/pod/INSTALL.pod > $(top_builddir)/INSTALL

README: $(top_srcdir)/pod/README.pod
	-rm -f $(top_srcdir)/README
	-pod2text $(top_srcdir)/pod/README.pod > $(top_builddir)/README

In a nutshell all built targets need to be either relative or use
top_builddir.

Bob



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]