]> git.sesse.net Git - vlc/blob - Makefile.am
* whoops
[vlc] / Makefile.am
1 ###############################################################################
2 # Automake targets and declarations
3 ###############################################################################
4
5 NULL =
6
7 # SUBDIRS stores the directories where a "make" is required when building
8 # something. DIST_SUBDIRS stores the directories where nothing is built but
9 # which have makefiles with distribution information.
10 #  - intl should come before modules and . because all the code uses gettext
11 #  - modules should come before . because vlc needs the builtins
12 #  - . should come before mozilla because the plugin needs libvlc_pic.a
13 #  - po should come before . because VLC.app needs the pofiles
14 #  - loader should come before modules because some plugins need it
15 SUBDIRS = intl loader modules po . mozilla activex share m4 doc
16 DIST_SUBDIRS = $(SUBDIRS) src debian ipkg lib
17
18 EXTRA_DIST = \
19         HACKING \
20         INSTALL.win32 \
21         vlc.exe.manifest \
22         MAINTAINERS \
23         README.MacOSX.rtf \
24         bootstrap \
25         src/extras/COPYING \
26         toolbox \
27         vlc-api.pl \
28         vlc-config.in.in \
29         vlc.spec \
30         vlc.spec.mdk \
31         vlc.win32.nsi \
32         $(NULL)
33
34 BUILT_SOURCES =
35 SUFFIXES = 
36
37 # Tell aclocal to use -I m4. Wonder if it really works.
38 ACLOCAL_AMFLAGS = -I m4
39
40 # XXX: these flags could be set in configure.ac, but we set them here
41 # because old versions of automake don't support them in configure.ac.
42 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects
43
44 ###############################################################################
45 # Headers
46 ###############################################################################
47
48 BUILT_SOURCES += \
49         stamp-api \
50         src/misc/modules_builtin.h \
51         $(NULL)
52
53 pkgincludedir = $(includedir)/vlc
54
55 dist_pkginclude_HEADERS = \
56         include/vlc/vlc.h \
57         include/vlc/aout.h \
58         include/vlc/vout.h \
59         include/vlc/sout.h \
60         include/vlc/decoder.h \
61         include/vlc/input.h \
62         include/vlc/intf.h \
63         include/vlc/control.h \
64         $(NULL)
65
66 noinst_HEADERS = $(HEADERS_include)
67
68 HEADERS_include = \
69         include/aout_internal.h \
70         include/audio_output.h \
71         include/beos_specific.h \
72         include/charset.h \
73         include/codecs.h \
74         include/configuration.h \
75         include/darwin_specific.h \
76         include/intf_eject.h \
77         include/iso_lang.h \
78         include/main.h \
79         include/mmx.h \
80         include/modules.h \
81         include/modules_inner.h \
82         include/mtime.h \
83         include/network.h \
84         include/osd.h \
85         include/os_specific.h \
86         include/snapshot.h \
87         include/stream_output.h \
88         include/variables.h \
89         include/video_output.h \
90         include/vlc_access.h \
91         include/vlc_acl.h \
92         include/vlc_bits.h \
93         include/vlc_block.h \
94         include/vlc_block_helper.h \
95         include/vlc_codec.h \
96         include/vlc_common.h \
97         include/vlc_config.h \
98         include/vlc_cpu.h \
99         include/vlc_demux.h \
100         include/vlc_error.h \
101         include/vlc_es.h \
102         include/vlc_es_out.h \
103         include/vlc_filter.h \
104         include/vlc_config_cat.h \
105         include/vlc_httpd.h \
106         include/vlc_tls.h \
107         include/vlc_md5.h \
108         include/vlc_image.h \
109         include/vlc_input.h \
110         include/vlc_interface.h \
111         include/vlc_keys.h \
112         include/vlc_messages.h \
113         include/vlc_meta.h \
114         include/vlc_objects.h \
115         include/vlc_playlist.h \
116         include/vlc_spu.h \
117         include/vlc_stream.h \
118         include/vlc_symbols.h \
119         include/vlc_threads_funcs.h \
120         include/vlc_threads.h \
121         include/vlc_video.h \
122         include/vlc_vlm.h \
123         include/vlc_vod.h \
124         include/vlc_xml.h \
125         include/vout_synchro.h \
126         include/win32_specific.h \
127         $(NULL)
128
129 src/misc/modules_builtin.h: Makefile src/misc/modules_builtin.h.in vlc-config
130         srcdir=$(srcdir) $(srcdir)/toolbox --update-includes
131         touch $@
132
133 # These dependencies are mandatory
134 $(SOURCES_libvlc): src/misc/modules_builtin.h $(LIB_intl)
135
136 ###############################################################################
137 # Optional libintl - FIXME, bad dependencies
138 ###############################################################################
139
140 intl/libintl.a: FORCE
141         cd $(top_builddir)/intl && $(MAKE) $(AM_MAKEFLAGS)
142
143 if BUILD_INTL
144 LIB_intl = intl/libintl.a
145 endif
146
147 ###############################################################################
148 # MacOS X project
149 ###############################################################################
150
151 EXTRA_DIST += \
152         extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib \
153         extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib \
154         extras/MacOSX/Resources/English.lproj/MainMenu.nib/keyedobjects.nib \
155         extras/MacOSX/Resources/English.lproj/About.nib/classes.nib \
156         extras/MacOSX/Resources/English.lproj/About.nib/info.nib \
157         extras/MacOSX/Resources/English.lproj/About.nib/keyedobjects.nib \
158         extras/MacOSX/Resources/English.lproj/Open.nib/classes.nib \
159         extras/MacOSX/Resources/English.lproj/Open.nib/info.nib \
160         extras/MacOSX/Resources/English.lproj/Open.nib/keyedobjects.nib \
161         extras/MacOSX/Resources/English.lproj/Preferences.nib/classes.nib \
162         extras/MacOSX/Resources/English.lproj/Preferences.nib/info.nib \
163         extras/MacOSX/Resources/English.lproj/Preferences.nib/keyedobjects.nib \
164         extras/MacOSX/Resources/English.lproj/Wizard.nib/classes.nib \
165         extras/MacOSX/Resources/English.lproj/Wizard.nib/info.nib \
166         extras/MacOSX/Resources/English.lproj/Wizard.nib/keyedobjects.nib \
167     extras/MacOSX/Resources/English.lproj/Bookmarks.nib/classes.nib \
168         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/info.nib \
169         extras/MacOSX/Resources/English.lproj/Bookmarks.nib/keyedobjects.nib \
170         extras/MacOSX/Resources/English.lproj/InfoPlist.strings \
171         extras/MacOSX/Resources/a52.icns \
172         extras/MacOSX/Resources/aac.icns \
173         extras/MacOSX/Resources/asf.icns \
174         extras/MacOSX/Resources/asx.icns \
175         extras/MacOSX/Resources/avi.icns \
176         extras/MacOSX/Resources/bin.icns \
177         extras/MacOSX/Resources/cue.icns \
178         extras/MacOSX/Resources/dat.icns \
179         extras/MacOSX/Resources/divx.icns \
180         extras/MacOSX/Resources/dv.icns \
181         extras/MacOSX/Resources/generic.icns \
182         extras/MacOSX/Resources/m3u.icns \
183         extras/MacOSX/Resources/mov.icns \
184         extras/MacOSX/Resources/mp3.icns \
185         extras/MacOSX/Resources/mp4.icns \
186         extras/MacOSX/Resources/mpeg.icns \
187         extras/MacOSX/Resources/mpeg1.icns \
188         extras/MacOSX/Resources/mpeg2.icns \
189         extras/MacOSX/Resources/mpeg4.icns \
190         extras/MacOSX/Resources/mpg.icns \
191         extras/MacOSX/Resources/ogg.icns \
192         extras/MacOSX/Resources/ogm.icns \
193         extras/MacOSX/Resources/pls.icns \
194         extras/MacOSX/Resources/srt.icns \
195         extras/MacOSX/Resources/sub.icns \
196         extras/MacOSX/Resources/vlc.icns \
197         extras/MacOSX/Resources/vob.icns \
198         extras/MacOSX/Resources/wma.icns \
199         extras/MacOSX/Resources/wmv.icns \
200         extras/MacOSX/Resources/pause.png \
201         extras/MacOSX/Resources/pause_blue.png \
202         extras/MacOSX/Resources/play.png \
203         extras/MacOSX/Resources/play_blue.png \
204         extras/MacOSX/Resources/stop.png \
205         extras/MacOSX/Resources/stop_blue.png \
206         extras/MacOSX/Resources/display.png \
207         extras/MacOSX/Resources/display_slider.png \
208         extras/MacOSX/Resources/display_track.png \
209         extras/MacOSX/Resources/equalizerdrawer_active.png \
210         extras/MacOSX/Resources/equalizerdrawer_blue.png \
211         extras/MacOSX/Resources/fullscreen_active.png \
212         extras/MacOSX/Resources/fullscreen_blue.png \
213         extras/MacOSX/Resources/next_active.png \
214         extras/MacOSX/Resources/next_blue.png \
215         extras/MacOSX/Resources/playlistdrawer_active.png \
216         extras/MacOSX/Resources/playlistdrawer_blue.png \
217         extras/MacOSX/Resources/previous_active.png \
218         extras/MacOSX/Resources/previous_blue.png \
219         extras/MacOSX/Resources/skip_forward_active.png \
220         extras/MacOSX/Resources/skip_forward_blue.png \
221         extras/MacOSX/Resources/skip_previous_active.png \
222         extras/MacOSX/Resources/skip_previous_blue.png \
223         extras/MacOSX/Resources/volume_high.png \
224         extras/MacOSX/Resources/volume_low.png \
225         extras/MacOSX/Resources/volumeslider_blue.png \
226         extras/MacOSX/Resources/volumeslider_normal.png \
227         extras/MacOSX/Resources/volumetrack.png \
228         extras/MacOSX/Resources/about_bg.png \
229         extras/MacOSX/Resources/vlc.scriptSuite \
230         extras/MacOSX/Resources/vlc.scriptTerminology \
231         extras/MacOSX/Resources/README \
232         extras/MacOSX/vlc.pbproj/project.pbxproj \
233         extras/MacOSX/macosx-dmg \
234         $(NULL)
235
236 ###############################################################################
237 # MS Visual Studio and eMbedded Visual Studio projects
238 ###############################################################################
239
240 EXTRA_DIST += \
241         msvc/vlc.dsw \
242         msvc/libvlc.dsp.in \
243         msvc/plugins.dsp.in \
244         msvc/vlc.dsp.in \
245         msvc/config.h.in \
246         msvc/modules_builtin_msvc.h \
247         evc/vlc.vcw \
248         evc/libvlc.vcp.in \
249         evc/vlc.vcp.in \
250         evc/plugins.vcp.in \
251         evc/errno.h \
252         evc/config.h.in \
253         evc/modules_builtin_evc.h \
254         $(NULL)
255
256 dist-hook:
257         cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
258         distdir=$(distdir) srcdir=$(srcdir) $(srcdir)/toolbox --dist-contrib
259
260 ###############################################################################
261 # Building libvlc
262 ###############################################################################
263
264 bin_SCRIPTS = vlc-config
265 vlc-config: $(top_builddir)/config.status $(top_builddir)/vlc-config.in
266         cd $(top_builddir) && $(SHELL) ./config.status --file=$@
267         -cd $(top_builddir) && chmod 0755 $@
268
269 $(SOURCES): vlc-config
270
271 CLEANFILES = $(BUILT_SOURCES)
272
273 lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
274
275 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
276 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
277 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
278 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
279
280 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
281 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
282 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
283 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
284
285 if HAVE_BEOS
286 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
287 endif
288 if HAVE_DARWIN
289 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
290 endif
291 if HAVE_WIN32
292 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
293 endif
294 if HAVE_WINCE
295 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
296 endif
297 if BUILD_DIRENT
298 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
299 endif
300 if BUILD_GETOPT
301 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
302 endif
303 if BUILD_MOZILLA
304 if !HAVE_WIN32
305 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
306 endif
307 endif
308
309 EXTRA_DIST += \
310         $(SOURCES_libvlc_beos) \
311         $(SOURCES_libvlc_darwin) \
312         $(SOURCES_libvlc_win32) \
313         $(SOURCES_libvlc_dirent) \
314         $(SOURCES_libvlc_getopt) \
315         $(NULL)
316
317 SOURCES_libvlc_beos = \
318         src/misc/beos_specific.cpp \
319         $(NULL)
320
321 SOURCES_libvlc_darwin = \
322         src/misc/darwin_specific.m \
323         $(NULL)
324
325 SOURCES_libvlc_win32 = \
326         src/misc/win32_specific.c \
327         $(NULL)
328
329 SOURCES_libvlc_dirent = \
330         src/extras/dirent.c \
331         $(NULL)
332
333 SOURCES_libvlc_getopt = \
334         src/extras/getopt.c \
335         src/extras/getopt.h \
336         src/extras/getopt1.c \
337         $(NULL)
338
339 SOURCES_libvlc_common = \
340         src/libvlc.c \
341         src/libvlc.h \
342         src/interface/interface.c \
343         src/interface/intf_eject.c \
344         src/playlist/playlist.c \
345         src/playlist/sort.c \
346         src/playlist/loadsave.c \
347         src/playlist/view.c \
348         src/playlist/item.c \
349         src/playlist/item-ext.c \
350         src/playlist/services_discovery.c \
351         src/input/access.c \
352         src/input/clock.c \
353         src/input/control.c \
354         src/input/decoder.c \
355         src/input/demux.c \
356         src/input/es_out.c \
357         src/input/input.c \
358         src/input/input_internal.h \
359         src/input/stream.c \
360         src/input/mem_stream.c \
361         src/input/subtitles.c \
362         src/input/var.c \
363         src/video_output/video_output.c \
364         src/video_output/vout_pictures.c \
365         src/video_output/vout_pictures.h \
366         src/video_output/video_text.c \
367         src/video_output/video_widgets.c \
368         src/video_output/vout_subpictures.c \
369         src/video_output/vout_synchro.c \
370         src/video_output/vout_intf.c \
371         src/audio_output/common.c \
372         src/audio_output/dec.c \
373         src/audio_output/filters.c \
374         src/audio_output/input.c \
375         src/audio_output/mixer.c \
376         src/audio_output/output.c \
377         src/audio_output/intf.c \
378         src/stream_output/stream_output.c \
379         src/stream_output/announce.c \
380         src/stream_output/sap.c \
381         src/stream_output/acl.c \
382         src/misc/charset.c \
383         src/misc/httpd.c \
384         src/misc/tls.c \
385         src/misc/md5.c \
386         src/misc/mtime.c \
387         src/misc/block.c \
388         src/misc/modules.c \
389         src/misc/threads.c \
390         src/misc/unicode.c \
391         src/misc/cpu.c \
392         src/misc/configuration.c \
393         src/misc/image.c \
394         src/misc/iso_lang.c \
395         src/misc/iso-639_def.h \
396         src/misc/messages.c \
397         src/misc/objects.c \
398         src/misc/variables.c \
399         src/misc/error.c \
400         src/misc/net.c \
401         src/misc/getaddrinfo.c \
402         src/misc/vlm.c \
403         src/misc/xml.c \
404         src/extras/libc.c \
405         src/control/core.c \
406         src/control/util.c \
407         src/control/audio_video.c \
408         $(NULL)
409
410 SOURCES_libvlc = \
411         $(SOURCES_libvlc_common) \
412         $(OPT_SOURCES_libvlc_beos) \
413         $(OPT_SOURCES_libvlc_darwin) \
414         $(OPT_SOURCES_libvlc_win32) \
415         $(OPT_SOURCES_libvlc_dirent) \
416         $(OPT_SOURCES_libvlc_getopt) \
417         $(NULL)
418
419 ###############################################################################
420 # Building vlc
421 ###############################################################################
422
423 bin_PROGRAMS = vlc
424
425 vlc_SOURCES = src/vlc.c
426
427 # Work around a bug in the arm-wince-pe linker
428 if HAVE_WINCE
429 vlc_WORKAROUNDLDFLAGS = lib/libvlc.a
430 endif
431
432 vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin` $(vlc_WORKAROUNDLDFLAGS)
433 vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
434 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
435
436 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
437 # old automake-1.5 bug (automake/279).
438 DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
439
440 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
441         @rm -f $(top_builddir)/vlc$(EXEEXT)
442         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
443           c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
444           objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
445           c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
446         esac
447
448 if HAVE_BEOS
449 noinst_DATA = vlc-bundle
450 vlc-bundle: vlc
451         rm -Rf $(top_builddir)/vlc-bundle ; mkdir -p $(top_builddir)/vlc-bundle
452         cp $(top_builddir)/vlc $(top_builddir)/vlc-bundle/
453         xres -o $(top_builddir)/vlc-bundle/vlc $(srcdir)/share/vlc_beos.rsrc
454         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
455           if test -n "$$i" ; then \
456             mkdir -p $(top_builddir)/vlc-bundle/plugins ; \
457             cp "$$i$(LIBEXT)" $(top_builddir)/vlc-bundle/plugins/ ; \
458           fi ; \
459         done
460         if test -d $(top_builddir)/extras/contrib/vlc-lib ; then \
461           mkdir -p $(top_builddir)/vlc-bundle/lib ; \
462           for i in $(top_builddir)/extras/contrib/vlc-lib/*.so ; do \
463             cp $$i $(top_builddir)/vlc-bundle/lib/ ; \
464           done ; \
465         fi
466         for i in $(ALL_LINGUAS); do \
467           mkdir -p "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES" ; \
468           cp "$(top_builddir)/po/$$i.gmo" \
469             "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES/vlc.mo" || true ; \
470         done
471         find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
472 endif
473
474 # Install the modules and the symlinks
475 install-exec-local:
476         for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
477           echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
478           $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
479         fi ; done
480         for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
481           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
482           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
483         fi ; done
484 if BUILD_MOZILLA
485         for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
486           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
487           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
488         fi ; done
489 endif
490         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
491           rm -f "$(DESTDIR)$(bindir)/$$i" && \
492           ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
493         fi ; done
494
495 # the opposite of install-{data,exec}-local
496 uninstall-local:
497         @for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
498           echo rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
499           rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
500         fi ; done
501         @for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
502           echo rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
503           rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
504         fi ; done
505 if BUILD_MOZILLA
506         @for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
507           echo rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
508           rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
509         fi ; done
510 endif
511         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
512           rm -f "$(DESTDIR)$(bindir)/$$i" ; \
513         fi ; done
514
515 if HAVE_DARWIN
516 # Create the MacOS X app
517 vlc_app_DATA = VLC.app
518 vlc_appdir = $(bindir)
519 # VLC-release.app is the old VLC.app target
520 VLC-release.app: vlc
521         @if test -e "$(top_builddir)/tmp"; then \
522           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
523           false; \
524         else \
525           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
526         fi
527         rm -Rf $(top_builddir)/VLC-release.app
528         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
529         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
530           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
531         done
532         mkdir -p $(top_builddir)/tmp/modules/audio_output
533         cp $(srcdir)/modules/audio_output/coreaudio.c \
534            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
535         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
536         for i in \
537             about.h \
538             about.m \
539             applescript.h \
540             applescript.m \
541             controls.h \
542             controls.m \
543             equalizer.h \
544             equalizer.m \
545             intf.h \
546             intf.m \
547             macosx.m \
548             misc.h \
549             misc.m \
550             open.h \
551             open.m \
552             output.h \
553             output.m \
554             playlist.h \
555             playlist.m \
556             playlistinfo.h \
557             playlistinfo.m \
558             prefs_widgets.h \
559             prefs_widgets.m \
560             prefs.h \
561             prefs.m \
562             vout.h \
563             voutqt.m \
564             voutgl.m \
565             wizard.h \
566             wizard.m \
567             extended.h \
568             extended.m \
569         bookmarks.h \
570         bookmarks.m \
571             vout.m; do \
572           cp "$(srcdir)/modules/gui/macosx/$$i" \
573              $(top_builddir)/tmp/modules/gui/macosx; \
574         done
575         case $(target_triplet) in \
576           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
577             cd ../../../; \
578             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
579                   $(top_builddir)/VLC-release.app;; \
580           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
581             cd ../../../; \
582             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
583                   $(top_builddir)/VLC-release.app;; \
584           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
585             cd ../../../; \
586             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
587                   $(top_builddir)/VLC-release.app;; \
588         esac
589         rm -Rf $(top_builddir)/tmp
590         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
591         $(INSTALL) $(top_builddir)/vlc \
592                    $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
593         ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
594         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
595         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
596           if test -n "$$i" ; \
597             then $(INSTALL) "$$i$(LIBEXT)" \
598                            "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
599           fi ; done
600         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
601           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
602           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
603             $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
604           done ; \
605         fi
606         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share
607         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http
608         for i in $(srcdir)/share/http/* ; do \
609           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
610         done ; \
611         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm
612         for i in $(srcdir)/share/http/vlm/* ; do \
613           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm/`basename $${i}` ; \
614         done ; \
615         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin
616         for i in $(srcdir)/share/http/admin/* ; do \
617           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/`basename $${i}` ; \
618         done ; \
619         $(INSTALL) -m 644 $(srcdir)/share/http/admin/.access $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/.access
620         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/locale
621         for i in $(ALL_LINGUAS); do \
622           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
623           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
624           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
625           ln -sf ../English.lproj/InfoPlist.strings \
626               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
627           ln -sf ../English.lproj/MainMenu.nib \
628               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
629           ln -sf ../English.lproj/vlc.scriptTerminology \
630               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
631         done
632         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
633
634 VLC.app: vlc
635         @if test -e "$(top_builddir)/tmp"; then \
636           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
637           false; \
638         else \
639           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
640         fi
641         rm -Rf $(top_builddir)/VLC.app
642         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
643         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
644           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
645         done
646         mkdir -p $(top_builddir)/tmp/modules/audio_output
647         cp $(srcdir)/modules/audio_output/coreaudio.c \
648            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
649         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
650         for i in \
651             about.h \
652             about.m \
653             applescript.h \
654             applescript.m \
655             controls.h \
656             controls.m \
657             equalizer.h \
658             equalizer.m \
659             intf.h \
660             intf.m \
661             macosx.m \
662             misc.h \
663             misc.m \
664             open.h \
665             open.m \
666             output.h \
667             output.m \
668             playlist.h \
669             playlist.m \
670             playlistinfo.h \
671             playlistinfo.m \
672             prefs_widgets.h \
673             prefs_widgets.m \
674             prefs.h \
675             prefs.m \
676             vout.h \
677             voutqt.m \
678             voutgl.m \
679             wizard.h \
680             wizard.m \
681             extended.h \
682             extended.m \
683         bookmarks.h \
684         bookmarks.m \
685             vout.m; do \
686           cp "$(srcdir)/modules/gui/macosx/$$i" \
687              $(top_builddir)/tmp/modules/gui/macosx; \
688         done
689         case $(target_triplet) in \
690           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
691             cd ../../../; \
692             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
693                   $(top_builddir)/VLC.app;; \
694           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
695             cd ../../../; \
696             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
697                   $(top_builddir)/VLC.app;; \
698           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
699             cd ../../../; \
700             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
701                   $(top_builddir)/VLC.app;; \
702         esac
703         rm -Rf $(top_builddir)/tmp
704         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
705         $(INSTALL) $(top_builddir)/vlc \
706                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
707         ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
708         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
709         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
710           if test -n "$$i" ; \
711             then ln -sfn "`pwd`/$$i$(LIBEXT)" \
712                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
713           fi ; done
714         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
715           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
716           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
717             ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
718           done ; \
719         fi
720         ln -sfn `pwd`/share $(top_builddir)/VLC.app/Contents/MacOS/
721         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
722         for i in $(ALL_LINGUAS); do \
723           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
724           ln -sfn `pwd`/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
725           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
726           ln -sf ../English.lproj/InfoPlist.strings \
727               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
728           ln -sf ../English.lproj/MainMenu.nib \
729               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
730         done
731         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
732 endif
733
734 if HAVE_WIN32
735 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
736 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
737 noinst_share_vlc_win32_rcdir = $(libdir)
738 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
739         $(WINDRES) -DVERSION=$(VERSION) -DVERSION_NUMBER=`echo $(VERSION).0.0.0 | sed 's/\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\)[^.]*\.*\([0-9]*\).*/\1,\2,\3,\4/'` --include-dir $(srcdir)/share -i $< -o $@
740 endif
741
742
743 ###############################################################################
744 # Building specific source packages
745 ###############################################################################
746
747 dist-woody: distdir
748         $(remove_distdir_woody)
749         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
750         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
751         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
752           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
753         $(remove_distdir_woody)
754
755 remove_distdir_woody = \
756   { test ! -d $(PACKAGE)-woody-$(VERSION) \
757     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
758            -exec chmod u+w {} ';' \
759          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
760
761 ###############################################################################
762 # Building architecture-specific binary packages
763 ###############################################################################
764
765 # XXX: this rule is probably only useful to you if you have exactly
766 # the same setup as me. Contact sam@zoy.org if you need to use it.
767 #
768 package-win32-base:
769 # Check that tmp isn't in the way
770         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
771           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
772           false; \
773         else \
774           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
775         fi
776
777 # Copy relevant files
778         cp "$(srcdir)/vlc.win32.nsi" "$(top_builddir)/vlc-${VERSION}/"
779         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
780         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
781         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
782
783         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
784           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
785           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
786
787         mkdir -p "$(top_builddir)/vlc-${VERSION}/plugins"
788         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
789           if test -n "$$i" ; then \
790             $(INSTALL) "$(top_builddir)/$$i$(LIBEXT)" \
791             "$(top_builddir)/vlc-${VERSION}/plugins/" ; \
792           fi ; done
793
794         for i in "" $(top_builddir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
795           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
796
797         mkdir $(top_builddir)/vlc-${VERSION}/locale
798         for i in $(ALL_LINGUAS); do \
799           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
800           cp "$(srcdir)/po/$${i}.gmo" \
801             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
802             || true ; \
803         done
804
805         mkdir -p $(top_builddir)/vlc-${VERSION}/skins/fonts
806         for i in $(srcdir)/share/skins2/fonts/*.*; do \
807           cp $$i $(top_builddir)/vlc-${VERSION}/skins/fonts/ || true ; \
808         done
809         for i in $(srcdir)/share/skins2/*.*; do \
810           cp $$i $(top_builddir)/vlc-${VERSION}/skins/ || true ; \
811         done
812
813         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/admin"
814         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/vlm"
815         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
816         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;
817         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
818         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
819         cp $(srcdir)/share/http/*.png $(top_builddir)/vlc-${VERSION}/http/
820         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
821         cp $(srcdir)/share/http/admin/*.html \
822            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
823         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/*.html ;
824         cp $(srcdir)/share/http/admin/dboxfiles.html \
825            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
826         cp $(srcdir)/share/http/admin/.access \
827            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
828         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/.access ;
829         cp $(srcdir)/share/http/vlm/*.html \
830            $(top_builddir)/vlc-${VERSION}/http/vlm/ ;
831         unix2dos $(top_builddir)/vlc-${VERSION}/http/vlm/*.html ;
832
833         cp $(srcdir)/share/vlc48x48new.ico $(top_builddir)/vlc-${VERSION}/ ;
834
835         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
836 if BUILD_MOZILLA
837         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
838         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
839         cp $(top_builddir)/mozilla/vlcintf.xpt  $(top_builddir)/vlc-${VERSION}/mozilla/ ;
840 endif
841
842         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
843 if BUILD_ACTIVEX
844         cp $(srcdir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
845         cp $(srcdir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
846         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
847
848         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
849         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
850 endif
851 # Rebase all those DLLs to speed up loading (need cygwin rebase)
852         if [ -x rebase ]; then \
853                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
854         fi
855
856 package-win32-base-exe:
857 # Create package
858         wine C:/Program\ Files/NSIS/makensis.exe \
859              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
860
861 package-win32-base-exe-cygwin:
862 # Create package
863         C:/Program\ Files/NSIS/makensis.exe \
864              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
865
866 package-win32-base-exe-linux:
867 # Create package
868         makensis -DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
869
870 package-win32-base-zip:
871 # Create package 
872         zip -r vlc-${VERSION}-win32.zip vlc-${VERSION}
873
874 package-win32-exe: package-win32-base package-win32-base-exe
875 # Clean up
876         rm -Rf $(top_builddir)/vlc-${VERSION}
877
878 package-win32-exe-linux: package-win32-base package-win32-base-exe-linux
879 # Clean up
880         rm -Rf $(top_builddir)/vlc-${VERSION}
881
882 package-win32-zip: package-win32-base package-win32-base-zip
883 # Clean up
884         rm -Rf $(top_builddir)/vlc-${VERSION}
885
886 package-win32: package-win32-base package-win32-base-exe package-win32-base-zip
887 # Clean up
888         rm -Rf $(top_builddir)/vlc-${VERSION}
889
890 package-beos:
891 # Check that tmp isn't in the way
892         @if test -e $(srcdir)/tmp; then \
893           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
894           false ; \
895         else \
896           echo "OK." ; mkdir $(srcdir)/tmp ; \
897         fi
898
899 # Copy relevant files
900         mkdir -p $(srcdir)/tmp/vlc ;
901         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
902           THANKS NEWS tmp/vlc/ ;
903
904 # Create debug package
905         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
906         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
907         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
908         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
909         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/ ;
910         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc ;
911
912 # Create normal package
913         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc ;
914         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
915           --strip-debug --strip-unneeded "{}" \; ;
916         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
917         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
918         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
919         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
920         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/ ;
921
922 # Clean up
923         rm -Rf $(srcdir)/tmp ;
924
925 package-macosx:
926 # Check that tmp isn't in the way
927         @if test -e "$(top_builddir)/tmp"; then \
928           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
929           false; \
930         else \
931           echo "OK."; mkdir -p "$(top_builddir)/tmp"; \
932         fi
933
934 # Copy relevant files 
935         cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/tmp/VLC.app"
936         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS $(top_builddir)/tmp/
937
938 # Create disk image 
939         $(srcdir)/extras/MacOSX/macosx-dmg "vlc-${VERSION}" $(top_builddir)/tmp
940
941 # Clean up
942         rm -Rf $(top_builddir)/tmp
943
944 package-translations:
945         @if test -e "$(srcdir)/vlc-translations-${VERSION}"; then \
946           echo "Error: please remove $(srcdir)/vlc-translations-${VERSION}, it is in the way"; \
947           false; \
948         else \
949           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-${VERSION}"; \
950         fi
951 # Copy translations
952         for i in $(ALL_LINGUAS); do \
953           cp "$(srcdir)/po/$${i}.po" \
954             "$(srcdir)/vlc-translations-${VERSION}/$${i}.po" \
955             || true ; \
956         done
957         cp "$(srcdir)/doc/translations.txt" \
958           "$(srcdir)/vlc-translations-${VERSION}/README.txt"
959
960         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
961         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
962         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
963         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
964         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
965         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
966         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
967         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
968
969         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
970           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
971
972 ###############################################################################
973 # Stamp rules
974 ###############################################################################
975 clean: clean-stamp clean-recursive
976 clean-stamp:
977         rm -f stamp-builtin stamp-api
978
979 stamp-builtin: FORCE
980         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
981           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
982             rm -f $@; \
983             break; \
984           fi; \
985         done
986         @if test ! -f $@; then printf "" > $@; fi
987
988 stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl src/misc/modules_builtin.h.in
989         cd $(srcdir) && cat $(HEADERS_include) | perl ./vlc-api.pl
990         touch stamp-api
991
992 ###############################################################################
993 # Force rule
994 ###############################################################################
995 FORCE: