[x264-devel] [PATCH 2/2] More demarcation between install recipes
Stephen Hutchinson
qyot27 at gmail.com
Sat Apr 5 22:16:52 CEST 2014
Separate install recipes that call other recipes from those
that don't, with the latter doing the actual install work and
the former tying the latter together.
Also fixes a cosmetic issue with the silent rules that results
in missing and incorrect echoing during 'make install'.
---
Makefile | 50 +++++++++++++++++++++++++++++++-------------------
configure | 1 +
2 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index c3e7ad5..207eb60 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ ifeq ($(V), 0)
Q = @
ECHO = printf "$(1)\t%s\n" $(2)
BRIEF = CC AS YASM AR LD STRIP CP RC
-SILENT = RM RANLIB
+SILENT = RM RANLIB INSTALL_VERBOSE
MSG = $@
M = @$(call ECHO,$(TAG),$@);
@@ -172,7 +172,8 @@ OBJS += $(SRCS:%.c=%.o)
OBJCLI += $(SRCCLI:%.c=%.o)
OBJSO += $(SRCSO:%.c=%.o)
-.PHONY: all default fprofiled clean distclean install uninstall lib-static lib-shared cli install-lib-dev install-lib-static install-lib-shared install-cli
+#.PHONY: all default fprofiled clean distclean install uninstall lib-static lib-shared cli install-lib-headers install-lib-pc install-lib-dev install-static install-shared install-shared-implib install-lib-static install-lib-shared install-cli
+.PHONY: all default fprofiled *clean install* uninstall lib-static lib-shared cli
cli: x264$(EXE)
lib-static: $(LIBX264)
@@ -260,30 +261,41 @@ clean:
distclean: clean
$(RM) -f config.mak x264_config.h config.h config.log x264.pc x264.def
-install-cli: cli
- $(INSTALL) -d $(DESTDIR)$(bindir)
- $(INSTALL) x264$(EXE) $(DESTDIR)$(bindir)
+install-cli: x264$(EXE)
+ $(INSTALL_VERBOSE) -d $(DESTDIR)$(bindir)
+ $(INSTALL) $< $(DESTDIR)$(bindir)
-install-lib-dev:
- $(INSTALL) -d $(DESTDIR)$(includedir)
- $(INSTALL) -d $(DESTDIR)$(libdir)
- $(INSTALL) -d $(DESTDIR)$(libdir)/pkgconfig
- $(INSTALL) -m 644 $(SRCPATH)/x264.h $(DESTDIR)$(includedir)
- $(INSTALL) -m 644 x264_config.h $(DESTDIR)$(includedir)
- $(INSTALL) -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
+install-lib-dev: install-lib-headers install-lib-pc
-install-lib-static: lib-static install-lib-dev
- $(INSTALL) -m 644 $(LIBX264) $(DESTDIR)$(libdir)
+install-lib-headers: $(SRCPATH)/x264.h x264_config.h
+ $(INSTALL_VERBOSE) -d $(DESTDIR)$(includedir)
+ $(INSTALL) -m 644 $^ $(DESTDIR)$(includedir)
+
+install-lib-pc: x264.pc
+ $(INSTALL_VERBOSE) -d $(DESTDIR)$(libdir)
+ $(INSTALL_VERBOSE) -d $(DESTDIR)$(libdir)/pkgconfig
+ $(INSTALL) -m 644 $< $(DESTDIR)$(libdir)/pkgconfig
+
+install-lib-static: install-lib-dev install-static
+
+install-static: $(LIBX264)
+ $(INSTALL) -m 644 $< $(DESTDIR)$(libdir)
$(if $(RANLIB), $(RANLIB) $(DESTDIR)$(libdir)/$(LIBX264))
-install-lib-shared: lib-shared install-lib-dev
+install-lib-shared: install-lib-dev install-shared install-shared-implib
+
+install-shared: $(SONAME)
ifneq ($(IMPLIBNAME),)
- $(INSTALL) -d $(DESTDIR)$(bindir)
- $(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(bindir)
- $(INSTALL) -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)
+ $(INSTALL_VERBOSE) -d $(DESTDIR)$(bindir)
+ $(INSTALL) -m 755 $< $(DESTDIR)$(bindir)
else ifneq ($(SONAME),)
$(Q)ln -f -s $(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)
- $(INSTALL) -m 755 $(SONAME) $(DESTDIR)$(libdir)
+ $(INSTALL) -m 755 $< $(DESTDIR)$(libdir)
+endif
+
+install-shared-implib: $(IMPLIBNAME)
+ifneq ($(IMPLIBNAME),)
+ $(INSTALL) -m 644 $< $(DESTDIR)$(libdir)
endif
uninstall:
diff --git a/configure b/configure
index f99ec00..495499f 100755
--- a/configure
+++ b/configure
@@ -1168,6 +1168,7 @@ AR=$AR
RANLIB=$RANLIB
STRIP=$STRIP
INSTALL=$INSTALL
+INSTALL_VERBOSE=$INSTALL
AS=$AS
ASFLAGS=$ASFLAGS
RC=$RC
--
1.8.3.2
More information about the x264-devel
mailing list