Commit bb99a76a authored by Colomban Wendling's avatar Colomban Wendling

LibOVCC: use mktemp in the build system for better portability

MacOS X don't seem to have tempfile, so use mktemp.  Aditionnally it
requires the template to be given, so be kind give it.
parent 1de4c077
......@@ -44,12 +44,12 @@ $(lib_LTLIBRARIES): stamp-hack
# FIXME: how to force re-generation of ovcc.h and ovcc.vapi if they got removed?
stamp-hack: ovcc.h ovcc.vapi
(f=`tempfile`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
(f=`mktemp $@.XXXXXXXXXX`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
ovcc_h=ovcc.h; [ -f "$$ovcc_h" ] || ovcc_h="$(srcdir)/$$ovcc_h"; \
cat $(srcdir)/hack.h "$$ovcc_h" | sed '/<hack.h>/d'> "$$f" && \
(echo "/* this file is auto-generated, do not modify it */" && \
cat "$$f") > ovcc.h)
(f=`tempfile`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
(f=`mktemp $@.XXXXXXXXXX`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
ovcc_vapi=ovcc.vapi; [ -f "$$ovcc_vapi" ] || ovcc_vapi="$(srcdir)/$$ovcc_vapi"; \
cat $(srcdir)/hack.vapi "$$ovcc_vapi" | sed 's~"\(hack\|ovcc\).h"~"ovcc/ovcc.h"~g' > "$$f" && \
(echo "/* this file is auto-generated, do not modify it */" && \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment