[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Defining variables shared between files

From: Ralf Wildenhues
Subject: Re: Defining variables shared between files
Date: Wed, 7 Oct 2009 22:37:21 +0200
User-agent: Mutt/1.5.20 (2009-08-09)


please don't top-post, thanks.

* vicious3030 wrote on Fri, Oct 02, 2009 at 11:29:34PM CEST:
> Ralf Wildenhues wrote:
> > You can either
> >   AC_SUBST([thirdPartyPath], [/home/blah/third])
> > 
> > in, or have a common fragment that you
> >   include
> > 
> > in each
> > 
> > I suggest using the former, and also making the path configurable/
> > overridable.  Fixed paths are likely going to be wrong on your users'
> > systems.

> How do I make the variable "configurable"?

For example with --with-<package> or --enable-<feature> options; see
  info Autoconf "External Software"
  info Autoconf "Package Options"

> Additionally, is there a way I can call a shell command during the build:
> specifically, due to typos there are a number of "*.H" as opposed to "*.h"
> rather than fixing that issue I'd like to simply make a rule like:
>    typofile.H: typofile.h
>           ln -s typofile.h typofile.H
> This would have to be defined in the right?

Yes.  You can write normal make rules in a file; they will
be copied into the Makefile.

Your proposed rule above has two problems: If you (or a user of your
package) uses a VPATH build (see info Automake "VPATH Builds"), the
source will not be right for non-generated headers; you need to prefix
typofile.h with '$(srcdir)/'.

Another problem occurs when your package is to be compiled on file
systems that are case-insensitive.  If I were you, I'd simply correct
the typos in the source files.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]