File: orc.mak

package info (click to toggle)
gst-plugins-bad1.0 1.0.8-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 36,832 kB
  • sloc: ansic: 297,908; cpp: 22,677; sh: 13,303; xml: 6,362; makefile: 4,867; perl: 1,435; objc: 1,273; python: 362; sed: 16
file content (76 lines) | stat: -rw-r--r-- 2,501 bytes parent folder | download | duplicates (56)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# This is a makefile.am fragment to build Orc code.
#
# Define ORC_SOURCE and then include this file, such as:
#
#  ORC_SOURCE=gstadderorc
#  include $(top_srcdir)/common/orc.mak
#
# This fragment will create tmp-orc.c and gstadderorc.h from
# gstadderorc.orc.
#
# When 'make dist' is run at the top level, or 'make orc-update'
# in a directory including this fragment, the generated source 
# files will be copied to $(ORC_SOURCE)-dist.[ch].  These files
# should be checked in to git, since they are used if Orc is
# disabled.
# 
# Note that this file defines BUILT_SOURCES, so any later usage
# of BUILT_SOURCES in the Makefile.am that includes this file
# must use '+='.
#


EXTRA_DIST = $(ORC_SOURCE).orc

ORC_NODIST_SOURCES = tmp-orc.c $(ORC_SOURCE).h
BUILT_SOURCES = tmp-orc.c $(ORC_SOURCE).h


orc-update: tmp-orc.c $(ORC_SOURCE).h
	$(top_srcdir)/common/gst-indent tmp-orc.c
	cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c
	cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h

orcc_v_gen = $(orcc_v_gen_$(V))
orcc_v_gen_ = $(orcc_v_gen_$(AM_DEFAULT_VERBOSITY))
orcc_v_gen_0 = @echo "  ORCC   $@";

cp_v_gen = $(cp_v_gen_$(V))
cp_v_gen_ = $(cp_v_gen_$(AM_DEFAULT_VERBOSITY))
cp_v_gen_0 = @echo "  CP     $@";

if HAVE_ORCC
tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc
	$(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --implementation --include glib.h -o tmp-orc.c $(srcdir)/$(ORC_SOURCE).orc

$(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc
	$(orcc_v_gen)$(ORCC) $(ORCC_FLAGS) --header --include glib.h -o $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE).orc
else
tmp-orc.c: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c
	$(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.c tmp-orc.c

$(ORC_SOURCE).h: $(srcdir)/$(ORC_SOURCE).orc $(srcdir)/$(ORC_SOURCE)-dist.c
	$(cp_v_gen)cp $(srcdir)/$(ORC_SOURCE)-dist.h $(ORC_SOURCE).h
endif

clean-local: clean-orc
.PHONY: clean-orc
clean-orc:
	rm -f tmp-orc.c $(ORC_SOURCE).h

dist-hook: dist-hook-orc
.PHONY: dist-hook-orc

# we try and copy updated orc -dist files below, but don't fail if it
# doesn't work as the srcdir might not be writable
dist-hook-orc: tmp-orc.c $(ORC_SOURCE).h
	$(top_srcdir)/common/gst-indent tmp-orc.c
	rm -f tmp-orc.c~
	cmp -s tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || \
	  cp tmp-orc.c $(srcdir)/$(ORC_SOURCE)-dist.c || true
	cmp -s $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || \
	  cp $(ORC_SOURCE).h $(srcdir)/$(ORC_SOURCE)-dist.h || true
	cp -p tmp-orc.c $(distdir)/$(ORC_SOURCE)-dist.c
	cp -p $(ORC_SOURCE).h $(distdir)/$(ORC_SOURCE)-dist.h