#!/bin/sh
if test ! -f .flavor ; then
    cat << END
/*
 * version.h 
 * Automatically generated
 */
#define ASTERISK_VERSION "${ASTERISKVERSION}"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}

END
elif test ! -f .version ; then
    aadkflavor=`cat .flavor`
    cat << END
/*
 * version.h 
 * Automatically generated
 */
#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor})"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}

END
else
    aadkver=`cat .version`
    aadkflavor=`cat .flavor`
    cat << END
/*
 * version.h 
 * Automatically generated
 */
#define ASTERISK_VERSION "${ASTERISKVERSION} (${aadkflavor} ${aadkver})"
#define ASTERISK_VERSION_NUM ${ASTERISKVERSIONNUM}

END
fi

