#!/bin/sh
#
# Author: Petter Reinholdtsen <pere@td.org.uit.no>
#
# Run simple Store config file through m4 to generate the complete
# config file.

tmpfile=/tmp/storeconfig.$$
M4=m4
if test -f /store/etc/internal/storeconfig.m4; then
  incdir=/store/etc/internal
else
  incdir=.
fi

(
    echo "include(storeconfig.m4)"
    echo "include($*)"
) > $tmpfile

$M4 -I$incdir $tmpfile

rm -f $tmpfile
