# Syntax: $(call COMPILE_idl_template,</path/to/src.idl>,<basename>)
define COMPILE_idl_template
+
ifeq ($$($(2)_IDL_TARGET),)
$(2)_IDL_TARGET=1
GEN_HEADERS+=$(filter %.h,$(notdir $(1:%.idl=%.h))) # Do we need this global variable?
idlserver_SERVER_IDL = test.idl
EOF
+create_idlcomp() {
cat > idlcomp <<EOF
#!/bin/sh
out=\$(basename \${1%.idl})
extern volatile int idl_stubs;" > \${out}.h
EOF
chmod +x idlcomp
+}
+create_idlcomp
cat > testclient.c <<EOF
#include "test.h"
needs_valid_CC
WVPASS make V=1 IDL_COMPILER=$PWD/idlcomp
+
+WVSTART "Two idl files in a program"
+create_idlcomp
+cat > test1.idl <<< "# IDL input for dummy IDL compiler"
+cat > test2.idl <<< "# IDL input for dummy IDL compiler"
+cat > testclient.c <<< "int main() {return 0;}"
+
+cat > Makefile.omk <<EOF
+bin_PROGRAMS = testclient
+INCLUDES=-I.
+
+testclient_SOURCES = testclient.c
+testclient_CLIENT_IDL = test1.idl test2.idl
+EOF
+cat > config.omk <<< IDL_COMPILER=$PWD/idlcomp
+
+WVPASS make