view src/mkops @ 5018:1c65a8e44ef9 ss-2-1-59

[project @ 2004-09-22 03:33:29 by jwe]
author jwe
date Wed, 22 Sep 2004 03:33:29 +0000
parents 02fcb550f20c
children c1b66b74937d
line wrap: on
line source

#!/bin/sh

SED=${SED:-'sed'}

cat << \EOF
// DO NOT EDIT!  Generated automatically by mkbuiltins.

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

extern void install_base_type_conversions (void);

EOF

for file in "$@"; do
  f=`echo $file | $SED 's,^\./,,; s%^OPERATORS/op-%%; s%\.cc%%; s%-%_%g'`
  echo "extern void install_${f}_ops (void);"
done

cat << \EOF

void
install_ops (void)
{
  install_base_type_conversions ();

EOF

for file in "$@"; do
  f=`echo $file | $SED 's,^\./,,; s%^OPERATORS/op-%%; s%\.cc%%; s%-%_%g'`
  echo "  install_${f}_ops ();"
done

cat << \EOF
}
EOF

exit 0