summaryrefslogtreecommitdiff
path: root/writemain
blob: 667030939c4370c4c8f32269d4b798e9c5ffc543 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
: This script takes the plain miniperlmain.c and writes out perlmain.c
: which includes all the extensions.
: The command line arguments name extensions to be used.
:  E.g.:  sh writemain SDBM_File POSIX > perlmain.c
:
args="$*"
if test X"$args" = "X" ; then
    cat miniperlmain.c
else
    sed '/Do not delete this line--writemain depends on it/q' miniperlmain.c
    cat << 'EOP'

#ifdef USE_DYNAMIC_LOADING
    boot_DynamicLoader();
#endif

EOP
    for ext in $args; do
	echo "    newXSUB(\"${ext}::bootstrap\", 0, boot_${ext}, file);"
    done
    echo '}'
fi