automake
[Top][All Lists]
Advanced

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

pkgincludedir, pkglibdir and config.status


From: Konstantin Osipov
Subject: pkgincludedir, pkglibdir and config.status
Date: Mon, 31 Jan 2005 14:35:58 +0300

Hello

We have a list of templates of .sh scripts, which so far were used in 
conjunction with sed to generate the install-ready scripts.

The rule to make a real script from template was like

.sh:
    @SED@ \
      -e 's!@''bindir''@!$(bindir)!g' \
      -e 's!@''pkglibdir''@!$(pkglibdir)!g' \
      ...

It worked OK except that we had to change Makefile.am whenever we had been
adding a new variable to substitute.

So recently we tried to use config.status to parse the files instead of
sed, like:
.sh:
  $SHELL $(top_builddir)/config.status address@hidden:$@

The only problem with this solution is that config.status doesn't know
about automake variables such as pkglibdir, pkgincludedir, etc - it turned
out that they are expelled by automake when it creates  Makefile.in's.
So I had to look at all .sh templates and substitute, say, $pkglibdir
with $libdir/@address@hidden

Why not make pkglibdir and friend awailable in config.status?
Is there a problem with the approach I'm trying to employ?

A slightly modified approach is to add all scripts to AC_OUTPUT_FILES but
as the above is shorter and works just as well, and, moreover, guarantees
that templates are rebuilt by make whenever they're changed (even if there is no
automatic dependency tracking), we've stuck to it for now.

Thank you in advance for your help,

-- 
Konstantin Osipov




reply via email to

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