tools: add Host/Uninstall where possible
authorRosen Penev <rosenp@gmail.com>
Wed, 28 Sep 2022 08:23:56 +0000 (01:23 -0700)
committerChristian Marangi <ansuelsmth@gmail.com>
Wed, 19 Oct 2022 22:33:22 +0000 (00:33 +0200)
This cleans staging_dir when calling tool/x/clean.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
26 files changed:
tools/automake/Makefile
tools/bash/Makefile
tools/bc/Makefile
tools/bison/Makefile
tools/coreutils/Makefile
tools/cpio/Makefile
tools/dosfstools/Makefile
tools/elfutils/Makefile
tools/fakeroot/Makefile
tools/findutils/Makefile
tools/flex/Makefile
tools/flock/Makefile
tools/gmp/Makefile
tools/isl/Makefile
tools/libressl/Makefile
tools/libtool/Makefile
tools/lzma/Makefile
tools/m4/Makefile
tools/mpc/Makefile
tools/mpfr/Makefile
tools/patch/Makefile
tools/patchelf/Makefile
tools/sparse/Makefile
tools/tar/Makefile
tools/xz/Makefile
tools/zip/Makefile

index c016f1d76a6ef96e63ede4936533b10c510ed9c0..a1121f1378cf4a81ca7e53459a2403e0ed0fc5d4 100644 (file)
@@ -43,9 +43,8 @@ define Host/Install
        ln -sf aclocal $(STAGING_DIR_HOST)/bin/aclocal-1.15
 endef
 
-define Host/Clean
-       -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
-       $(call Host/Clean/Default)
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
 endef
 
 $(eval $(call HostBuild))
index 7c25b83327d548c2ef48982a4065bc511077a586..992933c6bf9594436c5ab6850b7f5b7a8cdb7450 100644 (file)
@@ -18,4 +18,8 @@ HOST_BUILD_PARALLEL := 1
 
 include $(INCLUDE_DIR)/host-build.mk
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 9e1b2ba33617586a1c63fc875fcd71400e7c7385..ac6609e00837b4133df00fc7e2c55ac5cbd5da73 100644 (file)
@@ -18,4 +18,8 @@ PKG_CPE_ID:=cpe:/a:gnu:bc
 
 include $(INCLUDE_DIR)/host-build.mk
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 5f96463ae02d88566b7d9c43ca641d6dce5005fb..30555541e653a34a9a6bba8573465ad884d62c38 100644 (file)
@@ -19,14 +19,14 @@ include $(INCLUDE_DIR)/host-build.mk
 
 HOST_CONFIGURE_ARGS += --enable-threads=posix --disable-nls
 
-define Host/Clean
-       -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
-       $(call Host/Clean/Default)
-endef
-
 define Host/Install
        $(call Host/Install/Default)
        $(INSTALL_BIN) ./scripts/yacc $(STAGING_DIR_HOST)/bin/yacc
 endef
 
+define Host/Uninstall
+       rm -f $(STAGING_DIR_HOST)/bin/yacc
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 87c9102fa6219c6ba2d334c3289b0e354e7b4614..c64210c5a7c6b83dad2c65025ec5432a88b45554 100644 (file)
@@ -35,4 +35,9 @@ define Host/Install
        ln -sf ginstall $(1)/bin/install
 endef
 
