spec update tools install fixes
[platform/upstream/gstreamer.git] / tools / Makefile.am
1 ### assemble a list of programs we want to build and install
2 if GST_DISABLE_REGISTRY
3 GST_REGISTRY_SRC = 
4 GST_REGISTRY_SRC_V = 
5 else
6 GST_REGISTRY_SRC = gst-register
7 GST_REGISTRY_SRC_V = gst-register-@GST_MAJORMINOR@
8 endif
9
10 if GST_DISABLE_LOADSAVE
11 GST_LOADSAVE_SRC = 
12 GST_LOADSAVE_SRC_V = 
13 else
14 GST_LOADSAVE_SRC = gst-complete gst-compprep gst-xmllaunch
15 GST_LOADSAVE_SRC_V = \
16         gst-complete-@GST_MAJORMINOR@ \
17         gst-compprep-@GST_MAJORMINOR@ \
18         gst-xmllaunch-@GST_MAJORMINOR@
19 endif
20
21 GST_OTHER_SRC = \
22         gst-feedback \
23         gst-inspect \
24         gst-launch \
25         gst-md5sum \
26         gst-typefind \
27         gst-xmlinspect
28 GST_OTHER_SRC_V = \
29         gst-inspect-@GST_MAJORMINOR@ \
30         gst-launch-@GST_MAJORMINOR@ \
31         gst-md5sum-@GST_MAJORMINOR@ \
32         gst-typefind-@GST_MAJORMINOR@ \
33         gst-xmlinspect-@GST_MAJORMINOR@
34
35 ### so all of the programs we want to build
36 bin_PROGRAMS = \
37         $(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V) \
38         $(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
39         $(GST_OTHER_SRC) $(GST_OTHER_SRC_V)
40 bin_SCRIPTS = gst-feedback-@GST_MAJORMINOR@
41
42 # make sure each versioned tool has the right source file
43 if !GST_DISABLE_REGISTRY
44 gst_register_@GST_MAJORMINOR@_SOURCES = gst-register.c
45 endif
46 if !GST_DISABLE_LOADSAVE
47 gst_complete_@GST_MAJORMINOR@_SOURCES = gst-complete.c
48 gst_compprep_@GST_MAJORMINOR@_SOURCES = gst-compprep.c
49 gst_xmllaunch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
50 endif
51 gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
52 gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
53 gst_md5sum_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c
54 gst_typefind_@GST_MAJORMINOR@_SOURCES = gst-typefind.c
55 gst_xmlinspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
56
57 # make sure each unversioned tool comes from gst-run.c
58 if !GST_DISABLE_REGISTRY
59 gst_register_SOURCES = gst-run.c
60 endif
61 if !GST_DISABLE_LOADSAVE
62 gst_complete_SOURCES = gst-run.c
63 gst_compprep_SOURCES = gst-run.c
64 gst_xmllaunch_SOURCES = gst-run.c
65 endif
66 gst_feedback_SOURCES = gst-run.c
67 gst_inspect_SOURCES = gst-run.c
68 gst_launch_SOURCES = gst-run.c
69 gst_md5sum_SOURCES = gst-run.c
70 gst_typefind_SOURCES = gst-run.c
71 gst_xmlinspect_SOURCES = gst-run.c
72
73 # set correct compile and link flags for all, as well as for specific
74 AM_CFLAGS = $(GST_CFLAGS)
75 AM_LDFLAGS = $(GST_LIBS)
76
77 gst_inspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
78
79 gst_xmlinspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
80
81 ### man pages we want to install
82 if GST_DISABLE_REGISTRY
83 GST_REGISTRY_MAN=
84 else
85 GST_REGISTRY_MAN = gst-register-@GST_MAJORMINOR@.1
86 endif
87
88 if GST_DISABLE_LOADSAVE
89 GST_LOADSAVE_MAN=
90 else
91 GST_LOADSAVE_MAN = \
92         gst-complete-@GST_MAJORMINOR@.1 \
93         gst-compprep-@GST_MAJORMINOR@.1 \
94         gst-xmllaunch-@GST_MAJORMINOR@.1
95 endif
96
97 GST_OTHER_MAN = \
98         gst-feedback-@GST_MAJORMINOR@.1 \
99         gst-inspect-@GST_MAJORMINOR@.1 \
100         gst-launch-@GST_MAJORMINOR@.1 \
101         gst-md5sum-@GST_MAJORMINOR@.1 \
102         gst-typefind-@GST_MAJORMINOR@.1
103 #       gst-xmlinspect-@GST_MAJORMINOR@.1
104
105 manpages = $(GST_REGISTRY_MAN) $(GST_LOADSAVE_MAN) $(GST_OTHER_MAN)
106
107 CLEANFILES = $(manpages)
108 man_MANS = $(manpages)
109
110 EXTRA_DIST = \
111         gst-complete.1.in \
112         gst-compprep.1.in \
113         gst-feedback.1.in \
114         gst-inspect.1.in \
115         gst-launch.1.in \
116         gst-md5sum.1.in \
117         gst-register.1.in \
118         gst-typefind.1.in \
119         gst-xmllaunch.1.in \
120         gst-feedback-@GST_MAJORMINOR@
121
122 %-@GST_MAJORMINOR@.1: %.1.in
123         sed \
124                 -e s,gst-complete,gst-complete-@GST_MAJORMINOR@,g \
125                 -e s,gst-compprep,gst-compprep-@GST_MAJORMINOR@,g \
126                 -e s,gst-feedback,gst-feedback-@GST_MAJORMINOR@,g \
127                 -e s,gst-inspect,gst-inspect-@GST_MAJORMINOR@,g \
128                 -e s,gst-launch,gst-launch-@GST_MAJORMINOR@,g \
129                 -e s,gst-md5sum,gst-md5sum-@GST_MAJORMINOR@,g \
130                 -e s,gst-register,gst-register-@GST_MAJORMINOR@,g \
131                 -e s,gst-typefind,gst-typefind-@GST_MAJORMINOR@,g \
132                 -e s,gst-xmllaunch,gst-xmllaunch-@GST_MAJORMINOR@,g \
133                 $< >$@