From fcba898e68e8277b402c6b35a85fa6e80b900c64 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 14 Jul 2019 23:36:55 +0200 Subject: [PATCH] - introduce and use remove-dir variables --- make/environment-build.mk | 6 +- make/environment-target.mk | 28 ++++++++ make/host-tools.mk | 8 +-- make/neutrino-plugins.mk | 2 +- make/target-development.mk | 14 ++-- make/target-ffmpeg-armbox.mk | 4 +- make/target-ffmpeg-coolstream.mk | 4 +- make/target-gstreamer-unused.mk | 30 ++++----- make/target-libs-unused.mk | 2 +- make/target-libs.mk | 67 +++++++++---------- make/target-lua.mk | 4 +- make/target-rootfs.mk | 6 +- make/target-tools-unused.mk | 10 +-- make/target-tools.mk | 106 +++++++++++++++---------------- 14 files changed, 149 insertions(+), 142 deletions(-) diff --git a/make/environment-build.mk b/make/environment-build.mk index de11445d..53cd06bc 100644 --- a/make/environment-build.mk +++ b/make/environment-build.mk @@ -273,7 +273,7 @@ REWRITE_PKGCONF = $(REWRITE_CONFIG_RULES) $(PKG_CONFIG_PATH) # unpack tarballs, clean up UNTAR = tar -C $(BUILD_TMP) -xf $(ARCHIVE) UNZIP = unzip -d $(BUILD_TMP) -o $(ARCHIVE) -REMOVE = rm -rf $(TARGET_DIR)/.remove $(BUILD_TMP) +REMOVE = rm -rf $(BUILD_TMP) PATCH = patch -p1 -i $(PATCHES) # download tarballs into archive directory @@ -325,8 +325,8 @@ CMAKE_OPTS = \ -DCMAKE_SYSTEM_NAME="Linux" \ -DCMAKE_SYSTEM_PROCESSOR="$(BOXARCH)" \ -DCMAKE_INSTALL_PREFIX="" \ - -DCMAKE_INSTALL_DOCDIR="/.remove" \ - -DCMAKE_INSTALL_MANDIR="/.remove" \ + -DCMAKE_INSTALL_DOCDIR="$(remove-docdir)" \ + -DCMAKE_INSTALL_MANDIR="$(remove-mandir)" \ -DCMAKE_PREFIX_PATH="$(TARGET_DIR)" \ -DCMAKE_INCLUDE_PATH="$(TARGET_INCLUDE_DIR)" \ -DCMAKE_C_COMPILER="$(TARGET)-gcc" \ diff --git a/make/environment-target.mk b/make/environment-target.mk index 11ee29b8..7dbf6b8c 100644 --- a/make/environment-target.mk +++ b/make/environment-target.mk @@ -31,6 +31,34 @@ $(VARPLUGINS) : | $(TARGET_DIR) # ----------------------------------------------------------------------------- +# https://www.gnu.org/prep/standards/html_node/Directory-Variables.html +remove-dir = /.remove +remove-bindir = $(remove-dir)/bin +remove-sbindir = $(remove-dir)/sbin +remove-libexecdir = $(remove-dir)/libexec +remove-datarootdir = $(remove-dir)/share +remove-datadir = $(remove-datarootdir) +remove-sysconfdir = $(remove-dir)/etc +remove-sharedstatedir = $(remove-dir)/com +remove-localstatedir = $(remove-dir)/var +remove-runstatedir = $(remove-dir)/run +remove-includedir = $(remove-dir)/include +remove-oldincludedir = $(remove-includedir) +remove-docdir = $(remove-datarootdir)/doc +remove-infodir = $(remove-datarootdir)/info +remove-htmldir = $(remove-docdir) +remove-dvidir = $(remove-docdir) +remove-pdfdir = $(remove-docdir) +remove-psdir = $(remove-docdir) +remove-libdir = $(remove-dir)/lib +remove-lispdir = $(remove-datarootdir)/emacs/site-lisp +remove-localedir = $(remove-datarootdir)/locale +remove-mandir = $(remove-datarootdir)/man +remove-man1dir = $(remove-mandir)/man1 +remove-man2dir = $(remove-mandir)/man2 + +# ----------------------------------------------------------------------------- + # ca-certificates CA-BUNDLE = ca-certificates.crt CA-BUNDLE_DIR = /etc/ssl/certs diff --git a/make/host-tools.mk b/make/host-tools.mk index bfa2ca28..4eeed65c 100644 --- a/make/host-tools.mk +++ b/make/host-tools.mk @@ -269,8 +269,6 @@ $(HOST_DIR)/bin/resize2fs: $(ARCHIVE)/$(HOST_E2FSPROGS_SOURCE) | $(HOST_DIR)/bin # ----------------------------------------------------------------------------- -HOST_LUA = $(HOST_DIR)/bin/lua - HOST_LUA_VER = $(LUA_VER) HOST_LUA_TMP = lua-$(HOST_LUA_VER) HOST_LUA_SOURCE = lua-$(HOST_LUA_VER).tar.gz @@ -282,6 +280,8 @@ HOST_LUA_URL = http://www.lua.org/ftp HOST_LUA_PATCH = lua-01-fix-LUA_ROOT.patch HOST_LUA_PATCH += lua-01-remove-readline.patch +HOST_LUA = $(HOST_DIR)/bin/lua + host-lua: $(HOST_LUA) $(HOST_LUA): $(ARCHIVE)/$(HOST_LUA_SOURCE) | $(HOST_DIR) $(REMOVE)/$(HOST_LUA_TMP) @@ -294,8 +294,6 @@ $(HOST_LUA): $(ARCHIVE)/$(HOST_LUA_SOURCE) | $(HOST_DIR) # ----------------------------------------------------------------------------- -HOST_LUAROCKS = $(HOST_DIR)/bin/luarocks - HOST_LUAROCKS_VER = 3.1.3 HOST_LUAROCKS_TMP = luarocks-$(HOST_LUAROCKS_VER) HOST_LUAROCKS_SOURCE = luarocks-$(HOST_LUAROCKS_VER).tar.gz @@ -318,6 +316,8 @@ HOST_LUAROCKS_BUILDENV = \ TARGET_INCLUDE_DIR="$(TARGET_INCLUDE_DIR)" \ TARGET_LIB_DIR="$(TARGET_LIB_DIR)" +HOST_LUAROCKS = $(HOST_DIR)/bin/luarocks + host-luarocks: $(HOST_LUAROCKS) $(HOST_LUAROCKS): $(HOST_LUA) $(ARCHIVE)/$(HOST_LUAROCKS_SOURCE) | $(HOST_DIR) $(REMOVE)/$(HOST_LUAROCKS_TMP) diff --git a/make/neutrino-plugins.mk b/make/neutrino-plugins.mk index f44c7c56..50981df1 100644 --- a/make/neutrino-plugins.mk +++ b/make/neutrino-plugins.mk @@ -176,7 +176,7 @@ $(D)/links: $(D)/libpng $(D)/libjpeg $(D)/openssl $(ARCHIVE)/$(LINKS_SOURCE) $(S autoreconf -vfi; \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --enable-graphics \ --with-fb \ --with-libjpeg \ diff --git a/make/target-development.mk b/make/target-development.mk index 14be6703..f9c5a34e 100644 --- a/make/target-development.mk +++ b/make/target-development.mk @@ -29,8 +29,8 @@ $(D)/valgrind-hd2: $(ARCHIVE)/$(VALGRIND_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --prefix= \ --enable-only32bit \ - --mandir=/.remove \ - --datadir=/.remove \ + --mandir=$(remove-mandir) \ + --datadir=$(remove-datadir) \ ; \ $(MAKE) all; \ make install DESTDIR=$(TARGET_DIR) @@ -55,8 +55,8 @@ $(D)/valgrind-hd1: $(CONFIGURE) \ --prefix= \ --enable-only32bit \ - --mandir=/.remove \ - --datadir=/.remove \ + --mandir=$(remove-mandir) \ + --datadir=$(remove-datadir) \ ; \ $(MAKE) all; \ make install DESTDIR=$(TARGET_DIR) @@ -80,7 +80,7 @@ $(D)/strace: $(ARCHIVE)/$(STRACE_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(STRACE_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --enable-silent-rules \ ; \ $(MAKE) all; \ @@ -105,8 +105,8 @@ $(D)/gdb: $(D)/zlib $(D)/ncurses $(ARCHIVE)/$(GDB_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(GDB_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ - --infodir=/.remove \ + --mandir=$(remove-mandir) \ + --infodir=$(remove-infodir) \ --disable-binutils \ --disable-werror \ --with-curses \ diff --git a/make/target-ffmpeg-armbox.mk b/make/target-ffmpeg-armbox.mk index 1d1f8957..0ffe5ad0 100644 --- a/make/target-ffmpeg-armbox.mk +++ b/make/target-ffmpeg-armbox.mk @@ -35,9 +35,7 @@ FFMPEG_DEPS = $(D)/openssl $(D)/freetype $(D)/librtmp $(D)/libbluray $(D)/libass FFMPEG_CONFIGURE_GENERIC = \ --prefix=/ \ --cross-prefix=$(TARGET)- \ - --mandir=/.remove \ - --datadir=/.remove \ - --docdir=/.remove \ + --datadir=$(remove-datadir) \ \ --disable-doc \ --disable-htmlpages \ diff --git a/make/target-ffmpeg-coolstream.mk b/make/target-ffmpeg-coolstream.mk index 348d388e..32eb9eb0 100644 --- a/make/target-ffmpeg-coolstream.mk +++ b/make/target-ffmpeg-coolstream.mk @@ -22,9 +22,7 @@ endif FFMPEG_CONFIGURE_GENERIC = \ --prefix=/ \ --cross-prefix=$(TARGET)- \ - --mandir=/.remove \ - --datadir=/.remove \ - --docdir=/.remove \ + --datadir=$(remove-datadir) \ \ --disable-doc \ --disable-htmlpages \ diff --git a/make/target-gstreamer-unused.mk b/make/target-gstreamer-unused.mk index e2b37f25..1bf98296 100644 --- a/make/target-gstreamer-unused.mk +++ b/make/target-gstreamer-unused.mk @@ -44,7 +44,7 @@ $(D)/gstreamer: $(D)/glib2 $(D)/libxml2 $(D)/glib-networking $(ARCHIVE)/$(GSTREA $(CONFIGURE) \ --prefix= \ --libexecdir=/lib \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-silent-rules \ $(GST_PLUGIN_CONFIG_DEBUG) \ --disable-tests \ @@ -98,7 +98,7 @@ $(D)/gst-plugins-base: $(ARCHIVE)/$(GST_PLUGINS_BASE_SOURCE) $(D)/gstreamer $(D) ./autogen.sh --noconfigure; \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-silent-rules \ --disable-valgrind \ $(GST_PLUGIN_CONFIG_DEBUG) \ @@ -154,7 +154,7 @@ $(D)/gst-plugins-good: $(ARCHIVE)/$(GST_PLUGINS_GOOD_SOURCE) $(D)/gst-plugins-ba ./autogen.sh --noconfigure; \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-silent-rules \ --disable-valgrind \ $(GST_PLUGIN_CONFIG_DEBUG) \ @@ -196,7 +196,7 @@ $(D)/gst-plugins-bad: $(ARCHIVE)/$(GST_PLUGINS_BAD_SOURCE) $(D)/gst-plugins-base --build=$(BUILD) \ --host=$(TARGET) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-silent-rules \ --disable-valgrind \ $(GST_PLUGIN_CONFIG_DEBUG) \ @@ -246,7 +246,7 @@ $(D)/gst-plugins-ugly: $(ARCHIVE)/$(GST_PLUGINS_UGLY_SOURCE) $(D)/gst-plugins-ba ./autogen.sh --noconfigure; \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-silent-rules \ --disable-valgrind \ $(GST_PLUGIN_CONFIG_DEBUG) \ @@ -414,7 +414,7 @@ $(D)/orc: $(ARCHIVE)/$(ORC_SOURCE) $(UNTAR)/$(ORC_SOURCE) $(CHDIR)/orc-$(ORC_VER); \ $(CONFIGURE) \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --prefix= \ ; \ $(MAKE) all; \ @@ -440,7 +440,7 @@ $(D)/libdca: $(ARCHIVE)/$(LIBDCA_SOURCE) $(CHDIR)/libdca-$(LIBDCA_VER); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE) all; \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -489,7 +489,7 @@ $(D)/gmp: $(ARCHIVE)/$(GMP_SOURCE) $(CHDIR)/gmp-$(GMP_VER); \ $(CONFIGURE) \ --prefix= \ - --infodir=/.remove \ + --infodir=$(remove-infodir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -513,9 +513,7 @@ $(D)/gnutls: $(D)/nettle $(D)/ca-bundle $(ARCHIVE)/$(GNUTLS_SOURCE) $(CHDIR)/gnutls-$(GNUTLS_VER); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ - --infodir=/.remove \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --with-included-libtasn1 \ --enable-local-libopts \ --with-libpthread-prefix=$(TARGET_DIR) \ @@ -550,9 +548,7 @@ $(D)/glib-networking: $(D)/gnutls $(D)/glib2 $(ARCHIVE)/$(GLIB-NETWORKING_SOURCE $(CHDIR)/glib-networking-$(GLIB-NETWORKING_VER); \ $(CONFIGURE) \ --prefix= \ - --datadir=/.remove \ - --datarootdir=/.remove \ - --localedir=/.remove \ + --datarootdir=$(remove-datarootdir) \ ; \ $(MAKE); \ $(MAKE) install prefix=$(TARGET_DIR) @@ -575,7 +571,7 @@ $(D)/libsoup: $(D)/sqlite $(D)/libxml2 $(D)/glib2 $(ARCHIVE)/$(LIBSOUP_SOURCE) $(CHDIR)/libsoup-$(LIBSOUP_VER); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --disable-more-warnings \ --without-gnome \ --disable-gtk-doc \ @@ -583,7 +579,7 @@ $(D)/libsoup: $(D)/sqlite $(D)/libxml2 $(D)/glib2 $(ARCHIVE)/$(LIBSOUP_SOURCE) --disable-gtk-doc-pdf \ ; \ $(MAKE); \ - $(MAKE) install DESTDIR=$(TARGET_DIR) itlocaledir=$$(TARGET_DIR)/.remove + $(MAKE) install DESTDIR=$(TARGET_DIR) itlocaledir=$(remove-localedir) $(REWRITE_PKGCONF)/libsoup-2.4.pc $(REWRITE_LIBTOOL)/libsoup-2.4.la $(REMOVE)/libsoup-$(LIBSOUP_VER) @@ -603,7 +599,7 @@ $(D)/sqlite: $(ARCHIVE)/$(SQLITE_SOURCE) $(CHDIR)/sqlite-autoconf-$(SQLITE_VER); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE) all; \ $(MAKE) install DESTDIR=$(TARGET_DIR) diff --git a/make/target-libs-unused.mk b/make/target-libs-unused.mk index dddedfa5..ee3938a1 100644 --- a/make/target-libs-unused.mk +++ b/make/target-libs-unused.mk @@ -47,7 +47,7 @@ $(D)/libFLAC: $(ARCHIVE)/$(FLAC_SOURCE) | $(TARGET_DIR) autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-shared \ --disable-static \ --disable-cpplibs \ diff --git a/make/target-libs.mk b/make/target-libs.mk index 3f83dbbb..b9363ee2 100644 --- a/make/target-libs.mk +++ b/make/target-libs.mk @@ -20,7 +20,7 @@ $(D)/zlib: $(ARCHIVE)/$(ZLIB_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(ZLIB_TMP); \ $(call apply_patches, $(ZLIB_PATCH)); \ $(BUILDENV) \ - mandir=/.remove \ + mandir=$(remove-mandir) \ ./configure \ --prefix= \ --shared \ @@ -48,7 +48,7 @@ $(D)/libfuse: $(ARCHIVE)/$(FUSE_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(FUSE_TMP); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --disable-static \ --disable-example \ --disable-mtab \ @@ -142,7 +142,7 @@ $(D)/giflib: $(ARCHIVE)/$(GIFLIB_SOURCE) | $(TARGET_DIR) --prefix= \ --disable-static \ --enable-shared \ - --bindir=/.remove \ + --bindir=$(remove-bindir) \ ; \ $(MAKE) all; \ make install DESTDIR=$(TARGET_DIR) @@ -171,8 +171,7 @@ $(D)/libcurl: $(D)/zlib $(D)/openssl $(D)/librtmp $(D)/ca-bundle $(ARCHIVE)/curl $(CHDIR)/$(LIBCURL_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --disable-manual \ --disable-file \ --disable-rtsp \ @@ -230,7 +229,7 @@ $(D)/libpng: $(D)/zlib $(ARCHIVE)/$(LIBPNG_SOURCE) | $(TARGET_DIR) $(call apply_patches, $(LIBPNG_PATCH)); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --enable-silent-rules \ $(LIBPNG_CONF) \ --disable-static \ @@ -271,7 +270,7 @@ $(D)/freetype: $(D)/zlib $(D)/libpng $(ARCHIVE)/$(FREETYPE_SOURCE) | $(TARGET_DI $(CHDIR)/$(FREETYPE_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --enable-shared \ --disable-static \ --enable-freetype-config \ @@ -320,10 +319,8 @@ $(D)/libjpeg-turbo: $(ARCHIVE)/$(LIBJPEG-TURBO_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --prefix= \ --enable-shared \ - --mandir=/.remove \ - --bindir=/.remove \ - --datadir=/.remove \ - --datarootdir=/.remove \ + --bindir=$(remove-bindir) \ + --datarootdir=$(remove-datarootdir) \ --disable-static \ ; \ $(MAKE); \ @@ -353,8 +350,6 @@ $(D)/libjpeg-turbo2: $(ARCHIVE)/$(LIBJPEG-TURBO2_SOURCE) | $(TARGET_DIR) $(CMAKE) \ -DWITH_SIMD=False \ -DWITH_JPEG8=80 \ - -DCMAKE_INSTALL_DOCDIR=/.remove \ - -DCMAKE_INSTALL_MANDIR=/.remove \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -401,7 +396,7 @@ $(D)/openssl: $(ARCHIVE)/$(OPENSSL_SOURCE) | $(TARGET_DIR) $(TARGET_LDFLAGS) \ -DOPENSSL_SMALL_FOOTPRINT \ --prefix=/ \ - --openssldir=/.remove \ + --openssldir=$(remove-dir)/ssl \ ; \ make $(OPENSSL_FLAGS) depend; \ sed -i "s# build_tests##" Makefile; \ @@ -555,7 +550,7 @@ $(D)/libgd2: $(D)/zlib $(D)/libpng $(D)/libjpeg $(D)/freetype $(ARCHIVE)/$(LIBGD ./bootstrap.sh; \ $(CONFIGURE) \ --prefix= \ - --bindir=/.remove \ + --bindir=$(remove-bindir) \ --without-fontconfig \ --without-xpm \ --without-x \ @@ -606,8 +601,8 @@ $(D)/lzo: $(ARCHIVE)/$(LZO_SOURCE) | $(TARGET_DIR) $(UNTAR)/$(LZO_SOURCE) $(CHDIR)/$(LZO_TMP); \ $(CONFIGURE) \ - --mandir=/.remove \ - --docdir=/.remove \ + --mandir=$(remove-mandir) \ + --docdir=$(remove-docdir) \ --prefix= \ ; \ $(MAKE); \ @@ -664,8 +659,8 @@ $(D)/expat: $(ARCHIVE)/$(EXPAT_SOURCE) | $(TARGET_DIR) autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --docdir=/.remove \ - --mandir=/.remove \ + --docdir=$(remove-docdir) \ + --mandir=$(remove-mandir) \ --enable-shared \ --disable-static \ --without-xmlwf \ @@ -775,9 +770,7 @@ $(D)/libgpg-error: $(ARCHIVE)/$(LIBGPG-ERROR_SOURCE) | $(TARGET_DIR) popd; \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ - --infodir=/.remove \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-maintainer-mode \ --enable-shared \ --disable-static \ @@ -808,9 +801,7 @@ $(D)/libgcrypt: $(D)/libgpg-error $(ARCHIVE)/$(LIBGCRYPT_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(LIBGCRYPT_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ - --infodir=/.remove \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-maintainer-mode \ --enable-silent-rules \ --enable-shared \ @@ -909,7 +900,7 @@ $(D)/libxml2: $(ARCHIVE)/$(LIBXML2_SOURCE) | $(TARGET_DIR) --prefix= \ --enable-shared \ --disable-static \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --without-python \ --without-debug \ --without-c14n \ @@ -962,7 +953,7 @@ $(D)/librtmp: $(D)/zlib $(D)/openssl $(SOURCE_DIR)/$(NI-RTMPDUMP) | $(TARGET_DIR tar -C $(SOURCE_DIR) -cp $(NI-RTMPDUMP) --exclude-vcs | tar -C $(BUILD_TMP) -x $(CHDIR)/$(NI-RTMPDUMP); \ make CROSS_COMPILE=$(TARGET)- XCFLAGS="-I$(TARGET_INCLUDE_DIR) -L$(TARGET_LIB_DIR)" LDFLAGS="-L$(TARGET_LIB_DIR)" prefix=$(TARGET_DIR);\ - make install DESTDIR=$(TARGET_DIR) prefix="" mandir=/.remove + make install DESTDIR=$(TARGET_DIR) prefix="" mandir=$(remove-mandir) rm -rf $(TARGET_DIR)/sbin/rtmpgw rm -rf $(TARGET_DIR)/sbin/rtmpsrv rm -rf $(TARGET_DIR)/sbin/rtmpsuck @@ -998,7 +989,7 @@ $(D)/libtirpc: $(ARCHIVE)/$(LIBTIRPC_SOURCE) | $(TARGET_DIR) --prefix= \ --disable-gssapi \ --enable-silent-rules \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -1023,8 +1014,8 @@ $(D)/confuse: $(ARCHIVE)/$(CONFUSE_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(CONFUSE_TMP); \ $(CONFIGURE) \ --prefix= \ - --docdir=/.remove \ - --mandir=/.remove \ + --docdir=$(remove-docdir) \ + --mandir=$(remove-mandir) \ --enable-silent-rules \ --enable-static \ --disable-shared \ @@ -1051,8 +1042,8 @@ $(D)/libite: $(ARCHIVE)/$(LIBITE_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(LIBITE_TMP); \ $(CONFIGURE) \ --prefix= \ - --docdir=/.remove \ - --mandir=/.remove \ + --docdir=$(remove-docdir) \ + --mandir=$(remove-docdir) \ --enable-silent-rules \ --enable-static \ --disable-shared \ @@ -1142,7 +1133,7 @@ $(D)/libogg: $(ARCHIVE)/$(LIBOGG_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(LIBOGG_TMP); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-shared \ ; \ $(MAKE); \ @@ -1168,7 +1159,7 @@ $(D)/fribidi: $(ARCHIVE)/$(FRIBIDI_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(FRIBIDI_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --disable-debug \ --disable-deprecated \ --enable-charsets \ @@ -1205,7 +1196,7 @@ $(D)/libffi: $(ARCHIVE)/$(LIBFFI_SOURCE) | $(TARGET_DIR) $(call apply_patches, $(LIBFFI_PATCH)); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ $(LIBFFI_CONF) \ ; \ $(MAKE) all; \ @@ -1253,7 +1244,7 @@ $(D)/glib2: $(D)/zlib $(D)/libffi $(GLIB2_DEPS) $(ARCHIVE)/$(GLIB2_SOURCE) | $(T autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --cache-file=arm-linux.cache \ --disable-debug \ --disable-selinux \ @@ -1304,7 +1295,7 @@ $(D)/alsa-lib: $(ARCHIVE)/$(ALSA-LIB_SOURCE) $(call apply_patches, $(ALSA-LIB_PATCH)); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --with-alsa-devdir=/dev/snd/ \ --with-plugindir=/lib/alsa \ --without-debug \ @@ -1342,7 +1333,7 @@ $(D)/popt: $(ARCHIVE)/$(POPT_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(POPT_TMP); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove/share \ + --datarootdir=$(remove-datarootdir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) diff --git a/make/target-lua.mk b/make/target-lua.mk index 724f1ba4..2a446563 100644 --- a/make/target-lua.mk +++ b/make/target-lua.mk @@ -167,8 +167,8 @@ $(D)/luaposix: $(HOST_LUA) $(D)/lua $(D)/luaexpat $(ARCHIVE)/$(SLINGSHOT_SOURCE) --exec-prefix= \ --libdir=$(TARGET_LIB_DIR)/lua/$(LUA_ABIVER) \ --datarootdir=$(TARGET_SHARE_DIR)/lua/$(LUA_ABIVER) \ - --mandir=$(TARGET_DIR)/.remove \ - --docdir=$(TARGET_DIR)/.remove \ + --mandir=$(TARGET_DIR)$(remove-mandir) \ + --docdir=$(TARGET_DIR)$(remove-docdir) \ --enable-silent-rules \ ; \ $(MAKE); \ diff --git a/make/target-rootfs.mk b/make/target-rootfs.mk index 5462982f..5db27d44 100644 --- a/make/target-rootfs.mk +++ b/make/target-rootfs.mk @@ -112,12 +112,12 @@ $(ROOTFS): | $(TARGET_DIR) # cleanup root filesystem from useless stuff rootfs-cleanup: $(ROOTFS) - rm -rf $(ROOTFS)/{include,mymodules} - rm -rf $(ROOTFS)/share/{aclocal,gdb,locale,man,doc,info,common-lisp} + rm -rf $(ROOTFS)$(remove-dir) + rm -rf $(ROOTFS)/include rm -rf $(ROOTFS)/lib/pkgconfig - rm -f $(ROOTFS)/lib/libvorbisenc* rm -rf $(ROOTFS)/lib/sigc++* rm -rf $(ROOTFS)/lib/glib-2.0 + rm -f $(ROOTFS)/lib/libvorbisenc* find $(ROOTFS) \( -name .gitignore -o -name .gitkeep \) -type f -print0 | xargs --no-run-if-empty -0 rm -f find $(ROOTFS) \( -name Makefile.am \) -type f -print0 | xargs --no-run-if-empty -0 rm -f find $(ROOTFS)/lib \( -name '*.a' -o -name '*.la' \) -print0 | xargs --no-run-if-empty -0 rm -f diff --git a/make/target-tools-unused.mk b/make/target-tools-unused.mk index e15b6396..eb76af18 100644 --- a/make/target-tools-unused.mk +++ b/make/target-tools-unused.mk @@ -23,8 +23,8 @@ $(D)/usbutils: $(D)/libusb-compat $(ARCHIVE)/$(USBUTILS_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --target=$(TARGET) \ --prefix= \ - --mandir=/.remove \ - --infodir=/.remove \ + --mandir=$(remove-mandir) \ + --infodir=$(remove-infodir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -84,7 +84,7 @@ $(D)/util-linux: $(D)/ncurses $(D)/zlib $(ARCHIVE)/$(UTIL_LINUX_SOURCE) | $(TARG autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove/share \ + --datarootdir=$(remove-datarootdir) \ --enable-static \ --disable-shared \ --disable-hardlink \ @@ -179,7 +179,7 @@ $(D)/rsync: $(ARCHIVE)/$(RSYNC_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(RSYNC_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --sysconfdir=/etc \ --disable-debug \ --disable-locale \ @@ -205,7 +205,7 @@ $(D)/readline: $(ARCHIVE)/$(READLINE_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(READLINE_TMP); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove/share \ + --datarootdir=$(remove-datarootdir) \ ; \ $(MAKE) all; \ $(MAKE) install DESTDIR=$(TARGET_DIR) diff --git a/make/target-tools.mk b/make/target-tools.mk index 173b8a21..5f5e49bc 100644 --- a/make/target-tools.mk +++ b/make/target-tools.mk @@ -72,9 +72,9 @@ $(D)/openvpn: $(D)/lzo $(D)/openssl $(ARCHIVE)/$(OPENVPN_SOURCE) | $(TARGET_DIR) ROUTE="/sbin/route" \ IPROUTE="/sbin/ip" \ --prefix= \ - --mandir=/.remove \ - --docdir=/.remove \ - --infodir=/.remove \ + --mandir=$(remove-mandir) \ + --docdir=$(remove-docdir) \ + --infodir=$(remove-infodir) \ --enable-shared \ --disable-static \ --enable-small \ @@ -107,9 +107,9 @@ $(D)/openssh: $(D)/openssl $(D)/zlib $(ARCHIVE)/$(OPENSSH_SOURCE) | $(TARGET_DIR ./configure \ $(CONFIGURE_OPTS) \ --prefix= \ - --mandir=/.remove \ - --docdir=/.remove \ - --infodir=/.remove \ + --mandir=$(remove-mandir) \ + --docdir=$(remove-docdir) \ + --infodir=$(remove-infodir) \ --with-pid-dir=/tmp \ --with-privsep-path=/var/empty \ --with-cppflags="-pipe $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) $(TARGET_ABI) -I$(TARGET_INCLUDE_DIR)" \ @@ -188,7 +188,7 @@ $(D)/mtd-utils: $(D)/zlib $(D)/lzo $(D)/e2fsprogs $(ARCHIVE)/$(MTD-UTILS_SOURCE) $(CONFIGURE) \ --prefix= \ --target=$(TARGET) \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --enable-silent-rules \ --disable-tests \ --without-xattr \ @@ -225,7 +225,7 @@ $(D)/iperf: $(ARCHIVE)/$(IPERF_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --target=$(TARGET) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -253,8 +253,8 @@ $(D)/parted: $(D)/e2fsprogs $(ARCHIVE)/$(PARTED_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --prefix= \ --target=$(TARGET) \ - --mandir=/.remove \ - --infodir=/.remove \ + --mandir=$(remove-mandir) \ + --infodir=$(remove-infodir) \ --enable-silent-rules \ --enable-shared \ --disable-static \ @@ -336,8 +336,8 @@ $(D)/coreutils: $(ARCHIVE)/$(COREUTILS_SOURCE) | $(TARGET_DIR) --target=$(TARGET) \ --prefix= \ --bindir=/bin.coreutils \ - --libexecdir=/.remove/libexec \ - --datarootdir=/.remove/share \ + --libexecdir=$(remove-libexecdir) \ + --datarootdir=$(remove-datarootdir) \ --enable-silent-rules \ --disable-xattr \ --disable-libcap \ @@ -372,7 +372,7 @@ $(D)/less: $(D)/ncurses $(ARCHIVE)/$(LESS_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --prefix= \ --target=$(TARGET) \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -529,8 +529,8 @@ $(D)/inadyn: $(D)/openssl $(D)/confuse $(D)/libite $(ARCHIVE)/$(INADYN_SOURCE) | --prefix= \ --libdir=$(TARGET_LIB_DIR) \ --includedir=$(TARGET_INCLUDE_DIR) \ - --mandir=/.remove \ - --docdir=/.remove \ + --mandir=$(remove-mandir) \ + --docdir=$(remove-docdir) \ --enable-openssl \ ; \ $(MAKE); \ @@ -605,7 +605,7 @@ $(D)/procps-ng: $(D)/ncurses $(ARCHIVE)/$(PROCPS-NG_SOURCE) | $(TARGET_DIR) --prefix= \ --bindir=/bin.procps \ --sbindir=/sbin.procps \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -638,7 +638,7 @@ $(D)/nano: $(D)/ncurses $(ARCHIVE)/$(NANO_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --target=$(TARGET) \ --prefix= \ - --datarootdir=/.remove/share \ + --datarootdir=$(remove-datarootdir) \ --disable-nls \ --enable-tiny \ ; \ @@ -693,7 +693,7 @@ $(D)/bash: $(ARCHIVE)/$(BASH_SOURCE) | $(TARGET_DIR) $(call apply_patches, $(BASH_PATCH), 0); \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -726,9 +726,7 @@ $(D)/e2fsprogs: $(ARCHIVE)/$(E2FSPROGS_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --target=$(TARGET) \ --prefix=/ \ - --datarootdir=/.remove \ - --infodir=/.remove \ - --mandir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --disable-nls \ --disable-profile \ --disable-e2initrd-helper \ @@ -778,8 +776,8 @@ $(D)/ntfs-3g: $(ARCHIVE)/$(NTFS-3G_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(NTFS-3G_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ - --docdir=/.remove \ + --mandir=$(remove-mandir) \ + --docdir=$(remove-docdir) \ --disable-ntfsprogs \ --disable-ldconfig \ --disable-library \ @@ -820,7 +818,7 @@ $(D)/autofs: $(D)/libtirpc $(ARCHIVE)/$(AUTOFS_SOURCE) | $(TARGET_DIR) autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --enable-ignore-busy \ --disable-mount-locking \ --without-openldap \ @@ -870,12 +868,12 @@ $(D)/samba-hd1: $(D)/zlib $(ARCHIVE)/$(SAMBA33_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --prefix=/ \ --datadir=/var/samba \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --localstatedir=/var/samba \ --sysconfdir=/etc/samba \ --with-configdir=/etc/samba \ --with-privatedir=/etc/samba \ - --with-modulesdir=/.remove \ + --with-modulesdir=$(remove-libdir)/samba \ --with-sys-quotas=no \ --with-piddir=/var/run \ --enable-static \ @@ -954,12 +952,12 @@ $(D)/samba-hd2: $(D)/zlib $(ARCHIVE)/$(SAMBA36_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --prefix=/ \ --datadir=/var/samba \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --localstatedir=/var/samba \ --sysconfdir=/etc/samba \ --with-configdir=/etc/samba \ --with-privatedir=/etc/samba \ - --with-modulesdir=/.remove \ + --with-modulesdir=$(remove-libdir)/samba \ --with-piddir=/var/run \ --with-sys-quotas=no \ --enable-static \ @@ -1016,7 +1014,7 @@ $(D)/dropbear: $(D)/zlib $(ARCHIVE)/$(DROPBEAR_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(DROPBEAR_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --disable-pututxline \ --disable-wtmp \ --disable-wtmpx \ @@ -1064,7 +1062,7 @@ $(D)/sg3_utils: $(ARCHIVE)/$(SG3_UTILS_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --prefix= \ --bindir=/bin.sg3_utils \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -1122,9 +1120,9 @@ $(D)/lcd4linux: $(D)/ncurses $(D)/libgd2 $(D)/libdpf | $(TARGET_DIR) --includedir=$(TARGET_INCLUDE_DIR) \ --bindir=$(TARGET_DIR)/bin \ --prefix= \ - --mandir=/.remove \ - --docdir=/.remove \ - --infodir=/.remove \ + --mandir=$(remove-mandir) \ + --docdir=$(remove-docdir) \ + --infodir=$(remove-infodir) \ --with-ncurses=$(TARGET_LIB_DIR) \ --with-drivers='DPF, SamsungSPF, PNG' \ --with-plugins='all,!dbus,!mpris_dbus,!asterisk,!isdn,!pop3,!ppp,!seti,!huawei,!imon,!kvv,!sample,!w1retap,!wireless,!xmms,!gps,!mpd,!mysql,!qnaplog,!iconv' \ @@ -1233,8 +1231,8 @@ $(D)/dosfstools: $(ARCHIVE)/$(DOSFSTOOLS_SOURCE) | $(TARGET_DIR) autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ - --docdir=/.remove \ + --mandir=$(remove-mandir) \ + --docdir=$(remove-docdir) \ --without-udev \ --enable-compat-symlinks \ CFLAGS="$(DOSFSTOOLS_CFLAGS)" \ @@ -1276,8 +1274,8 @@ $(D)/nfs-utils: $(D)/rpcbind $(ARCHIVE)/$(NFS-UTILS_SOURCE) | $(TARGET_DIR) --prefix= \ --target=$(TARGET) \ --enable-maintainer-mode \ - --docdir=/.remove \ - --mandir=/.remove \ + --docdir=$(remove-docdir) \ + --mandir=$(remove-mandir) \ --disable-nfsv4 \ --disable-nfsv41 \ --disable-gss \ @@ -1330,7 +1328,7 @@ $(D)/rpcbind: $(D)/libtirpc $(ARCHIVE)/$(RPCBIND_SOURCE) | $(TARGET_DIR) --enable-silent-rules \ --with-rpcuser=root \ --with-systemdsystemunitdir=no \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -1358,8 +1356,8 @@ $(D)/fuse-exfat: $(D)/libfuse $(ARCHIVE)/$(FUSE-EXFAT_SOURCE) | $(TARGET_DIR) autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --docdir=/.remove \ - --mandir=/.remove \ + --docdir=$(remove-docdir) \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -1383,8 +1381,8 @@ $(D)/exfat-utils: $(D)/fuse-exfat $(ARCHIVE)/$(EXFAT-UTILS_SOURCE) | $(TARGET_DI autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --docdir=/.remove \ - --mandir=/.remove \ + --docdir=$(remove-docdir) \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -1401,7 +1399,7 @@ $(D)/streamripper: $(D)/libvorbisidec $(D)/libmad $(D)/glib2 | $(TARGET_DIR) $(CONFIGURE) \ --prefix= \ --includedir=$(TARGET_INCLUDE_DIR) \ - --datarootdir=/.remove \ + --datarootdir=$(remove-datarootdir) \ --with-included-argv=yes \ --with-included-libmad=no \ ; \ @@ -1428,8 +1426,8 @@ $(D)/gettext: $(ARCHIVE)/$(GETTEXT_SOURCE) | $(TARGET_DIR) autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --bindir=/.remove/bin \ - --datarootdir=/.remove/share \ + --bindir=$(remove-bindir) \ + --datarootdir=$(remove-datarootdir) \ --disable-libasprintf \ --disable-acl \ --disable-openmp \ @@ -1462,7 +1460,7 @@ $(D)/mc: $(D)/glib2 $(D)/ncurses $(ARCHIVE)/$(MC_SOURCE) | $(TARGET_DIR) autoreconf -fi; \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --enable-maintainer-mode \ --enable-silent-rules \ \ @@ -1506,10 +1504,8 @@ $(D)/wget: $(D)/openssl $(ARCHIVE)/$(WGET_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --target=$(TARGET) \ --prefix= \ - --datarootdir=/.remove \ - --docdir=/.remove \ - --sysconfdir=/.remove \ - --mandir=/.remove \ + --datarootdir=$(remove-datarootdir) \ + --sysconfdir=$(remove-sysconfdir) \ --with-gnu-ld \ --with-ssl=openssl \ --disable-debug \ @@ -1541,9 +1537,9 @@ $(D)/iconv: $(ARCHIVE)/$(LIBICONV_SOURCE) | $(TARGET_DIR) $(CONFIGURE) \ --target=$(TARGET) \ --prefix= \ - --datarootdir=/.remove/share \ - --includedir=/.remove/include \ - --libdir=/.remove/lib \ + --datarootdir=$(remove-datarootdir) \ + --includedir=$(remove-includedir) \ + --libdir=$(remove-libdir) \ --enable-static \ --disable-shared \ --enable-relocatable \ @@ -1608,7 +1604,7 @@ $(D)/dvbsnoop: | $(TARGET_DIR) $(CONFIGURE) \ --enable-silent-rules \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ ; \ $(MAKE); \ $(MAKE) install DESTDIR=$(TARGET_DIR) @@ -1631,7 +1627,7 @@ $(D)/ethtool: $(ARCHIVE)/$(ETHTOOL_SOURCE) | $(TARGET_DIR) $(CHDIR)/$(ETHTOOL_TMP); \ $(CONFIGURE) \ --prefix= \ - --mandir=/.remove \ + --mandir=$(remove-mandir) \ --libdir=$(TARGET_LIB_DIR) \ --disable-pretty-dump \ ; \