[glug-t] Re: Automake dependencies

Muthiah Annamalai <dearestchum@xxxxxxxxxxx> writes:

> Hello there!
> --- Vijay Kumar <vijaykumar@xxxxxxxxxxxx> wrote:
> 
> > dir.h: Makefile
> >     echo '#define DATA_DIR "$(pkgdatadir)"' >$@
> 
> If all you want is get the DATA_DIR definition in your
> code/header files, generate it from your 
> ./configure.in like this.
> 
> DATA_DIR = $(pkgdatadir)
> AC_SUBST(DATA_DIR)

Well, I did try that. But then, DATA_DIR expanded to ${prefix}/share/bricks

The autoconf manual says that, ${prefix} will expand only when you run
make. That's why we generate dir.h when the user runs make.

This magic :-) is explained in 
http://asis.web.cern.ch/asis/products/GNU.DVP/autoconf-2.59/autoconf_17.html

The above link also provides better ways to tackle it. But my real
problem is why aren't the header files in the dependencies? 

Vijay

-- 
Free the Code,
Free the User.

---------------------------------------------------------------
To unsubscribe send a mail to glug_t-request@xxxxxxxxxxxxx with 
'unsubscribe' as subject.

Website: http://glugt.linuxisle.com

Other related posts: