From: Rémi Denis-Courmont Date: Sun, 9 Dec 2007 21:36:32 +0000 (+0000) Subject: Build VLC aliases cleanly (don't need to parse argv[0]) X-Git-Tag: 0.9.0-test0~4212 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a58afe8e62c672b06e047f2475e69977908dbb7d;p=vlc Build VLC aliases cleanly (don't need to parse argv[0]) --- diff --git a/Makefile.am b/Makefile.am index 244151cd34..3d099306b7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -236,6 +236,14 @@ vlc-config.in: vlc-config.in.in CLEANFILES = $(BUILT_SOURCES_clean) stamp-builtin DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in compile +# Shortcut for developpers to rebuild the core (libvlc + vlc) +# Don't use it if you don't know what it is about. +# Don't complain if it doesn't work. -- Courmisch +libvlc: + cd src && $(MAKE) $(AM_MAKEFLAGS) $(LIB_libvlc) + +.PHONY: libvlc + ############################################################################### # Building vlc ############################################################################### @@ -262,15 +270,9 @@ LIBVLC = src/$(LIB_libvlc) nice: $(top_builddir)/compile -# Shortcut for developpers to rebuild the core (libvlc + vlc) -# Don't use it if you don't know what it is about. -# Don't complain if it doesn't work. -- Courmisch -libvlc: - cd src && $(MAKE) $(AM_MAKEFLAGS) $(LIB_libvlc) - core: libvlc vlc$(EXEEXT) -.PHONY: libvlc core +.PHONY: core vlc$(EXEEXT): $(vlc_OBJECTS) $(vlc_DEPENDENCIES) @rm -f vlc$(EXEEXT) @@ -309,19 +311,35 @@ vlc-bundle: vlc find $(top_builddir)/vlc-bundle -type f -exec mimeset -f "{}" \; endif -# Install the symlinks -install-exec-local: install-binPROGRAMS - inst="`echo vlc | sed -e '$(transform)'`" ; \ - for i in "" $(ALIASES) ; do if test -n "$$i" ; then \ - rm -f "$(DESTDIR)$(bindir)/$$i" && \ - ln -sf "$${inst}" "$(DESTDIR)$(bindir)/$$i" ; \ - fi ; done - -# the opposite of install-{data,exec}-local -uninstall-local: - for i in "" $(ALIASES) ; do if test -n "$$i" ; then \ - rm -f "$(DESTDIR)$(bindir)/$$i" ; \ - fi ; done +############################################################################### +# Building aliases +############################################################################### + +ALL_ALIASES = cvlc rvlc svlc wxvlc qvlc nvlc +bin_SCRIPTS += $(ALIASES) +EXTRA_SCRIPTS = $(ALL_ALIASES) + +dist_noinst_SCRIPTS += make-alias + +MKALIAS = bindir="$(bindir)" transform="$(transform)" $(top_srcdir)/make-alias $@ + +cvlc: make-alias + $(MKALIAS) dummy + +rvlc: make-alias + $(MKALIAS) rc + +svlc: make-alias + $(MKALIAS) skins2 + +wxvlc: make-alias + $(MKALIAS) wx + +qvlc: make-alias + $(MKALIAS) qt4 + +nvlc: make-alias + $(MKALIAS) ncurses if HAVE_DARWIN # Create the MacOS X app diff --git a/make-alias b/make-alias new file mode 100755 index 0000000000..e655ab3f5e --- /dev/null +++ b/make-alias @@ -0,0 +1,14 @@ +#! /bin/sh +# Interface alias build script for VLC +# Copyright © 2007 Rémi Denis-Courmont. + +OUT="$1" +IFACE="$2" + +cat > "$OUT.tmp" << EOF +#! /bin/sh +exec $bindir/`echo vlc | sed -e "$transform"` -I "$IFACE" "\$@" +EOF + +chmod +x "$OUT.tmp" +mv -f -- "$OUT.tmp" "$OUT"