tinyproxy/etc/Makefile.am
Michael Adam 1fda61b5a0 generate etc/tinyproxy.conf from a tinyproxy.conf.in template
This is a first cut at providing a tinyproxy.conf file with
more useful default or example directories. It uses datadir,
sysconfdir and localstatedir.

Because automake is a little special here, this template can
not simply be processed by configure (AC_CONFIG_FILES(...)),
as these variables can only be used like this in makefiles.
Instead, we need a little sed-processor in the Makfile in etc/.

Michael
2009-10-10 00:58:55 +02:00

21 lines
441 B
Makefile

sysconf_DATA = \
tinyproxy.conf
EXTRA_DIST = \
$(sysconf_DATA)
edit = sed \
-e 's|@bindir[@]|$(bindir)|g' \
-e 's|@datadir[@]|$(datadir)|g' \
-e 's|@datarootdir[@]|$(datarootdir)|g' \
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
-e 's|@localstatedir[@]|$(localstatedir)|g' \
-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
-e 's|@prefix[@]|$(prefix)|g'
tinyproxy.conf: tinyproxy.conf.in
rm -f $@ $@.tmp
$(edit) $@.in >$@.tmp
mv $@.tmp $@