+define Host/Uninstall
+       rm -f $(STAGING_DIR_HOST)/bin/install
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 28522098476208bffa3e4cae72b87919da9e5fd9..82b5aa83652913a31be35ea94c32e96389b2ad66 100644 (file)
@@ -11,4 +11,8 @@ PKG_HASH:=eab5bdc5ae1df285c59f2a4f140a98fc33678a0bf61bdba67d9436ae26b46f6d
 
 include $(INCLUDE_DIR)/host-build.mk
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index d52c46b3022f9d8b90de088481f8fb933ac30621..7c834dfd4978061167787332bf5e89e686e5bb03 100644 (file)
@@ -24,4 +24,8 @@ ifeq ($(HOST_OS),Darwin)
 HOST_CFLAGS += -UHAVE_ENDIAN_H
 endif
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 92a916ec4dc818e4a539375fab39220f995e2236..37e0d545f82ef3833f3e5f8a61b26b1ac878a555 100644 (file)
@@ -30,4 +30,8 @@ HOST_CONFIGURE_ARGS += \
 HOST_MAKE_FLAGS += \
        SUBDIRS="lib libelf libcpu backends libebl libdwelf libdwfl libdw"
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 5d31e197819f1fd52778c902e1a4ecab89362762..efd9227d1a907470455c5166c23d0662a0282cdb 100644 (file)
@@ -25,4 +25,8 @@ HOST_CONFIGURE_VARS += \
 HOST_CONFIGURE_ARGS += \
        --with-ipc=tcp
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index d0d780689ba147aa8756dc31494857ae8d57ccfc..ac1d5312c9da7ab81718a7f9e9306fdcee8070e3 100644 (file)
@@ -28,4 +28,8 @@ HOST_CONFIGURE_ARGS += \
        --disable-nls \
        --without-selinux
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index bb5aecbdfeadeef0f3803c6e9678b1de5a31978e..da037ae72d84b52181e28c8e46495ad922b9f4d2 100644 (file)
@@ -26,8 +26,12 @@ define Host/Install
        $(LN) flex $(STAGING_DIR_HOST)/bin/lex
 endef
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 define Host/Clean
-       -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
+       rm -f $(STAGING_DIR_HOST)/bin/lex
        $(call Host/Clean/Default)
 endef
 
index cd3561bb6996c1b0a3d85257b1e94ffb6d198f5b..4e0a45440fa5cd426635be2936a963b0e0dcf2c3 100644 (file)
@@ -24,4 +24,8 @@ define Host/Install
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/flock $(STAGING_DIR_HOST)/bin/
 endef
 
+define Host/Clean
+       rm -f $(STAGING_DIR_HOST)/bin/flock
+endef
+
 $(eval $(call HostBuild))
index 967cf6817b5e6795e20d97d16ea5052f746367b4..cfd6e30e04ab036d56b5b4704fc6477d21ab8b2d 100644 (file)
@@ -31,4 +31,8 @@ ifeq ($(GNU_HOST_NAME),x86_64-linux-gnux32)
 HOST_CONFIGURE_ARGS += ABI=x32
 endif
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index e9674debc2e0e0c5be43233164a92503fc2fe656..0fab02fe3fecdcf4f42443250ae7e4d86763d69e 100644 (file)
@@ -24,4 +24,8 @@ HOST_CONFIGURE_ARGS += \
        --disable-shared \
        --with-gmp-prefix=$(STAGING_DIR_HOST)
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 0b5175124eac0b65a585f406ca146d308857f341..fe73e7cde237be83e9492dff064f4a37d860bd65 100644 (file)
@@ -34,4 +34,8 @@ HOST_CONFIGURE_ARGS += \
        --with-pic \
        --disable-tests
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 2bc9db7d0dabff54ae372bedb0a47dc850917c90..fcac06e269775bd40ef5b8776a25c98d210e3b2a 100644 (file)
@@ -34,8 +34,11 @@ define Host/Install
        $(SED) 's,-lstdc++,-luClibc++,g' $(STAGING_DIR_HOST)/bin/libtool-ucxx
 endef
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 define Host/Clean
-       -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
        $(call Host/Clean/Default)
 endef
 
index b87289e385df7e319cff506011ece82dad9d8d8e..29f7e0fb1d631718d22815194486ac3e083698ae 100644 (file)
@@ -31,6 +31,7 @@ define Host/Install
 endef
 
 define Host/Clean
+       rm -f $(STAGING_DIR_HOST)/bin/lzma
 endef
 
 $(eval $(call HostBuild))
