If you say n here, your target will not contain any
documentation.
-config BR2_HAVE_DEVFILES
- bool "development files in target filesystem"
- # We no longer want to support a toolchain on the target
- depends on BR2_DEPRECATED
- help
- Install headers and static libraries in the
- target filesystem
-
config BR2_PACKAGE_OVERRIDE_FILE
string "location of a package override file"
default "$(TOPDIR)/local.mk"
STRIP_FIND_CMD += -not \( $(call findfileclauses,libpthread*.so* $(call qstrip,$(BR2_STRIP_EXCLUDE_FILES))) \) -print
target-finalize:
-ifeq ($(BR2_HAVE_DEVFILES),y)
- ( support/scripts/copy.sh $(STAGING_DIR) $(TARGET_DIR) )
-else
rm -rf $(TARGET_DIR)/usr/include $(TARGET_DIR)/usr/share/aclocal \
$(TARGET_DIR)/usr/lib/pkgconfig $(TARGET_DIR)/usr/share/pkgconfig \
$(TARGET_DIR)/usr/lib/cmake $(TARGET_DIR)/usr/share/cmake
find $(TARGET_DIR)/usr/{lib,share}/ -name '*.cmake' -print0 | xargs -0 rm -f
find $(TARGET_DIR)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
find $(TARGET_DIR)/usr/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs -0 rm -f
-endif
ifneq ($(BR2_PACKAGE_GDB),y)
rm -rf $(TARGET_DIR)/usr/share/gdb
endif
rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0
endef
-ifneq ($(BR2_HAVE_DEVFILES),y)
DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_REMOVE_DEVFILES
-endif
define DBUS_INSTALL_TARGET_FIXUP
mkdir -p $(TARGET_DIR)/var/lib
$(RM) -f $(TARGET_DIR)/usr/bin/dnet-config
endef
-ifneq ($(BR2_HAVE_DEVFILES),y)
LIBDNET_POST_INSTALL_TARGET_HOOKS += LIBDNET_REMOVE_CONFIG_SCRIPT
-endif
$(eval $(autotools-package))
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,glib-genmarshal glib-gettextize glib-mkenums gobject-query gtester gtester-report)
endef
-ifneq ($(BR2_HAVE_DEVFILES),y)
LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES
-endif
define LIBGLIB2_REMOVE_GDB_FILES
rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gdb
$(INSTALL) -m 0644 -D $(@D)/src/lauxlib.h $(STAGING_DIR)/usr/include/lauxlib.h
endef
-ifeq ($(BR2_HAVE_DEVFILES),y)
-define LUA_INSTALL_DEVFILES
- $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \
- $(TARGET_DIR)/usr/lib/pkgconfig/lua.pc
- $(INSTALL) -m 0644 -D $(@D)/src/lua.h $(TARGET_DIR)/usr/include/lua.h
- $(INSTALL) -m 0644 -D $(@D)/src/luaconf.h $(TARGET_DIR)/usr/include/luaconf.h
- $(INSTALL) -m 0644 -D $(@D)/src/lualib.h $(TARGET_DIR)/usr/include/lualib.h
- $(INSTALL) -m 0644 -D $(@D)/src/lauxlib.h $(TARGET_DIR)/usr/include/lauxlib.h
-endef
-endif
-
-
define LUA_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/src/lua $(TARGET_DIR)/usr/bin/lua
$(INSTALL) -m 0755 -D $(@D)/src/luac $(TARGET_DIR)/usr/bin/luac
$(TARGET_DIR)/usr/lib/liblua.so.$(LUA_VERSION)
ln -sf liblua.so.$(LUA_VERSION) $(TARGET_DIR)/usr/lib/liblua.so
$(INSTALL) -m 0644 -D $(@D)/src/liblua.a $(TARGET_DIR)/usr/lib/liblua.a
- $(LUA_INSTALL_DEVFILES)
endef
define HOST_LUA_INSTALL_CMDS
ifeq ($(BR2_PACKAGE_LIBTOOL),y)
MPG123_DEPENDENCIES += libtool
-# .la files gets stripped unless HAVE_DEVFILES is enabled, so directly
-# load .so files rather than .la
+# .la files gets stripped , so directly load .so files rather than .la
MPG123_CONF_OPT += --with-modules --with-module-suffix=.so
endif
$(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR)
endef
-ifeq ($(BR2_HAVE_DEVFILES),y)
-define NCURSES_INSTALL_TARGET_DEVFILES
- mkdir -p $(TARGET_DIR)/usr/include
- cp -dpf $(NCURSES_DIR)/include/curses.h $(TARGET_DIR)/usr/include/curses.h
- cp -dpf $(NCURSES_DIR)/include/ncurses_dll.h $(TARGET_DIR)/usr/include/ncurses_dll.h
- cp -dpf $(NCURSES_DIR)/include/term.h $(TARGET_DIR)/usr/include/
- cp -dpf $(NCURSES_DIR)/include/unctrl.h $(TARGET_DIR)/usr/include/
- cp -dpf $(NCURSES_DIR)/include/termcap.h $(TARGET_DIR)/usr/include/
- cp -dpf $(NCURSES_DIR)/lib/libncurses.a $(TARGET_DIR)/usr/lib/
- (cd $(TARGET_DIR)/usr/lib; \
- ln -fs libncurses.a libcurses.a; \
- ln -fs libncurses.a libtermcap.a; \
- )
- (cd $(TARGET_DIR)/usr/include; ln -fs curses.h ncurses.h)
- rm -f $(TARGET_DIR)/usr/lib/libncurses.so
- (cd $(TARGET_DIR)/usr/lib; ln -fs libncurses.so.$(NCURSES_VERSION) libncurses.so)
-endef
-endif
-
ifneq ($(BR2_PREFER_STATIC_LIB),y)
ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PANEL),y)
cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l
mkdir -p $(TARGET_DIR)/usr/share/terminfo/s
cp -dpf $(STAGING_DIR)/usr/share/terminfo/s/screen $(TARGET_DIR)/usr/share/terminfo/s
- $(NCURSES_INSTALL_TARGET_DEVFILES)
endef # NCURSES_INSTALL_TARGET_CMDS
#
OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_DOC
endif
-ifneq ($(BR2_HAVE_DEVFILES),y)
define OPENCV_CLEAN_INSTALL_CMAKE
$(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCVConfig*.cmake
endef
OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_CMAKE
-endif
ifneq ($(BR2_PACKAGE_OPENCV_INSTALL_DATA),y)
define OPENCV_CLEAN_INSTALL_DATA
define OPENSSL_INSTALL_TARGET_CMDS
$(MAKE1) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install
-endef
-
-define OPENSSL_REMOVE_DEV_FILES
rm -rf $(TARGET_DIR)/usr/lib/ssl
-endef
-
-ifneq ($(BR2_HAVE_DEVFILES),y)
-OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_DEV_FILES
-endif
-
-define OPENSSL_INSTALL_FIXUPS
rm -f $(TARGET_DIR)/usr/bin/c_rehash
endef
-OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS
-
ifneq ($(BR2_PREFER_STATIC_LIB),y)
# libraries gets installed read only, so strip fails
endef
ORC_POST_INSTALL_TARGET_HOOKS += ORC_REMOVE_BUGREPORT
-
-ifneq ($(BR2_HAVE_DEVFILES),y)
ORC_POST_INSTALL_TARGET_HOOKS += ORC_REMOVE_DEVFILES
-endif
$(eval $(autotools-package))
$(eval $(host-autotools-package))
$($(PKG)_INSTALL_INIT_SYSV))
$($(PKG)_INSTALL_TARGET_CMDS)
$(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep))
-ifeq ($(BR2_HAVE_DEVFILES),)
$(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \
$(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \
fi
-endif
$(Q)touch $@
# Clean package
PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_SMTPD
-#
-# Development files removal
-#
-define PYTHON_REMOVE_DEVFILES
- rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR)-config
- rm -f $(TARGET_DIR)/usr/bin/python2-config
- rm -f $(TARGET_DIR)/usr/bin/python-config
-endef
-
-ifneq ($(BR2_HAVE_DEVFILES),y)
-PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_DEVFILES
-endif
-
#
# Remove useless files. In the config/ directory, only the Makefile
# and the pyconfig.h files are needed at runtime.
#
define PYTHON_REMOVE_USELESS_FILES
+ rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR)-config
+ rm -f $(TARGET_DIR)/usr/bin/python2-config
+ rm -f $(TARGET_DIR)/usr/bin/python-config
for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/ \
-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
rm -f $$i ; \
PYTHON3_POST_INSTALL_STAGING_HOOKS += PYTHON3_FIXUP_LIBDIR
-#
-# Development files removal
-#
-define PYTHON3_REMOVE_DEVFILES
- rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config
- rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config
- rm -f $(TARGET_DIR)/usr/bin/python3-config
-endef
-
-ifneq ($(BR2_HAVE_DEVFILES),y)
-PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_DEVFILES
-endif
-
#
# Remove useless files. In the config/ directory, only the Makefile
# and the pyconfig.h files are needed at runtime.
#
define PYTHON3_REMOVE_USELESS_FILES
+ rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config
+ rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config
+ rm -f $(TARGET_DIR)/usr/bin/python3-config
for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-3.3m/ \
-type f -not -name pyconfig.h -a -not -name Makefile` ; do \
rm -f $$i ; \
endif
# target shared libs doesn't get removed by make uninstall if the .la
-# files are removed (E.G. if BR2_HAVE_DEVFILES isn't set)
+# files are removed
define SDL_SOUND_UNINSTALL_TARGET_CMDS
$(MAKE) DESTDIR=$(TARGET_DIR) uninstall -C $(@D)
rm -f $(TARGET_DIR)/usr/lib/libSDL_sound*so*
rm -f $(TARGET_DIR)/usr/bin/taglib-config
endef
-ifneq ($(BR2_HAVE_DEVFILES),y)
TAGLIB_POST_INSTALL_TARGET_HOOKS += TAGLIB_REMOVE_DEVFILE
-endif
$(eval $(cmake-package))
rm -f $(TARGET_DIR)/usr/bin/libusb-config
endef
-ifneq ($(BR2_HAVE_DEVFILES),y)
USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_DEVFILES
-endif
$(eval $(autotools-package))
XENOMAI_CONF_OPT += --includedir=/usr/include/xenomai/
-ifeq ($(BR2_HAVE_DEVFILES),)
define XENOMAI_REMOVE_DEVFILES
for i in xeno-config xeno-info wrap-link.sh ; do \
rm -f $(TARGET_DIR)/usr/bin/$$i ; \
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_DEVFILES
-endif
ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),)
define XENOMAI_REMOVE_TESTSUITE
+++ /dev/null
-#!/bin/sh
-
-STAGING_DIR=$1
-TARGET_DIR=$2
-
-echo "Copying development files to target..."
-
-cp -af ${STAGING_DIR}/usr/include ${TARGET_DIR}/usr
-
-for LIBSDIR in /lib /usr/lib; do
- for WILDCARD in *.a *.la; do
- for FILE_PATH in `find ${STAGING_DIR}${LIBSDIR} -name ${WILDCARD}`; do
- STAGING_STRIPPED=${FILE_PATH##${STAGING_DIR}}
- EXTENDED_DIR=${STAGING_STRIPPED%/${WILDCARD}}
- mkdir -p ${TARGET_DIR}${EXTENDED_DIR}
- cp -fa ${FILE_PATH} ${TARGET_DIR}${STAGING_STRIPPED}
- #echo ${TARGET_DIR}${STAGING_STRIPPED}
- done
- done
-done