Commit cdff0fb4 authored by David Schleef's avatar David Schleef

orc: Fix distcheck problems in orc.mk

Add gst-indent to common, since orc.mk uses it to clean up
source files.
parent 09d712f4
......@@ -16,4 +16,6 @@ EXTRA_DIST = \
coverage/coverage-report.pl \
coverage/coverage-report.xsl \
coverage/coverage-report-entry.pl \
download-translations
download-translations \
gst-indent \
orc.mk
#!/bin/sh
#
# Check that the code follows a consistant code style
#
# Check for existence of indent, and error out if not present.
# On some *bsd systems the binary seems to be called gnunindent,
# so check for that first.
version=`gnuindent --version 2>/dev/null`
if test "x$version" = "x"; then
version=`indent --version 2>/dev/null`
if test "x$version" = "x"; then
echo "GStreamer git pre-commit hook:"
echo "Did not find GNU indent, please install it before continuing."
exit 1
fi
INDENT=indent
else
INDENT=gnuindent
fi
case `$INDENT --version` in
GNU*)
;;
default)
echo "GStreamer git pre-commit hook:"
echo "Did not find GNU indent, please install it before continuing."
echo "(Found $INDENT, but it doesn't seem to be GNU indent)"
exit 1
;;
esac
INDENT_PARAMETERS="--braces-on-if-line \
--case-brace-indentation0 \
--case-indentation2 \
--braces-after-struct-decl-line \
--line-length80 \
--no-tabs \
--cuddle-else \
--dont-line-up-parentheses \
--continuation-indentation4 \
--honour-newlines \
--tab-size8 \
--indent-level2 \
--leave-preprocessor-space"
$INDENT ${INDENT_PARAMETERS} $@
......@@ -16,28 +16,31 @@
#
#
ORC_SOURCES = $(ORC_BASE)orc.c $(ORC_BASE)orc.h
ORC_SOURCES = tmp-orc.c $(ORC_BASE)orc.h
#EXTRA_DIST = $(ORC_BASE).orc $(ORC_BASE)orc.c $(ORC_BASE)orc.h
EXTRA_DIST = $(ORC_BASE).orc
# This is needed if dist-hook-orc is not used
#EXTRA_DIST = $(ORC_BASE).orc $(ORC_BASE)orc-dist.c $(ORC_BASE)orc-dist.h
BUILT_SOURCES = $(ORC_SOURCES)
orc-update: $(ORC_BASE)orc.c $(ORC_BASE)orc.h
cp $(ORC_BASE)orc.c $(srcdir)/$(ORC_BASE)orc-dist.c
$(top_srcdir)/common/gst-indent $(srcdir)/$(ORC_BASE)orc-dist.c
orc-update: tmp-orc.c $(ORC_BASE)orc.h
$(top_srcdir)/common/gst-indent tmp-orc.c
cp tmp-orc.c $(srcdir)/$(ORC_BASE)orc-dist.c
cp $(ORC_BASE)orc.h $(srcdir)/$(ORC_BASE)orc-dist.h
if HAVE_ORC
$(ORC_BASE)orc.c: $(srcdir)/$(ORC_BASE).orc
$(ORCC) --implementation --include glib.h -o $(ORC_BASE)orc.c $(srcdir)/$(ORC_BASE).orc
tmp-orc.c: $(srcdir)/$(ORC_BASE).orc
$(ORCC) --implementation --include glib.h -o tmp-orc.c $(srcdir)/$(ORC_BASE).orc
$(ORC_BASE)orc.h: $(srcdir)/$(ORC_BASE).orc
$(ORCC) --header --include glib.h -o $(ORC_BASE)orc.h $(srcdir)/$(ORC_BASE).orc
else
$(ORC_BASE)orc.c: $(srcdir)/$(ORC_BASE).orc
cp $(srcdir)/$(ORC_BASE)orc-dist.c $(ORC_BASE)orc.c
tmp-orc.c: $(srcdir)/$(ORC_BASE).orc
cp $(srcdir)/$(ORC_BASE)orc-dist.c tmp-orc.c
$(ORC_BASE)orc.h: $(srcdir)/$(ORC_BASE).orc
cp $(srcdir)/$(ORC_BASE)orc-dist.h $(ORC_BASE)orc.h
......@@ -47,12 +50,17 @@ endif
clean-local: clean-orc
.PHONY: clean-orc
clean-orc:
rm -f $(ORC_BASE)orc.c $(ORC_BASE)orc.h
rm -f tmp-orc.c $(ORC_BASE)orc.h
dist-hook: dist-hook-orc
.PHONY: dist-hook-orc
dist-hook-orc: $(ORC_BASE)orc.c $(ORC_BASE)orc.h
cp $(ORC_BASE)orc.c $(srcdir)/$(ORC_BASE)orc-dist.c
$(top_srcdir)/common/gst-indent $(srcdir)/$(ORC_BASE)orc-dist.c
cp $(ORC_BASE)orc.h $(srcdir)/$(ORC_BASE)orc-dist.h
dist-hook-orc: tmp-orc.c $(ORC_BASE)orc.h
$(top_srcdir)/common/gst-indent tmp-orc.c
rm -f tmp-orc.c~
cmp -s tmp-orc.c $(srcdir)/$(ORC_BASE)orc-dist.c || \
cp tmp-orc.c $(srcdir)/$(ORC_BASE)orc-dist.c
cmp -s $(ORC_BASE)orc.h $(srcdir)/$(ORC_BASE)orc-dist.h || \
cp $(ORC_BASE)orc.h $(srcdir)/$(ORC_BASE)orc-dist.h
cp -p $(srcdir)/$(ORC_BASE)orc-dist.c $(distdir)/
cp -p $(srcdir)/$(ORC_BASE)orc-dist.h $(distdir)/
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