]> git.sesse.net Git - vlc/blob - Makefile.am
* Makefile.am: distribute the Makefile and zsh.cpp files in extras/.
[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         \
235         extras/Makefile \
236         extras/zsh.cpp \
237         $(NULL)
238
239 ###############################################################################
240 # MS Visual Studio and eMbedded Visual Studio projects
241 ###############################################################################
242
243 EXTRA_DIST += \
244         msvc/vlc.dsw \
245         msvc/libvlc.dsp.in \
246         msvc/plugins.dsp.in \
247         msvc/vlc.dsp.in \
248         msvc/config.h.in \
249         msvc/modules_builtin_msvc.h \
250         evc/vlc.vcw \
251         evc/libvlc.vcp.in \
252         evc/vlc.vcp.in \
253         evc/plugins.vcp.in \
254         evc/errno.h \
255         evc/config.h.in \
256         evc/modules_builtin_evc.h \
257         $(NULL)
258
259 dist-hook:
260         cd $(distdir) && srcdir=$(srcdir) $(srcdir)/toolbox --update-vc
261         distdir=$(distdir) srcdir=$(srcdir) $(srcdir)/toolbox --dist-contrib
262
263 ###############################################################################
264 # Building libvlc
265 ###############################################################################
266
267 bin_SCRIPTS = vlc-config
268 vlc-config: $(top_builddir)/config.status $(top_builddir)/vlc-config.in
269         cd $(top_builddir) && $(SHELL) ./config.status --file=$@
270         -cd $(top_builddir) && chmod 0755 $@
271
272 $(SOURCES): vlc-config
273
274 CLEANFILES = $(BUILT_SOURCES)
275
276 lib_LIBRARIES = lib/libvlc.a $(LIBRARIES_libvlc_pic)
277
278 lib_libvlc_a_SOURCES = $(SOURCES_libvlc)
279 lib_libvlc_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
280 lib_libvlc_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc`
281 lib_libvlc_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc`
282
283 lib_libvlc_pic_a_SOURCES = $(SOURCES_libvlc)
284 lib_libvlc_pic_a_CFLAGS = `$(VLC_CONFIG) --cflags vlc pic`
285 lib_libvlc_pic_a_CXXFLAGS = `$(VLC_CONFIG) --cxxflags vlc pic`
286 lib_libvlc_pic_a_OBJCFLAGS = `$(VLC_CONFIG) --objcflags vlc pic`
287
288 if HAVE_BEOS
289 OPT_SOURCES_libvlc_beos = $(SOURCES_libvlc_beos)
290 endif
291 if HAVE_DARWIN
292 OPT_SOURCES_libvlc_darwin = $(SOURCES_libvlc_darwin)
293 endif
294 if HAVE_WIN32
295 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
296 endif
297 if HAVE_WINCE
298 OPT_SOURCES_libvlc_win32 = $(SOURCES_libvlc_win32)
299 endif
300 if BUILD_DIRENT
301 OPT_SOURCES_libvlc_dirent = $(SOURCES_libvlc_dirent)
302 endif
303 if BUILD_GETOPT
304 OPT_SOURCES_libvlc_getopt = $(SOURCES_libvlc_getopt)
305 endif
306 if BUILD_MOZILLA
307 if !HAVE_WIN32
308 LIBRARIES_libvlc_pic = lib/libvlc_pic.a
309 endif
310 endif
311
312 EXTRA_DIST += \
313         $(SOURCES_libvlc_beos) \
314         $(SOURCES_libvlc_darwin) \
315         $(SOURCES_libvlc_win32) \
316         $(SOURCES_libvlc_dirent) \
317         $(SOURCES_libvlc_getopt) \
318         $(NULL)
319
320 SOURCES_libvlc_beos = \
321         src/misc/beos_specific.cpp \
322         $(NULL)
323
324 SOURCES_libvlc_darwin = \
325         src/misc/darwin_specific.m \
326         $(NULL)
327
328 SOURCES_libvlc_win32 = \
329         src/misc/win32_specific.c \
330         $(NULL)
331
332 SOURCES_libvlc_dirent = \
333         src/extras/dirent.c \
334         $(NULL)
335
336 SOURCES_libvlc_getopt = \
337         src/extras/getopt.c \
338         src/extras/getopt.h \
339         src/extras/getopt1.c \
340         $(NULL)
341
342 SOURCES_libvlc_common = \
343         src/libvlc.c \
344         src/libvlc.h \
345         src/interface/interface.c \
346         src/interface/intf_eject.c \
347         src/playlist/playlist.c \
348         src/playlist/sort.c \
349         src/playlist/loadsave.c \
350         src/playlist/view.c \
351         src/playlist/item.c \
352         src/playlist/item-ext.c \
353         src/playlist/services_discovery.c \
354         src/input/access.c \
355         src/input/clock.c \
356         src/input/control.c \
357         src/input/decoder.c \
358         src/input/demux.c \
359         src/input/es_out.c \
360         src/input/input.c \
361         src/input/input_internal.h \
362         src/input/stream.c \
363         src/input/mem_stream.c \
364         src/input/subtitles.c \
365         src/input/var.c \
366         src/video_output/video_output.c \
367         src/video_output/vout_pictures.c \
368         src/video_output/vout_pictures.h \
369         src/video_output/video_text.c \
370         src/video_output/video_widgets.c \
371         src/video_output/vout_subpictures.c \
372         src/video_output/vout_synchro.c \
373         src/video_output/vout_intf.c \
374         src/audio_output/common.c \
375         src/audio_output/dec.c \
376         src/audio_output/filters.c \
377         src/audio_output/input.c \
378         src/audio_output/mixer.c \
379         src/audio_output/output.c \
380         src/audio_output/intf.c \
381         src/stream_output/stream_output.c \
382         src/stream_output/announce.c \
383         src/stream_output/sap.c \
384         src/stream_output/acl.c \
385         src/misc/charset.c \
386         src/misc/httpd.c \
387         src/misc/tls.c \
388         src/misc/md5.c \
389         src/misc/mtime.c \
390         src/misc/block.c \
391         src/misc/modules.c \
392         src/misc/threads.c \
393         src/misc/unicode.c \
394         src/misc/cpu.c \
395         src/misc/configuration.c \
396         src/misc/image.c \
397         src/misc/iso_lang.c \
398         src/misc/iso-639_def.h \
399         src/misc/messages.c \
400         src/misc/objects.c \
401         src/misc/variables.c \
402         src/misc/error.c \
403         src/misc/net.c \
404         src/misc/getaddrinfo.c \
405         src/misc/vlm.c \
406         src/misc/xml.c \
407         src/extras/libc.c \
408         src/control/core.c \
409         src/control/util.c \
410         src/control/audio_video.c \
411         $(NULL)
412
413 SOURCES_libvlc = \
414         $(SOURCES_libvlc_common) \
415         $(OPT_SOURCES_libvlc_beos) \
416         $(OPT_SOURCES_libvlc_darwin) \
417         $(OPT_SOURCES_libvlc_win32) \
418         $(OPT_SOURCES_libvlc_dirent) \
419         $(OPT_SOURCES_libvlc_getopt) \
420         $(NULL)
421
422 ###############################################################################
423 # Building vlc
424 ###############################################################################
425
426 bin_PROGRAMS = vlc
427
428 vlc_SOURCES = src/vlc.c
429
430 # Work around a bug in the arm-wince-pe linker
431 if HAVE_WINCE
432 vlc_WORKAROUNDLDFLAGS = lib/libvlc.a
433 endif
434
435 vlc_LDFLAGS = `$(VLC_CONFIG) --libs vlc builtin` $(vlc_WORKAROUNDLDFLAGS)
436 vlc_LDADD = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
437 vlc_CFLAGS = `$(VLC_CONFIG) --cflags vlc`
438
439 # We use DEPENDENCIES_vlc instead of vlc_DEPENDENCIES because of an
440 # old automake-1.5 bug (automake/279).
441 DEPENDENCIES_vlc = lib/libvlc.a $(DATA_win32_rc) $(LIB_intl)
442
443 vlc$(EXEEXT): $(vlc_OBJECTS) $(DEPENDENCIES_vlc) stamp-builtin
444         @rm -f $(top_builddir)/vlc$(EXEEXT)
445         @case `$(VLC_CONFIG) --linkage vlc builtin` in \
446           c++) echo $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(CXXLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
447           objc) echo $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(OBJCLINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
448           c|*) echo $(LINK) $(vlc_OBJECTS) $(vlc_LDFLAGS) $(LIBS) ; $(LINK) $(vlc_OBJECTS) $(vlc_LDADD) $(vlc_LDFLAGS) $(LIBS) $(vlc_LDADD) ;; \
449         esac
450
451 if HAVE_BEOS
452 noinst_DATA = vlc-bundle
453 vlc-bundle: vlc
454         rm -Rf $(top_builddir)/vlc-bundle ; mkdir -p $(top_builddir)/vlc-bundle
455         cp $(top_builddir)/vlc $(top_builddir)/vlc-bundle/
456         xres -o $(top_builddir)/vlc-bundle/vlc $(srcdir)/share/vlc_beos.rsrc
457         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
458           if test -n "$$i" ; then \
459             mkdir -p $(top_builddir)/vlc-bundle/plugins ; \
460             cp "$$i$(LIBEXT)" $(top_builddir)/vlc-bundle/plugins/ ; \
461           fi ; \
462         done
463         if test -d $(top_builddir)/extras/contrib/vlc-lib ; then \
464           mkdir -p $(top_builddir)/vlc-bundle/lib ; \
465           for i in $(top_builddir)/extras/contrib/vlc-lib/*.so ; do \
466             cp $$i $(top_builddir)/vlc-bundle/lib/ ; \
467           done ; \
468         fi
469         for i in $(ALL_LINGUAS); do \
470           mkdir -p "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES" ; \
471           cp "$(top_builddir)/po/$$i.gmo" \
472             "$(top_builddir)/vlc-bundle/locale/$$i/LC_MESSAGES/vlc.mo" || true ; \
473         done
474         find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \;
475 endif
476
477 # Install the modules and the symlinks
478 install-exec-local:
479         for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
480           echo $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
481           $(INSTALL) -m 755 "$$i$(LIBEXT)" "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`" ; \
482         fi ; done
483         for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
484           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
485           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
486         fi ; done
487 if BUILD_MOZILLA
488         for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
489           echo $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
490           $(INSTALL) -m 644 "$$i" "$(DESTDIR)$(libdir)/vlc" ; \
491         fi ; done
492 endif
493         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
494           rm -f "$(DESTDIR)$(bindir)/$$i" && \
495           ln -s vlc "$(DESTDIR)$(bindir)/$$i" ; \
496         fi ; done
497
498 # the opposite of install-{data,exec}-local
499 uninstall-local:
500         @for i in "" `$(VLC_CONFIG) --target plugin` ; do if test -n "$$i" ; then \
501           echo rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
502           rm -f "$(DESTDIR)$(libdir)/vlc/`echo $$i | sed -e 's,.*modules/\([^/]*\).*,\1,'`/$$(basename $$i$(LIBEXT))" ; \
503         fi ; done
504         @for i in "" `$(VLC_CONFIG) --target builtin` ; do if test -n "$$i" ; then \
505           echo rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
506           rm -f "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
507         fi ; done
508 if BUILD_MOZILLA
509         @for i in "" `$(VLC_CONFIG) --target builtin pic` ; do if test -n "$$i" ; then \
510           echo rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
511           rm -f "$$i" "$(DESTDIR)$(libdir)/vlc/$$(basename $$i)" ; \
512         fi ; done
513 endif
514         for i in "" $(ALIASES) ; do if test -n "$$i" ; then \
515           rm -f "$(DESTDIR)$(bindir)/$$i" ; \
516         fi ; done
517
518 if HAVE_DARWIN
519 # Create the MacOS X app
520 vlc_app_DATA = VLC.app
521 vlc_appdir = $(bindir)
522 # VLC-release.app is the old VLC.app target
523 VLC-release.app: vlc
524         @if test -e "$(top_builddir)/tmp"; then \
525           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
526           false; \
527         else \
528           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
529         fi
530         rm -Rf $(top_builddir)/VLC-release.app
531         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
532         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
533           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
534         done
535         mkdir -p $(top_builddir)/tmp/modules/audio_output
536         cp $(srcdir)/modules/audio_output/coreaudio.c \
537            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
538         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
539         for i in \
540             about.h \
541             about.m \
542             applescript.h \
543             applescript.m \
544             controls.h \
545             controls.m \
546             equalizer.h \
547             equalizer.m \
548             intf.h \
549             intf.m \
550             macosx.m \
551             misc.h \
552             misc.m \
553             open.h \
554             open.m \
555             output.h \
556             output.m \
557             playlist.h \
558             playlist.m \
559             playlistinfo.h \
560             playlistinfo.m \
561             prefs_widgets.h \
562             prefs_widgets.m \
563             prefs.h \
564             prefs.m \
565             vout.h \
566             voutqt.m \
567             voutgl.m \
568             wizard.h \
569             wizard.m \
570             extended.h \
571             extended.m \
572         bookmarks.h \
573         bookmarks.m \
574             vout.m; do \
575           cp "$(srcdir)/modules/gui/macosx/$$i" \
576              $(top_builddir)/tmp/modules/gui/macosx; \
577         done
578         case $(target_triplet) in \
579           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
580             cd ../../../; \
581             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
582                   $(top_builddir)/VLC-release.app;; \
583           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
584             cd ../../../; \
585             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
586                   $(top_builddir)/VLC-release.app;; \
587           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
588             cd ../../../; \
589             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
590                   $(top_builddir)/VLC-release.app;; \
591         esac
592         rm -Rf $(top_builddir)/tmp
593         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS
594         $(INSTALL) $(top_builddir)/vlc \
595                    $(top_builddir)/VLC-release.app/Contents/MacOS/VLC
596         ln -sf ./VLC $(top_builddir)/VLC-release.app/Contents/MacOS/clivlc
597         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/modules
598         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
599           if test -n "$$i" ; \
600             then $(INSTALL) "$$i$(LIBEXT)" \
601                            "$(top_builddir)/VLC-release.app/Contents/MacOS/modules" ; \
602           fi ; done
603         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
604           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/lib ; \
605           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
606             $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
607           done ; \
608         fi
609         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share
610         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http
611         for i in $(srcdir)/share/http/* ; do \
612           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/`basename $${i}` ; \
613         done ; \
614         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm
615         for i in $(srcdir)/share/http/vlm/* ; do \
616           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/vlm/`basename $${i}` ; \
617         done ; \
618         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin
619         for i in $(srcdir)/share/http/admin/* ; do \
620           $(INSTALL) -m 644 $${i} $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/`basename $${i}` ; \
621         done ; \
622         $(INSTALL) -m 644 $(srcdir)/share/http/admin/.access $(top_builddir)/VLC-release.app/Contents/MacOS/share/http/admin/.access
623         $(INSTALL) -d $(top_builddir)/VLC-release.app/Contents/MacOS/locale
624         for i in $(ALL_LINGUAS); do \
625           mkdir -p $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
626           cp $(srcdir)/po/$${i}.gmo $(top_builddir)/VLC-release.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
627           mkdir -p $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
628           ln -sf ../English.lproj/InfoPlist.strings \
629               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
630           ln -sf ../English.lproj/MainMenu.nib \
631               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
632           ln -sf ../English.lproj/vlc.scriptTerminology \
633               $(top_builddir)/VLC-release.app/Contents/Resources/$${i}.lproj ; \
634         done
635         printf "APPLVLC#" >| $(top_builddir)/VLC-release.app/Contents/PkgInfo
636
637 VLC.app: vlc
638         @if test -e "$(top_builddir)/tmp"; then \
639           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
640           false; \
641         else \
642           echo "OK."; mkdir -p "$(top_builddir)/tmp/extras"; \
643         fi
644         rm -Rf $(top_builddir)/VLC.app
645         cp -r $(srcdir)/extras/MacOSX $(top_builddir)/tmp/extras
646         for i in AUTHORS COPYING README.MacOSX.rtf THANKS; do \
647           cp "$(srcdir)/$$i" $(top_builddir)/tmp; \
648         done
649         mkdir -p $(top_builddir)/tmp/modules/audio_output
650         cp $(srcdir)/modules/audio_output/coreaudio.c \
651            $(top_builddir)/tmp/modules/audio_output/coreaudio.c
652         mkdir -p $(top_builddir)/tmp/modules/gui/macosx
653         for i in \
654             about.h \
655             about.m \
656             applescript.h \
657             applescript.m \
658             controls.h \
659             controls.m \
660             equalizer.h \
661             equalizer.m \
662             intf.h \
663             intf.m \
664             macosx.m \
665             misc.h \
666             misc.m \
667             open.h \
668             open.m \
669             output.h \
670             output.m \
671             playlist.h \
672             playlist.m \
673             playlistinfo.h \
674             playlistinfo.m \
675             prefs_widgets.h \
676             prefs_widgets.m \
677             prefs.h \
678             prefs.m \
679             vout.h \
680             voutqt.m \
681             voutgl.m \
682             wizard.h \
683             wizard.m \
684             extended.h \
685             extended.m \
686         bookmarks.h \
687         bookmarks.m \
688             vout.m; do \
689           cp "$(srcdir)/modules/gui/macosx/$$i" \
690              $(top_builddir)/tmp/modules/gui/macosx; \
691         done
692         case $(target_triplet) in \
693           *darwin6*) cd $(top_builddir)/tmp/extras/MacOSX && pbxbuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
694             cd ../../../; \
695             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
696                   $(top_builddir)/VLC.app;; \
697           *darwin7*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
698             cd ../../../; \
699             cp -r $(top_builddir)/tmp/extras/MacOSX/build/VLC.bundle \
700                   $(top_builddir)/VLC.app;; \
701           *darwin8*) cd $(top_builddir)/tmp/extras/MacOSX && xcodebuild -target vlc | grep -v '^\([ \t]\|$$\)'; \
702             cd ../../../; \
703             cp -r $(top_builddir)/tmp/extras/MacOSX/build/Default/VLC.bundle \
704                   $(top_builddir)/VLC.app;; \
705         esac
706         rm -Rf $(top_builddir)/tmp
707         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS
708         $(INSTALL) $(top_builddir)/vlc \
709                    $(top_builddir)/VLC.app/Contents/MacOS/VLC
710         ln -sf ./VLC $(top_builddir)/VLC.app/Contents/MacOS/clivlc
711         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/modules
712         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
713           if test -n "$$i" ; \
714             then ln -sfn "`pwd`/$$i$(LIBEXT)" \
715                            "$(top_builddir)/VLC.app/Contents/MacOS/modules" ; \
716           fi ; done
717         if test -d $(top_builddir)/extras/contrib/vlc-lib; then \
718           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/lib ; \
719           for i in $(top_builddir)/extras/contrib/vlc-lib/*.dylib ; do \
720             ln -sfn `pwd`/$${i} $(top_builddir)/VLC.app/Contents/MacOS/lib/vlc_`basename $${i}` ; \
721           done ; \
722         fi
723         ln -sfn `pwd`/share $(top_builddir)/VLC.app/Contents/MacOS/
724         $(INSTALL) -d $(top_builddir)/VLC.app/Contents/MacOS/locale
725         for i in $(ALL_LINGUAS); do \
726           mkdir -p $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES ; \
727           ln -sfn `pwd`/po/$${i}.gmo $(top_builddir)/VLC.app/Contents/MacOS/locale/$${i}/LC_MESSAGES/vlc.mo || true ; \
728           mkdir -p $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
729           ln -sf ../English.lproj/InfoPlist.strings \
730               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
731           ln -sf ../English.lproj/MainMenu.nib \
732               $(top_builddir)/VLC.app/Contents/Resources/$${i}.lproj ; \
733         done
734         printf "APPLVLC#" >| $(top_builddir)/VLC.app/Contents/PkgInfo
735 endif
736
737 if HAVE_WIN32
738 DATA_win32_rc = $(noinst_share_vlc_win32_rc_DATA)
739 noinst_share_vlc_win32_rc_DATA = share/vlc_win32_rc.$(OBJEXT)
740 noinst_share_vlc_win32_rcdir = $(libdir)
741 share/vlc_win32_rc.$(OBJEXT): share/vlc_win32_rc.rc
742         $(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 $@
743 endif
744
745
746 ###############################################################################
747 # Building specific source packages
748 ###############################################################################
749
750 dist-woody: distdir
751         $(remove_distdir_woody)
752         mv $(distdir) $(PACKAGE)-woody-$(VERSION)
753         $(srcdir)/toolbox --make-woody $(PACKAGE)-woody-$(VERSION)
754         $(AMTAR) chof - $(PACKAGE)-woody-$(VERSION) \
755           | GZIP=$(GZIP_ENV) gzip -c >$(PACKAGE)-woody-$(VERSION).tar.gz
756         $(remove_distdir_woody)
757
758 remove_distdir_woody = \
759   { test ! -d $(PACKAGE)-woody-$(VERSION) \
760     || { find $(PACKAGE)-woody-$(VERSION) -type d ! -perm -200 \
761            -exec chmod u+w {} ';' \
762          && rm -fr $(PACKAGE)-woody-$(VERSION); }; }
763
764 ###############################################################################
765 # Building architecture-specific binary packages
766 ###############################################################################
767
768 # XXX: this rule is probably only useful to you if you have exactly
769 # the same setup as me. Contact sam@zoy.org if you need to use it.
770 #
771 package-win32-base:
772 # Check that tmp isn't in the way
773         @if test -e "$(top_builddir)/vlc-${VERSION}"; then \
774           echo "Error: please remove $(top_builddir)/vlc-${VERSION}, it is in the way"; \
775           false; \
776         else \
777           echo "OK."; mkdir -p "$(top_builddir)/vlc-${VERSION}"; \
778         fi
779
780 # Copy relevant files
781         cp "$(srcdir)/vlc.win32.nsi" "$(top_builddir)/vlc-${VERSION}/"
782         cp "$(top_builddir)/vlc$(EXEEXT)" "$(top_builddir)/vlc-${VERSION}/"
783         cp "$(top_srcdir)/vlc.exe.manifest" "$(top_builddir)/vlc-${VERSION}/"
784         $(STRIP) "$(top_builddir)/vlc-${VERSION}/vlc$(EXEEXT)"
785
786         for file in AUTHORS MAINTAINERS THANKS NEWS COPYING README ; \
787           do sed 's/@/_AT_/' < "$(srcdir)/$$file" > "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; \
788           unix2dos "$(top_builddir)/vlc-${VERSION}/$${file}.txt" ; done
789
790         mkdir -p "$(top_builddir)/vlc-${VERSION}/plugins"
791         for i in "" `$(VLC_CONFIG) --target plugin` ; do \
792           if test -n "$$i" ; then \
793             $(INSTALL) "$(top_builddir)/$$i$(LIBEXT)" \
794             "$(top_builddir)/vlc-${VERSION}/plugins/" ; \
795           fi ; done
796
797         for i in "" $(top_builddir)/vlc-${VERSION}/plugins/*$(LIBEXT) ; \
798           do if test -n "$$i" ; then $(STRIP) "$$i" ; fi ; done
799
800         mkdir $(top_builddir)/vlc-${VERSION}/locale
801         for i in $(ALL_LINGUAS); do \
802           mkdir -p "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES" ; \
803           cp "$(srcdir)/po/$${i}.gmo" \
804             "$(top_builddir)/vlc-${VERSION}/locale/$${i}/LC_MESSAGES/vlc.mo" \
805             || true ; \
806         done
807
808         mkdir -p $(top_builddir)/vlc-${VERSION}/skins/fonts
809         for i in $(srcdir)/share/skins2/fonts/*.*; do \
810           cp $$i $(top_builddir)/vlc-${VERSION}/skins/fonts/ || true ; \
811         done
812         for i in $(srcdir)/share/skins2/*.*; do \
813           cp $$i $(top_builddir)/vlc-${VERSION}/skins/ || true ; \
814         done
815
816         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/admin"
817         mkdir -p "$(top_builddir)/vlc-${VERSION}/http/vlm"
818         cp $(srcdir)/share/http/*.html $(top_builddir)/vlc-${VERSION}/http/ ;
819         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.html ;
820         cp $(srcdir)/share/http/*.css $(top_builddir)/vlc-${VERSION}/http/ ;
821         unix2dos $(top_builddir)/vlc-${VERSION}/http/*.css ;
822         cp $(srcdir)/share/http/*.png $(top_builddir)/vlc-${VERSION}/http/
823         cp $(srcdir)/share/http/*.ico $(top_builddir)/vlc-${VERSION}/http/ ;
824         cp $(srcdir)/share/http/admin/*.html \
825            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
826         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/*.html ;
827         cp $(srcdir)/share/http/admin/dboxfiles.html \
828            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
829         cp $(srcdir)/share/http/admin/.access \
830            $(top_builddir)/vlc-${VERSION}/http/admin/ ;
831         unix2dos $(top_builddir)/vlc-${VERSION}/http/admin/.access ;
832         cp $(srcdir)/share/http/vlm/*.html \
833            $(top_builddir)/vlc-${VERSION}/http/vlm/ ;
834         unix2dos $(top_builddir)/vlc-${VERSION}/http/vlm/*.html ;
835
836         cp $(srcdir)/share/vlc48x48new.ico $(top_builddir)/vlc-${VERSION}/ ;
837
838         mkdir -p "$(top_builddir)/vlc-${VERSION}/mozilla"
839 if BUILD_MOZILLA
840         cp $(top_builddir)/mozilla/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/mozilla/ ;
841         $(STRIP) $(top_builddir)/vlc-${VERSION}/mozilla/*$(LIBEXT);
842         cp $(top_builddir)/mozilla/vlcintf.xpt  $(top_builddir)/vlc-${VERSION}/mozilla/ ;
843 endif
844
845         mkdir -p "$(top_builddir)/vlc-${VERSION}/activex"
846 if BUILD_ACTIVEX
847         cp $(srcdir)/activex/README.TXT  $(top_builddir)/vlc-${VERSION}/activex/ ;
848         cp $(srcdir)/activex/test.html  $(top_builddir)/vlc-${VERSION}/activex/ ;
849         unix2dos $(top_builddir)/vlc-${VERSION}/activex/* ;
850
851         cp $(top_builddir)/activex/*$(LIBEXT) $(top_builddir)/vlc-${VERSION}/activex/ ;
852         $(STRIP) $(top_builddir)/vlc-${VERSION}/activex/*$(LIBEXT);
853 endif
854 # Rebase all those DLLs to speed up loading (need cygwin rebase)
855         if [ -x rebase ]; then \
856                 find $(top_builddir)/vlc-${VERSION} -type f -name '*.dll' -print | rebase -b 0x70000000 -T -; \
857         fi
858
859 package-win32-base-exe:
860 # Create package
861         wine C:/Program\ Files/NSIS/makensis.exe \
862              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
863
864 package-win32-base-exe-cygwin:
865 # Create package
866         C:/Program\ Files/NSIS/makensis.exe \
867              /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
868
869 package-win32-base-exe-linux:
870 # Create package
871         makensis -DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
872
873 package-win32-base-zip:
874 # Create package 
875         zip -r vlc-${VERSION}-win32.zip vlc-${VERSION}
876
877 package-win32-exe: package-win32-base package-win32-base-exe
878 # Clean up
879         rm -Rf $(top_builddir)/vlc-${VERSION}
880
881 package-win32-exe-linux: package-win32-base package-win32-base-exe-linux
882 # Clean up
883         rm -Rf $(top_builddir)/vlc-${VERSION}
884
885 package-win32-zip: package-win32-base package-win32-base-zip
886 # Clean up
887         rm -Rf $(top_builddir)/vlc-${VERSION}
888
889 package-win32: package-win32-base package-win32-base-exe package-win32-base-zip
890 # Clean up
891         rm -Rf $(top_builddir)/vlc-${VERSION}
892
893 package-beos:
894 # Check that tmp isn't in the way
895         @if test -e $(srcdir)/tmp; then \
896           echo "Error: please remove $(srcdir)/tmp, it is in the way"; \
897           false ; \
898         else \
899           echo "OK." ; mkdir $(srcdir)/tmp ; \
900         fi
901
902 # Copy relevant files
903         mkdir -p $(srcdir)/tmp/vlc ;
904         cd $(srcdir) && cp -R vlc-bundle/* AUTHORS COPYING ChangeLog README \
905           THANKS NEWS tmp/vlc/ ;
906
907 # Create debug package
908         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
909         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
910         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
911         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS-debug.zip vlc-${VERSION} )
912         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS-debug.zip $(srcdir)/ ;
913         mv $(srcdir)/tmp/vlc-${VERSION} $(srcdir)/tmp/vlc ;
914
915 # Create normal package
916         $(STRIP) --strip-debug --strip-unneeded $(srcdir)/tmp/vlc/vlc ;
917         find $(srcdir)/tmp/vlc -name 'lib*.so' -exec $(STRIP) \
918           --strip-debug --strip-unneeded "{}" \; ;
919         xres -o $(srcdir)/tmp/vlc/vlc $(srcdir)/share/vlc_beos.rsrc ;
920         find $(srcdir)/tmp/vlc -exec mimeset -f {} \; ;
921         mv $(srcdir)/tmp/vlc $(srcdir)/tmp/vlc-${VERSION} ;
922         (cd $(srcdir)/tmp ; zip -9 -r vlc-${VERSION}-BeOS.zip vlc-${VERSION} )
923         mv $(srcdir)/tmp/vlc-${VERSION}-BeOS.zip $(srcdir)/ ;
924
925 # Clean up
926         rm -Rf $(srcdir)/tmp ;
927
928 package-macosx:
929 # Check that tmp isn't in the way
930         @if test -e "$(top_builddir)/tmp"; then \
931           echo "Error: please remove $(top_builddir)/tmp, it is in the way"; \
932           false; \
933         else \
934           echo "OK."; mkdir -p "$(top_builddir)/tmp"; \
935         fi
936
937 # Copy relevant files 
938         cp -R "$(top_builddir)/VLC-release.app" "$(top_builddir)/tmp/VLC.app"
939         cd "$(srcdir)" && cp AUTHORS COPYING ChangeLog README README.MacOSX.rtf THANKS NEWS $(top_builddir)/tmp/
940
941 # Create disk image 
942         $(srcdir)/extras/MacOSX/macosx-dmg "vlc-${VERSION}" $(top_builddir)/tmp
943
944 # Clean up
945         rm -Rf $(top_builddir)/tmp
946
947 package-translations:
948         @if test -e "$(srcdir)/vlc-translations-${VERSION}"; then \
949           echo "Error: please remove $(srcdir)/vlc-translations-${VERSION}, it is in the way"; \
950           false; \
951         else \
952           echo "OK."; mkdir -p "$(srcdir)/vlc-translations-${VERSION}"; \
953         fi
954 # Copy translations
955         for i in $(ALL_LINGUAS); do \
956           cp "$(srcdir)/po/$${i}.po" \
957             "$(srcdir)/vlc-translations-${VERSION}/$${i}.po" \
958             || true ; \
959         done
960         cp "$(srcdir)/doc/translations.txt" \
961           "$(srcdir)/vlc-translations-${VERSION}/README.txt"
962
963         echo "#!/bin/sh" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
964         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
965         echo 'if test $$# != 1; then' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
966         echo "  echo \"Usage: convert-po.sh <.po file>\"" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
967         echo "  exit 1" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
968         echo "fi" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
969         echo "" >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
970         echo 'msgfmt --statistics -o vlc.mo $$1' >>"$(srcdir)/vlc-translations-$(VERSION)/convert.po.sh"
971
972         $(AMTAR) chof - $(srcdir)/vlc-translations-$(VERSION) \
973           | GZIP=$(GZIP_ENV) gzip -c >$(srcdir)/vlc-translations-$(VERSION).tar.gz
974
975 ###############################################################################
976 # Stamp rules
977 ###############################################################################
978 clean: clean-stamp clean-recursive
979 clean-stamp:
980         rm -f stamp-builtin stamp-api
981
982 stamp-builtin: FORCE
983         @for dep in "" `$(VLC_CONFIG) --target builtin`; do \
984           if test "$${dep}" -nt "$(top_builddir)/vlc$(EXEEXT)"; then \
985             rm -f $@; \
986             break; \
987           fi; \
988         done
989         @if test ! -f $@; then printf "" > $@; fi
990
991 stamp-api: Makefile.in $(HEADERS_include) vlc-config vlc-api.pl src/misc/modules_builtin.h.in
992         cd $(srcdir) && cat $(HEADERS_include) | perl ./vlc-api.pl
993         touch stamp-api
994
995 ###############################################################################
996 # Force rule
997 ###############################################################################
998 FORCE: