check/Makefile.am: Fix environment variables.
[platform/upstream/gstreamer.git] / tools / Makefile.am
1 ### assemble a list of programs we want to build and install
2
3 if GST_DISABLE_LOADSAVE
4 GST_LOADSAVE_SRC = 
5 GST_LOADSAVE_SRC_V = 
6 else
7 GST_LOADSAVE_SRC = gst-complete gst-compprep gst-xmllaunch
8 GST_LOADSAVE_SRC_V = \
9         gst-complete-@GST_MAJORMINOR@ \
10         gst-compprep-@GST_MAJORMINOR@ \
11         gst-xmllaunch-@GST_MAJORMINOR@
12 endif
13
14 GST_OTHER_SRC = \
15         gst-feedback \
16         gst-inspect \
17         gst-launch \
18         gst-md5sum \
19         gst-typefind \
20         gst-xmlinspect
21 GST_OTHER_SRC_V = \
22         gst-inspect-@GST_MAJORMINOR@ \
23         gst-launch-@GST_MAJORMINOR@ \
24         gst-md5sum-@GST_MAJORMINOR@ \
25         gst-typefind-@GST_MAJORMINOR@ \
26         gst-xmlinspect-@GST_MAJORMINOR@
27
28 ### so all of the programs we want to build
29 bin_PROGRAMS = \
30         $(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
31         $(GST_OTHER_SRC) $(GST_OTHER_SRC_V)
32 bin_SCRIPTS = gst-feedback-@GST_MAJORMINOR@
33
34 # make sure each versioned tool has the right source file and flags
35 if !GST_DISABLE_LOADSAVE
36 gst_complete_@GST_MAJORMINOR@_SOURCES = gst-complete.c
37 gst_complete_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
38 gst_complete_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
39 gst_compprep_@GST_MAJORMINOR@_SOURCES = gst-compprep.c
40 gst_compprep_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
41 gst_compprep_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
42 gst_xmllaunch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
43 gst_xmllaunch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
44 gst_xmllaunch_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
45 endif
46 gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
47 gst_inspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
48 gst_inspect_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
49 gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
50 gst_launch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
51 gst_launch_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
52 gst_md5sum_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c
53 gst_md5sum_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
54 gst_md5sum_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
55 gst_typefind_@GST_MAJORMINOR@_SOURCES = gst-typefind.c
56 gst_typefind_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
57 gst_typefind_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
58 gst_xmlinspect_@GST_MAJORMINOR@_SOURCES = gst-xmlinspect.c
59 gst_xmlinspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
60 gst_xmlinspect_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
61
62 gst-feedback-@GST_MAJORMINOR@: gst-feedback-m.m
63         cp $(srcdir)/gst-feedback-m.m $@
64         chmod +x $@
65
66 # make sure each unversioned tool comes from gst-run.c
67 if !GST_DISABLE_LOADSAVE
68 gst_complete_SOURCES = gst-run.c
69 gst_compprep_SOURCES = gst-run.c
70 gst_xmllaunch_SOURCES = gst-run.c
71 endif
72 gst_feedback_SOURCES = gst-run.c
73 gst_inspect_SOURCES = gst-run.c
74 gst_launch_SOURCES = gst-run.c
75 gst_md5sum_SOURCES = gst-run.c
76 gst_typefind_SOURCES = gst-run.c
77 gst_xmlinspect_SOURCES = gst-run.c
78
79 # CFLAGS and libs for nonversioned frontend binaries
80 AM_CFLAGS = $(GLIB_ONLY_CFLAGS) $(POPT_CFLAGS)
81 LDADD = $(GLIB_ONLY_LIBS) $(POPT_LIBS)
82 # due to depcomp not using AM_CFLAGS for rh9/yd3, we also set AM_CPPFLAGS
83 AM_CPPFLAGS = $(GLIB_ONLY_CFLAGS) $(POPT_CFLAGS)
84
85 ### man pages we want to install
86 if GST_DISABLE_LOADSAVE
87 GST_LOADSAVE_MAN=
88 else
89 GST_LOADSAVE_MAN = \
90         gst-complete-@GST_MAJORMINOR@.1 \
91         gst-compprep-@GST_MAJORMINOR@.1 \
92         gst-xmllaunch-@GST_MAJORMINOR@.1
93 endif
94
95 GST_OTHER_MAN = \
96         gst-feedback-@GST_MAJORMINOR@.1 \
97         gst-inspect-@GST_MAJORMINOR@.1 \
98         gst-launch-@GST_MAJORMINOR@.1 \
99         gst-md5sum-@GST_MAJORMINOR@.1 \
100         gst-typefind-@GST_MAJORMINOR@.1 \
101         gst-xmlinspect-@GST_MAJORMINOR@.1
102
103 manpages = $(GST_LOADSAVE_MAN) $(GST_OTHER_MAN)
104
105 CLEANFILES = $(manpages) $(bin_SCRIPTS)
106 man_MANS = $(manpages)
107
108 # developer helper tools, not meant for installation
109 noinst_SCRIPTS = gst-indent
110
111 EXTRA_DIST = \
112         $(noinst_SCRIPTS) \
113         gst-complete.1.in \
114         gst-compprep.1.in \
115         gst-feedback.1.in \
116         gst-inspect.1.in \
117         gst-launch.1.in \
118         gst-md5sum.1.in \
119         gst-typefind.1.in \
120         gst-xmlinspect.1.in \
121         gst-xmllaunch.1.in \
122         gst-feedback-m.m
123
124 %-@GST_MAJORMINOR@.1: %.1.in
125         sed \
126                 -e s,gst-complete,gst-complete-@GST_MAJORMINOR@,g \
127                 -e s,gst-compprep,gst-compprep-@GST_MAJORMINOR@,g \
128                 -e s,gst-feedback,gst-feedback-@GST_MAJORMINOR@,g \
129                 -e s,gst-inspect,gst-inspect-@GST_MAJORMINOR@,g \
130                 -e s,gst-launch,gst-launch-@GST_MAJORMINOR@,g \
131                 -e s,gst-md5sum,gst-md5sum-@GST_MAJORMINOR@,g \
132                 -e s,gst-typefind,gst-typefind-@GST_MAJORMINOR@,g \
133                 -e s,gst-xmlinspect,gst-xmlinspect-@GST_MAJORMINOR@,g \
134                 -e s,gst-xmllaunch,gst-xmllaunch-@GST_MAJORMINOR@,g \
135                 $< >$@
136