#! /bin/sh -e

# DP: build protoize/unprotoize binaries

if [ $# -eq 3 -a "$2" = '-d' ]; then
    pdir="-d $3"
elif [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi
case "$1" in
    -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0;;
    -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0;;
    *)
	echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
	exit 1
esac
exit 0

--- gcc/Makefile.in~	2004-02-21 12:42:04.000000000 +0100
+++ gcc/Makefile.in	2004-02-21 12:42:59.000000000 +0100
@@ -121,7 +121,7 @@
 
 # Selection of languages to be made.
 CONFIG_LANGUAGES = @all_languages@
-LANGUAGES = c gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
+LANGUAGES = c proto gcov$(exeext) gcov-dump$(exeext) $(CONFIG_LANGUAGES)
 
 # Selection of languages to be made during stage1 build.
 BOOT_LANGUAGES = c @all_boot_languages@
