summaryrefslogtreecommitdiff
path: root/src/bin/pgtclsh/mkMakefile.tkdefs.sh.in
blob: b739547f7933018227e12c01311a7dda5e5f5853 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh

if [ ! -r @TK_CONFIG_SH@ ]; then
    echo "@TK_CONFIG_SH@ not found"
    echo "I need this file! Please make a symbolic link to this file"
    echo "and start make again."
    exit 1
fi

# Source the file to obtain the correctly expanded variable definitions
. @TK_CONFIG_SH@

# Read the file a second time as an easy way of getting the list of variable
# definitions to output.
cat @TK_CONFIG_SH@ |
    egrep '^TCL_|^TK_' |
    sed 's/^\([^=]*\)=.*$/\1/' |
    while read var
    do
	eval echo "\"$var = \$$var\""
    done >Makefile.tkdefs

exit 0