index 0a358c35f1b8d310fa5f0ebb1500fcbdb0b4a17f..d621000daf56c1fe7c1453e3edca1c8762183106 100644 (file)
@@ -21,9 +21,8 @@ include $(INCLUDE_DIR)/host-build.mk
 
 HOST_CONFIGURE_VARS += gl_cv_func_strstr_linear=no
 
-define Host/Clean
-       -$(MAKE) -C $(HOST_BUILD_DIR) uninstall
-       $(call Host/Clean/Default)
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
 endef
 
 $(eval $(call HostBuild))
index 733c14173b68749e4949569a310276886d778734..b170043c1a6c1896c0b58e962b30b45e2d56e8b2 100644 (file)
@@ -25,4 +25,8 @@ HOST_CONFIGURE_ARGS += \
        --with-mpfr=$(TOPDIR)/staging_dir/host \
        --with-gmp=$(TOPDIR)/staging_dir/host
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 65e6f8959f322dfc35e0e57308f2b27dcdff714f..4562c128d4341b7427618e074f557adcc4879fc1 100644 (file)
@@ -25,4 +25,8 @@ HOST_CONFIGURE_ARGS += \
        --enable-thread-safe \
        --with-gmp=$(STAGING_DIR_HOST)
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index e0481204f79acd3c28b63e984d417d3accb7aacc..bac7d5692c5d849cc2a62a62e1d3411ed0b7ea2c 100644 (file)
@@ -22,4 +22,8 @@ include $(INCLUDE_DIR)/host-build.mk
 HOSTCC := $(HOSTCC_NOCACHE)
 HOSTCXX := $(HOSTCXX_NOCACHE)
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 7c88f8dc45e53789b5a7f85544a2b0702cb1a375..4cf039c407240a0f7b907691d24c0b22c6cc4fd8 100644 (file)
@@ -24,4 +24,8 @@ define Host/Install
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/patchelf $(STAGING_DIR_HOST)/bin/patchelf
 endef
 
+define Host/Clean
+       rm -rf $(STAGING_DIR_HOST)/bin/patchelf
+endef
+
 $(eval $(call HostBuild))
index 549ec3a3cc34e89e7eb2b9c5d203cf3b124667dc..e08bd1d05f55a128788203ff7687269c4b5b0383 100644 (file)
@@ -21,4 +21,8 @@ define Host/Install
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/sparse $(STAGING_DIR_HOST)/bin
 endef
 
+define Host/Clean
+       rm -f $(STAGING_DIR_HOST)/bin/sparse
+endef
+
 $(eval $(call HostBuild))
index f1dfc11f93c7229f39d5654dc807ec6724109c0b..47aad9ec6e0404e1da5f1a46d2d2e5f2d9a923fa 100644 (file)
@@ -28,4 +28,8 @@ HOST_CONFIGURE_ARGS += \
        --disable-acl \
        --disable-nls
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index ef0ed02396bf34e5f5bbec6cc4cd51af082bc77d..8add2f21dfb0d0c2681ef44f2adf304d1e42ea75 100644 (file)
@@ -33,4 +33,8 @@ define Host/Install
        +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) install xzlinks="unxz xzcat"
 endef
 
+define Host/Uninstall
+       -$(call Host/Compile/Default,uninstall)
+endef
+
 $(eval $(call HostBuild))
index 7dd81a1b8bc3bfeb5773d0770cb57c164f6db157..6e83dafb40f610bac5298edef0b375b750d197eb 100644 (file)
@@ -32,5 +32,8 @@ define Host/Install
        $(INSTALL_BIN) $(HOST_BUILD_DIR)/zip $(STAGING_DIR_HOST)/bin/
 endef
 
+define Host/Clean
+       rm -rf $(STAGING_DIR_HOST)/bin/zip
+endef
+
 $(eval $(call HostBuild))
-#$(eval $(call BuildPackage,zip))