From ee01449efdd2ad697588790fa9fa1ddcc3ba6d89 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 16 Sep 2004 15:24:10 +0000 Subject: [PATCH] Build scripts & automatic generation of FFI files --- build | 26 ++++++++++++++++++++++++++ build.sml | 4 ++++ libpq/FFI/.cvsignore | 4 +++- libpq/build.sml | 4 ++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100755 build create mode 100644 build.sml create mode 100644 libpq/build.sml diff --git a/build b/build new file mode 100755 index 0000000..e025e3e --- /dev/null +++ b/build @@ -0,0 +1,26 @@ +#!/bin/sh + +SMLBIN=/usr/local/sml/bin +POSTGRES_INCLUDE=/usr/include/postgresql + +if [ -d .cm ] ; then + rm -rf .cm +fi +if [ -d libpq/.cm ] ; then + rm -rf libpq/.cm +fi +if [ -d libpq/FFI/.cm ] ; then + rm -rf libpq/FFI/.cm +fi + +if ! cat build.sml | $SMLBIN/sml ; then + exit 1 +fi + +cd libpq + +$SMLBIN/ml-nlffigen -d FFI -lh LibpqH.libh -include ../libpq-h.sml -cm libpq.h.cm -D__builtin_va_list="void*" $POSTGRES_INCLUDE/libpq-fe.h + +if ! cat build.sml | $SMLBIN/sml ; then + exit 1 +fi \ No newline at end of file diff --git a/build.sml b/build.sml new file mode 100644 index 0000000..c3522b5 --- /dev/null +++ b/build.sml @@ -0,0 +1,4 @@ +(if CM.recomp "smlsql.cm" andalso CM.stabilize true "smlsql.cm" then + OS.Process.exit OS.Process.success + else + OS.Process.exit OS.Process.failure) : unit; \ No newline at end of file diff --git a/libpq/FFI/.cvsignore b/libpq/FFI/.cvsignore index 854c999..aa5bb9a 100644 --- a/libpq/FFI/.cvsignore +++ b/libpq/FFI/.cvsignore @@ -1,2 +1,4 @@ .cm -CM \ No newline at end of file +CM +*.sml +*.cm \ No newline at end of file diff --git a/libpq/build.sml b/libpq/build.sml new file mode 100644 index 0000000..782b4b6 --- /dev/null +++ b/libpq/build.sml @@ -0,0 +1,4 @@ +(if CM.recomp "sources.cm" andalso CM.stabilize true "sources.cm" then + OS.Process.exit OS.Process.success + else + OS.Process.exit OS.Process.failure) : unit; \ No newline at end of file -- 2.20.1