From: lilo_booter Date: Thu, 10 Nov 2005 12:33:19 +0000 (+0000) Subject: + DESTDIR patch from Anthony Green (green at redhat dot com) - many thanks :-) X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=34c7916b96a65dbfb6d9414aca781d6292474f98;p=melted + DESTDIR patch from Anthony Green (green at redhat dot com) - many thanks :-) git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@862 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/Makefile b/Makefile index cf1e7a1..2a062c8 100644 --- a/Makefile +++ b/Makefile @@ -24,16 +24,18 @@ dist-clean: rm config.mak; install: - install -d "$(prefix)/bin" - install -d "$(prefix)/include" - install -d "$(prefix)/lib" - install -d "$(prefix)/lib/pkgconfig" - install -d "$(prefix)/share/mlt/modules" - install -c -m 755 mlt-config "$(bindir)" - install -c -m 644 *.pc "$(prefix)/lib/pkgconfig" - install -m 644 packages.dat "$(prefix)/share/mlt/" + install -d "$(DESTDIR)$(prefix)/bin" + install -d "$(DESTDIR)$(prefix)/include" + install -d "$(DESTDIR)$(prefix)/lib" + install -d "$(DESTDIR)$(prefix)/lib/pkgconfig" + install -d "$(DESTDIR)$(prefix)/share/mlt/modules" + install -c -m 755 mlt-config "$(DESTDIR)$(bindir)" + install -c -m 644 *.pc "$(DESTDIR)$(prefix)/lib/pkgconfig" + install -m 644 packages.dat "$(DESTDIR)$(prefix)/share/mlt/" list='$(SUBDIRS)'; \ for subdir in $$list; do \ - $(MAKE) -C $$subdir $@ || exit 1; \ + $(MAKE) DESTDIR=$(DESTDIR) -C $$subdir $@ || exit 1; \ done; \ - /sbin/ldconfig || true + if test -z "$(DESTDIR)"; then \ + /sbin/ldconfig || true; \ + fi diff --git a/src/albino/Makefile b/src/albino/Makefile index 7b56778..e527ef1 100644 --- a/src/albino/Makefile +++ b/src/albino/Makefile @@ -25,8 +25,8 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" ifneq ($(wildcard .depend),) include .depend diff --git a/src/framework/Makefile b/src/framework/Makefile index 15479e0..4827df1 100644 --- a/src/framework/Makefile +++ b/src/framework/Makefile @@ -67,9 +67,9 @@ clean: rm -f $(OBJS) $(TARGET) install: - install -m 755 $(TARGET) $(prefix)/lib/libmlt$(LIBSUF) - install -d "$(prefix)/include/mlt/framework" - install -m 644 $(INCS) "$(prefix)/include/mlt/framework" + install -m 755 $(TARGET) $(DESTDIR)$(prefix)/lib/libmlt$(LIBSUF) + install -d "$(DESTDIR)$(prefix)/include/mlt/framework" + install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/framework" ifneq ($(wildcard .depend),) include .depend diff --git a/src/humperdink/Makefile b/src/humperdink/Makefile index 2f0d4da..c27adae 100644 --- a/src/humperdink/Makefile +++ b/src/humperdink/Makefile @@ -27,8 +27,8 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" ifneq ($(wildcard .depend),) include .depend diff --git a/src/inigo/Makefile b/src/inigo/Makefile index 57e750e..02439ca 100644 --- a/src/inigo/Makefile +++ b/src/inigo/Makefile @@ -26,8 +26,8 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" ifneq ($(wildcard .depend),) include .depend diff --git a/src/miracle/Makefile b/src/miracle/Makefile index efb5f00..b3ee775 100644 --- a/src/miracle/Makefile +++ b/src/miracle/Makefile @@ -42,11 +42,11 @@ clean: rm -f $(OBJS) $(TARGET) libmiracle$(LIBSUF) install: all - install -d "$(bindir)" - install -c -s -m 755 $(TARGET) "$(bindir)" - install -m 755 libmiracle$(LIBSUF) $(prefix)/lib/libmiracle$(LIBSUF) - mkdir -p "$(prefix)/include/mlt/miracle" - install -m 644 $(INCS) "$(prefix)/include/mlt/miracle" + install -d "$(DESTDIR)$(bindir)" + install -c -s -m 755 $(TARGET) "$(DESTDIR)$(bindir)" + install -m 755 libmiracle$(LIBSUF) $(DESTDIR)$(prefix)/lib/libmiracle$(LIBSUF) + mkdir -p "$(DESTDIR)$(prefix)/include/mlt/miracle" + install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/miracle" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/Makefile b/src/modules/Makefile index c6a8fd1..e93ade0 100644 --- a/src/modules/Makefile +++ b/src/modules/Makefile @@ -20,11 +20,11 @@ dist-clean: done install: - install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(prefix)/share/mlt/modules" + install -m 644 producers.dat filters.dat transitions.dat consumers.dat "$(DESTDIR)$(prefix)/share/mlt/modules" list='$(SUBDIRS)'; \ for subdir in $$list; do \ if [ -f $$subdir/Makefile -a ! -f disable-$$subdir ] ; \ - then $(MAKE) -C $$subdir $@ || exit 1; \ + then $(MAKE) DESTDIR=$(DESTDIR) -C $$subdir $@ || exit 1; \ fi \ done diff --git a/src/modules/avformat/Makefile b/src/modules/avformat/Makefile index ce4259c..3dc1a36 100644 --- a/src/modules/avformat/Makefile +++ b/src/modules/avformat/Makefile @@ -45,11 +45,11 @@ clean: rm -f ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" if [ $(LOCAL_FFMPEG) ] ; then \ - install -m 755 ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \ - install -m 755 ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \ - install -m 755 ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) "$(prefix)/lib" ; \ + install -m 755 ../../framework/libavcodec$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(prefix)/lib" ; \ + install -m 755 ../../framework/libavformat$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(prefix)/lib" ; \ + install -m 755 ../../framework/libavutil$(AVFORMAT_SUFFIX)$(LIBSUF) "$(DESTDIR)$(prefix)/lib" ; \ fi ifneq ($(wildcard .depend),) diff --git a/src/modules/core/Makefile b/src/modules/core/Makefile index 1e4cab1..0c1b49a 100644 --- a/src/modules/core/Makefile +++ b/src/modules/core/Makefile @@ -52,8 +52,8 @@ clean: rm -f $(OBJS) $(ASM_OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" - install -m 644 ../data_fx.properties "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 ../data_fx.properties "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/dv/Makefile b/src/modules/dv/Makefile index ace8f33..39abd76 100644 --- a/src/modules/dv/Makefile +++ b/src/modules/dv/Makefile @@ -29,7 +29,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/feeds/Makefile b/src/modules/feeds/Makefile index 92d6a11..c557a6a 100644 --- a/src/modules/feeds/Makefile +++ b/src/modules/feeds/Makefile @@ -9,7 +9,7 @@ dist-clean: clean: install: all - install -d $(prefix)/share/mlt/modules/feeds/PAL - install -d $(prefix)/share/mlt/modules/feeds/NTSC - install -m 644 PAL/*.* $(prefix)/share/mlt/modules/feeds/PAL - install -m 644 NTSC/*.* $(prefix)/share/mlt/modules/feeds/NTSC + install -d $(DESTDIR)$(prefix)/share/mlt/modules/feeds/PAL + install -d $(DESTDIR)$(prefix)/share/mlt/modules/feeds/NTSC + install -m 644 PAL/*.* $(DESTDIR)$(prefix)/share/mlt/modules/feeds/PAL + install -m 644 NTSC/*.* $(DESTDIR)$(prefix)/share/mlt/modules/feeds/NTSC diff --git a/src/modules/fezzik/Makefile b/src/modules/fezzik/Makefile index c64c0f2..6102e36 100644 --- a/src/modules/fezzik/Makefile +++ b/src/modules/fezzik/Makefile @@ -27,9 +27,9 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" - install -m 644 ../fezzik.dict "$(prefix)/share/mlt/modules" - install -m 644 ../fezzik.ini "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 ../fezzik.dict "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 ../fezzik.ini "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/gtk2/Makefile b/src/modules/gtk2/Makefile index 9019333..87465de 100644 --- a/src/modules/gtk2/Makefile +++ b/src/modules/gtk2/Makefile @@ -53,7 +53,7 @@ clean: rm -f $(OBJS) $(ASM_OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/inigo/Makefile b/src/modules/inigo/Makefile index c313d37..1c56f4b 100644 --- a/src/modules/inigo/Makefile +++ b/src/modules/inigo/Makefile @@ -26,7 +26,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/jackrack/Makefile b/src/modules/jackrack/Makefile index 70efa83..294643a 100644 --- a/src/modules/jackrack/Makefile +++ b/src/modules/jackrack/Makefile @@ -40,7 +40,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/kino/Makefile b/src/modules/kino/Makefile index 95bd66d..cfbb6a0 100644 --- a/src/modules/kino/Makefile +++ b/src/modules/kino/Makefile @@ -38,7 +38,7 @@ clean: rm -f $(OBJS) $(TARGET) $(CPPOBJS) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/lumas/Makefile b/src/modules/lumas/Makefile index fe436bd..8d663ef 100644 --- a/src/modules/lumas/Makefile +++ b/src/modules/lumas/Makefile @@ -17,7 +17,7 @@ clean: rm -f luma install: all - install -d $(prefix)/share/mlt/modules/lumas/PAL - install -d $(prefix)/share/mlt/modules/lumas/NTSC - install -m 644 PAL/* $(prefix)/share/mlt/modules/lumas/PAL - install -m 644 NTSC/* $(prefix)/share/mlt/modules/lumas/NTSC + install -d $(DESTDIR)$(prefix)/share/mlt/modules/lumas/PAL + install -d $(DESTDIR)$(prefix)/share/mlt/modules/lumas/NTSC + install -m 644 PAL/* $(DESTDIR)$(prefix)/share/mlt/modules/lumas/PAL + install -m 644 NTSC/* $(DESTDIR)$(prefix)/share/mlt/modules/lumas/NTSC diff --git a/src/modules/motion_est/Makefile b/src/modules/motion_est/Makefile index 16bf517..bd0c57a 100644 --- a/src/modules/motion_est/Makefile +++ b/src/modules/motion_est/Makefile @@ -31,7 +31,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" test: $(TARGET) ~/mlt-devel/mlt/src/inigo/inigo -filter motion_est -filter vismv -filter benchmark -consumer sdl rescale=none real_time=0 audio_off=1 silent=1 /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=50000 diff --git a/src/modules/normalize/Makefile b/src/modules/normalize/Makefile index 1237c7b..42e1113 100644 --- a/src/modules/normalize/Makefile +++ b/src/modules/normalize/Makefile @@ -26,7 +26,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/plus/Makefile b/src/modules/plus/Makefile index 645fbaa..2577d66 100644 --- a/src/modules/plus/Makefile +++ b/src/modules/plus/Makefile @@ -30,7 +30,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/resample/Makefile b/src/modules/resample/Makefile index 7250641..14d94cd 100644 --- a/src/modules/resample/Makefile +++ b/src/modules/resample/Makefile @@ -28,7 +28,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/sdl/Makefile b/src/modules/sdl/Makefile index 929c03f..6058a15 100644 --- a/src/modules/sdl/Makefile +++ b/src/modules/sdl/Makefile @@ -43,7 +43,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/sox/Makefile b/src/modules/sox/Makefile index e80928c..33e9865 100644 --- a/src/modules/sox/Makefile +++ b/src/modules/sox/Makefile @@ -26,7 +26,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/valerie/Makefile b/src/modules/valerie/Makefile index d23e6f0..b450cb3 100644 --- a/src/modules/valerie/Makefile +++ b/src/modules/valerie/Makefile @@ -26,7 +26,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/vmfx/Makefile b/src/modules/vmfx/Makefile index 13f59ad..75bb76d 100644 --- a/src/modules/vmfx/Makefile +++ b/src/modules/vmfx/Makefile @@ -29,7 +29,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/vorbis/Makefile b/src/modules/vorbis/Makefile index a367618..6720b31 100644 --- a/src/modules/vorbis/Makefile +++ b/src/modules/vorbis/Makefile @@ -28,7 +28,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/westley/Makefile b/src/modules/westley/Makefile index 5f8fc34..9ba06bc 100644 --- a/src/modules/westley/Makefile +++ b/src/modules/westley/Makefile @@ -29,8 +29,8 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" - install -m 644 westley.dtd "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" + install -m 644 westley.dtd "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/modules/xine/Makefile b/src/modules/xine/Makefile index 00ee846..08978c8 100644 --- a/src/modules/xine/Makefile +++ b/src/modules/xine/Makefile @@ -28,7 +28,7 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) "$(prefix)/share/mlt/modules" + install -m 755 $(TARGET) "$(DESTDIR)$(prefix)/share/mlt/modules" ifneq ($(wildcard .depend),) include .depend diff --git a/src/valerie/Makefile b/src/valerie/Makefile index d8b09fb..aceb8f0 100644 --- a/src/valerie/Makefile +++ b/src/valerie/Makefile @@ -42,9 +42,9 @@ clean: rm -f $(OBJS) $(TARGET) install: all - install -m 755 $(TARGET) $(prefix)/lib/libvalerie$(LIBSUF) - mkdir -p "$(prefix)/include/mlt/valerie" - install -m 644 $(INCS) "$(prefix)/include/mlt/valerie" + install -m 755 $(TARGET) $(DESTDIR)$(prefix)/lib/libvalerie$(LIBSUF) + mkdir -p "$(DESTDIR)$(prefix)/include/mlt/valerie" + install -m 644 $(INCS) "$(DESTDIR)$(prefix)/include/mlt/valerie" ifneq ($(wildcard .depend),) include .depend