cairo/test/make-cairo-test-constructors.sh
Chris Wilson 51bd27afa1 [boilerplate/test] Convert make-*-constructors to shell
Remove the intermediate C program that was a nuisance whilst
cross-compiling and replace it with a simple shell script that is just a
combination of cat + sed.
2009-08-06 10:11:32 +01:00

24 lines
408 B
Bash

#!/bin/sh
cat <<HERE
/* WARNING: Autogenerated file - see $0! */
#include "cairo-test-private.h"
void _cairo_test_runner_register_tests (void);
HERE
cat "$@" | sed '/^CAIRO_TEST/!d; s/CAIRO_TEST.*(\(.*\),.*/extern void _register_\1 (void);/'
cat <<HERE
void
_cairo_test_runner_register_tests (void)
{
HERE
cat "$@" | sed '/^CAIRO_TEST/!d; s/CAIRO_TEST.*(\(.*\),.*/ _register_\1 ();/'
echo "}"