From 79e97a6757fe46c9ceaeacb6d29b8db9b2cbe8f3 Mon Sep 17 00:00:00 2001 From: Abdoulaye Walsimou Gaye Date: Thu, 9 Jan 2014 22:41:44 +0100 Subject: Packages: optimize use of embtk_postinstallx_{pkgname} Signed-off-by: Abdoulaye Walsimou Gaye --- packages/development/gdb/gdb.mk | 2 +- packages/graphics/directfb/directfb.mk | 11 ++++++++--- packages/graphics/gtk/gtk.mk | 11 ++++++++--- packages/misc/gettext/gettext.mk | 4 +--- packages/net/libnl/libnl.mk | 5 ++--- packages/scripting-languages/lua-modules/cgilua/cgilua.mk | 3 ++- packages/scripting-languages/lua-modules/rings/rings.mk | 3 ++- packages/security/openssl/openssl.mk | 11 ++++++----- packages/x11/libx11/libx11.mk | 6 ++++-- packages/x11/libxcb/libxcb.mk | 3 +-- packages/x11/xcbutil/xcbutil.mk | 4 +--- 11 files changed, 36 insertions(+), 27 deletions(-) (limited to 'packages') diff --git a/packages/development/gdb/gdb.mk b/packages/development/gdb/gdb.mk index 22a9dbc..d12cf10 100644 --- a/packages/development/gdb/gdb.mk +++ b/packages/development/gdb/gdb.mk @@ -64,7 +64,7 @@ GDBSERVER_BINS := $(if $(CONFIG_EMBTK_HAVE_GDB),,gdbserver) GDBSERVER_INCLUDES := $(if $(CONFIG_EMBTK_HAVE_GDB),,$(__GDB_INCLUDES)) GDBSERVER_LIBS := $(if $(CONFIG_EMBTK_HAVE_GDB),,$(__GDB_LIBS)) -define embtk_postinstall_gdbserver +define embtk_postinstallonce_gdbserver rm -rf $(addprefix $(embtk_sysroot)/usr/bin/,$(GDB_BINS)) endef diff --git a/packages/graphics/directfb/directfb.mk b/packages/graphics/directfb/directfb.mk index 64f60ae..be8a0f9 100644 --- a/packages/graphics/directfb/directfb.mk +++ b/packages/graphics/directfb/directfb.mk @@ -99,12 +99,17 @@ DIRECTFB_CONFIGURE_OPTS += $(CONFIG_DIRECTFB_INPUTS-y) DIRECTFB_DEPS := libpng_install freetype_install libjpeg_install DIRECTFB_DEPS += $(if $(CONFIG_EMBTK_DIRECTFB_INPUT_TSLIB),tslib_install) -define embtk_postinstall_directfb - $(Q)test -e $(DIRECTFB_BUILD_DIR)/.patchlibtool || \ +define embtk_postinstallonce_directfb $(MAKE) $(DIRECTFB_BUILD_DIR)/.patchlibtool + $(Q)mkdir -p $(embtk_sysroot) + $(Q)mkdir -p $(embtk_sysroot)/etc + $(Q)-cp $(DIRECTFB_BUILD_DIR)/fb.modes $(embtk_sysroot)/etc +endef + +define embtk_postinstall_directfb $(Q)mkdir -p $(embtk_rootfs) $(Q)mkdir -p $(embtk_rootfs)/etc - $(Q)-cp $(DIRECTFB_BUILD_DIR)/fb.modes $(embtk_rootfs)/etc + $(Q)-cp $(embtk_sysroot)/etc/fb.modes $(embtk_rootfs)/etc $(Q)mkdir -p $(embtk_rootfs)/usr $(Q)mkdir -p $(embtk_rootfs)/usr/$(LIBDIR) $(Q)-cp -R $(embtk_sysroot)/usr/lib/directfb-*-* $(embtk_rootfs)/usr/$(LIBDIR) diff --git a/packages/graphics/gtk/gtk.mk b/packages/graphics/gtk/gtk.mk index 832d1a0..d7d3a78 100644 --- a/packages/graphics/gtk/gtk.mk +++ b/packages/graphics/gtk/gtk.mk @@ -56,10 +56,15 @@ GTK_CONFIGURE_OPTS := $(GTK_BACKEND) GTK_CONFIGURE_OPTS += --disable-cups --disable-gtk-doc --disable-glibtest GTK_CONFIGURE_OPTS += LIBPNG=-lpng -define embtk_postinstall_gtk - $(Q)test -e $(GTK_BUILD_DIR)/.patchlibtool || \ +define embtk_postinstallonce_gtk $(MAKE) $(GTK_BUILD_DIR)/.patchlibtool - $(Q)-cp -R $(embtk_sysroot)/usr/$(LIBDIR)/gtk-* $(embtk_rootfs)/usr/$(LIBDIR)/ +endef + +define embtk_postinstall_gtk + mkdir -p $(embtk_rootfs) + mkdir -p $(embtk_rootfs)/usr + mkdir -p $(embtk_rootfs)/usr/$(LIBDIR) + -cp -R $(embtk_sysroot)/usr/$(LIBDIR)/gtk-* $(embtk_rootfs)/usr/$(LIBDIR)/ endef $(GTK_BUILD_DIR)/.patchlibtool: diff --git a/packages/misc/gettext/gettext.mk b/packages/misc/gettext/gettext.mk index 2b7f973..4829f08 100644 --- a/packages/misc/gettext/gettext.mk +++ b/packages/misc/gettext/gettext.mk @@ -53,8 +53,7 @@ GETTEXT_CONFIGURE_OPTS := --enable-relocatable --with-included-gettext \ GETTEXT_DEPS = ncurses_install libxml2_install -define embtk_postinstall_gettext - $(Q)test -e $(GETTEXT_BUILD_DIR)/.patchlibtool || \ +define embtk_postinstallonce_gettext $(MAKE) $(GETTEXT_BUILD_DIR)/.patchlibtool endef @@ -68,7 +67,6 @@ $(GETTEXT_BUILD_DIR)/.patchlibtool: $(Q)sed \ -i "s;/usr/$(LIBDIR)/libgettextlib.la;$(embtk_sysroot)/$(LIBDIR)/libgettextlib.la;" \ $(embtk_sysroot)/usr/$(LIBDIR)/libgettextsrc.la - @touch $@ # gettext for host development machine GETTEXT_HOST_NAME := $(GETTEXT_NAME) diff --git a/packages/net/libnl/libnl.mk b/packages/net/libnl/libnl.mk index c6d22ab..dedb281 100644 --- a/packages/net/libnl/libnl.mk +++ b/packages/net/libnl/libnl.mk @@ -44,7 +44,6 @@ __LIBNL_SHARES += nl-pktloc-lookup.8 nl-qdisc-add.8 nl-qdisc-delete.8 __LIBNL_SHARES += nl-qdisc-list.8 LIBNL_SHARES := $(addprefix man/man8/,$(__LIBNL_SHARES)) -define embtk_postinstall_libnl - test -e $(LIBNL_BUILD_DIR)/.installed || \ - $(call __embtk_fix_libtool_files,$(LIBDIR)/libnl) +define embtk_postinstallonce_libnl + $(call __embtk_fix_libtool_files,$(LIBDIR)/libnl) endef diff --git a/packages/scripting-languages/lua-modules/cgilua/cgilua.mk b/packages/scripting-languages/lua-modules/cgilua/cgilua.mk index 35f2915..914706d 100644 --- a/packages/scripting-languages/lua-modules/cgilua/cgilua.mk +++ b/packages/scripting-languages/lua-modules/cgilua/cgilua.mk @@ -36,8 +36,9 @@ CGILUA_DEPS = lua_install luafilesystem_install rings_install CGILUA_MAKE_OPTS = PREFIX=$(embtk_sysroot)/usr/ -cgilua_install: +define embtk_install_cgilua $(call embtk_makeinstall_pkg,cgilua) +endef define embtk_postinstall_cgilua $(Q)mkdir -p $(embtk_rootfs) diff --git a/packages/scripting-languages/lua-modules/rings/rings.mk b/packages/scripting-languages/lua-modules/rings/rings.mk index 6b3d5b1..6170333 100644 --- a/packages/scripting-languages/lua-modules/rings/rings.mk +++ b/packages/scripting-languages/lua-modules/rings/rings.mk @@ -39,8 +39,9 @@ RINGS_MAKE_OPTS += CC=$(TARGETCC_CACHED) RINGS_MAKE_OPTS += LDFLAGS="-L$(embtk_sysroot)/$(LIBDIR) -L$(embtk_sysroot)/usr/$(LIBDIR)" RINGS_MAKE_OPTS += CFLAGS="$(TARGET_CFLAGS) -I$(embtk_sysroot)/usr/include" -rings_install: +define embtk_install_rings $(call embtk_makeinstall_pkg,rings) +endef define embtk_postinstall_rings $(Q)mkdir -p $(embtk_rootfs) diff --git a/packages/security/openssl/openssl.mk b/packages/security/openssl/openssl.mk index 057a816..f916ac7 100644 --- a/packages/security/openssl/openssl.mk +++ b/packages/security/openssl/openssl.mk @@ -55,8 +55,9 @@ else OPENSSL_LINUX_TARGET := linux-generic32 endif -openssl_install: +define embtk_install_openssl $(call embtk_makeinstall_pkg,openssl) +endef define embtk_beforeinstall_openssl $(Q)rm -rf $(OPENSSL_BUILD_DIR)/.postinstalled @@ -65,11 +66,11 @@ define embtk_beforeinstall_openssl --openssldir=/etc/ssl --prefix=/usr shared endef +define embtk_postinstallonce_openssl + $(MAKE) libtool_files_adapt +endef + define embtk_postinstall_openssl - $(Q)if [ ! -e $(OPENSSL_BUILD_DIR)/.postinstalled ]; then \ - $(MAKE) libtool_files_adapt; \ - touch $(OPENSSL_BUILD_DIR)/.postinstalled; \ - fi $(Q)mkdir -p $(embtk_rootfs) $(Q)mkdir -p $(embtk_rootfs)/etc $(Q)-cp -R $(embtk_sysroot)/etc/ssl $(embtk_rootfs)/etc/ diff --git a/packages/x11/libx11/libx11.mk b/packages/x11/libx11/libx11.mk index 844b5c4..2788403 100644 --- a/packages/x11/libx11/libx11.mk +++ b/packages/x11/libx11/libx11.mk @@ -52,9 +52,11 @@ define embtk_beforeinstall_libx11 $(hostcc_cached) makekeys.c -o makekeys endef -define embtk_postinstall_libx11 - $(Q)test -e $(LIBX11_BUILD_DIR)/.patchlibtool || \ +define embtk_postinstallonce_libx11 $(MAKE) $(LIBX11_BUILD_DIR)/.patchlibtool +endef + +define embtk_postinstall_libx11 $(Q)-mkdir -p $(embtk_rootfs)/usr/share $(Q)-mkdir -p $(embtk_rootfs)/usr/share/X11 $(Q)-cp $(embtk_sysroot)/usr/share/X11/XErrorDB $(embtk_rootfs)/usr/share/X11/ diff --git a/packages/x11/libxcb/libxcb.mk b/packages/x11/libxcb/libxcb.mk index c3484db..d227d19 100644 --- a/packages/x11/libxcb/libxcb.mk +++ b/packages/x11/libxcb/libxcb.mk @@ -41,8 +41,7 @@ LIBXCB_CONFIGURE_OPTS := --enable-xinput LIBXCB_DEPS := xcbproto_install libpthreadstubs_install libxau_install -define embtk_postinstall_libxcb - $(Q)test -e $(LIBXCB_BUILD_DIR)/.patchlibtool || \ +define embtk_postinstallonce_libxcb $(MAKE) $(LIBXCB_BUILD_DIR)/.patchlibtool endef diff --git a/packages/x11/xcbutil/xcbutil.mk b/packages/x11/xcbutil/xcbutil.mk index 350a372..b656ae9 100644 --- a/packages/x11/xcbutil/xcbutil.mk +++ b/packages/x11/xcbutil/xcbutil.mk @@ -46,8 +46,7 @@ XCBUTIL_PKGCONFIGS = xcb-atom.pc xcb-aux.pc xcb-event.pc xcb-icccm.pc \ XCBUTIL_DEPS = gperf_host_install libxcb_install -define embtk_postinstall_xcbutil - $(Q)test -e $(XCBUTIL_BUILD_DIR)/.patchlibtool || \ +define embtk_postinstallonce_xcbutil $(MAKE) $(XCBUTIL_BUILD_DIR)/.patchlibtool endef @@ -64,4 +63,3 @@ $(XCBUTIL_BUILD_DIR)/.patchlibtool: sed \ -i "s; /usr/$(LIBDIR)/libxcb-atom.la ; $(embtk_sysroot)/usr/$(LIBDIR)/libxcb-atom.la ;" $$i; \ done - $(Q)touch $@ -- cgit v1.2.3