From fe46689f104b5d0363f06a286a215fd98a3e6d72 Mon Sep 17 00:00:00 2001 From: Nicolas Thill Date: Fri, 3 Apr 2015 00:07:43 +0000 Subject: [PATCH] packages: use $(LN) macro, make symlinks relative Signed-off-by: Nicolas Thill SVN-Revision: 45250 --- package/base-files/Makefile | 4 ++-- package/boot/kexec-tools/Makefile | 2 +- package/boot/uboot-envtools/Makefile | 2 +- package/devel/perf/Makefile | 2 +- package/libs/libbsd/Makefile | 4 ++-- package/network/utils/comgt/Makefile | 2 +- package/system/ca-certificates/Makefile | 2 +- package/system/fstools/Makefile | 6 +++--- package/system/ubox/Makefile | 10 +++++----- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 93b33c313e6..d0d93e5ed6d 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -127,12 +127,12 @@ define Package/base-files/install mkdir -p $(1)/etc/rc.d mkdir -p $(1)/overlay mkdir -p $(1)/lib/firmware - $(if $(LIB_SUFFIX),-ln -s lib $(1)/lib$(LIB_SUFFIX)) + $(if $(LIB_SUFFIX),-$(LN) lib $(1)/lib$(LIB_SUFFIX)) mkdir -p $(1)/mnt mkdir -p $(1)/proc mkdir -p $(1)/tmp mkdir -p $(1)/usr/lib - $(if $(LIB_SUFFIX),-ln -s lib $(1)/usr/lib$(LIB_SUFFIX)) + $(if $(LIB_SUFFIX),-$(LN) lib $(1)/usr/lib$(LIB_SUFFIX)) mkdir -p $(1)/usr/bin mkdir -p $(1)/sys mkdir -p $(1)/www diff --git a/package/boot/kexec-tools/Makefile b/package/boot/kexec-tools/Makefile index e5d4b4b2f4f..6f04bce7be9 100644 --- a/package/boot/kexec-tools/Makefile +++ b/package/boot/kexec-tools/Makefile @@ -81,7 +81,7 @@ define Package/kexec-tools/install # make a link for compatability with other distros $(INSTALL_DIR) $(1)/sbin - ln -s /usr/sbin/kexec $(1)/sbin/kexec + $(LN) ../usr/sbin/kexec $(1)/sbin/kexec endef $(eval $(call BuildPackage,kexec-tools)) diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile index d011c507a99..c016ac05e12 100644 --- a/package/boot/uboot-envtools/Makefile +++ b/package/boot/uboot-envtools/Makefile @@ -66,7 +66,7 @@ endef define Package/uboot-envtools/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_BUILD_DIR)/tools/env/fw_printenv $(1)/usr/sbin - ln -s fw_printenv $(1)/usr/sbin/fw_setenv + $(LN) fw_printenv $(1)/usr/sbin/fw_setenv $(INSTALL_DIR) $(1)/lib $(INSTALL_DATA) ./files/uboot-envtools.sh $(1)/lib ifneq ($(CONFIG_TARGET_ar71xx),) diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile index 1e874243b31..b77e29a6667 100644 --- a/package/devel/perf/Makefile +++ b/package/devel/perf/Makefile @@ -33,7 +33,7 @@ endef # Linux sources directory define Build/Prepare $(RM) -r $(PKG_BUILD_DIR) - ln -s $(LINUX_DIR)/tools/perf $(PKG_BUILD_DIR) + $(LN) $(LINUX_DIR)/tools/perf $(PKG_BUILD_DIR) endef # MAKE_FLAGS should be passed again upon cleaning because Perf's makefile diff --git a/package/libs/libbsd/Makefile b/package/libs/libbsd/Makefile index fb38837e45f..ca5e76179f3 100644 --- a/package/libs/libbsd/Makefile +++ b/package/libs/libbsd/Makefile @@ -39,7 +39,7 @@ define Build/InstallDev $(PKG_INSTALL_DIR)/usr/include/* \ $(1)/usr/include/ - ( cd $(1)/lib ; ln -s libbsd.so.$(PKG_VERSION) libbsd.so ) + ( cd $(1)/lib ; $(LN) libbsd.so.$(PKG_VERSION) libbsd.so ) endef define Package/libbsd/install @@ -50,7 +50,7 @@ define Package/libbsd/install $(PKG_INSTALL_DIR)/lib/libbsd.so* \ $(1)/lib/ - ( cd $(1)/lib ; ln -s libbsd.so.$(PKG_VERSION) libbsd.so ) + ( cd $(1)/lib ; $(LN) libbsd.so.$(PKG_VERSION) libbsd.so ) endef $(eval $(call BuildPackage,libbsd)) diff --git a/package/network/utils/comgt/Makefile b/package/network/utils/comgt/Makefile index 31d7bc77221..90adcab10d0 100644 --- a/package/network/utils/comgt/Makefile +++ b/package/network/utils/comgt/Makefile @@ -64,7 +64,7 @@ endef define Package/comgt/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/comgt $(1)/usr/bin/ - ln -s comgt $(1)/usr/bin/gcom + $(LN) comgt $(1)/usr/bin/gcom $(INSTALL_DIR) $(1)/etc/chatscripts $(INSTALL_DATA) ./files/3g.chat $(1)/etc/chatscripts/3g.chat $(INSTALL_DATA) ./files/evdo.chat $(1)/etc/chatscripts/evdo.chat diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile index 546478e99f0..0bf3f25eaa3 100644 --- a/package/system/ca-certificates/Makefile +++ b/package/system/ca-certificates/Makefile @@ -40,7 +40,7 @@ define Package/ca-certificates/install while [ -h "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ]; do \ let "SUFFIX += 1" ; \ done ; \ - ln -s "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \ + $(LN) "$$$$CERTFILE" "$(1)/etc/ssl/certs/$$$$HASH.$$$$SUFFIX" ; \ done endef diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile index f32ac2e35f5..c76576640be 100644 --- a/package/system/fstools/Makefile +++ b/package/system/fstools/Makefile @@ -64,7 +64,7 @@ define Package/fstools/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{mount_root,jffs2reset,snapshot_tool} $(1)/sbin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libfstools.so $(1)/lib/ $(INSTALL_BIN) ./files/snapshot $(1)/sbin/ - ln -s /sbin/jffs2reset $(1)/sbin/jffs2mark + $(LN) jffs2reset $(1)/sbin/jffs2mark endef define Package/block-mount/install @@ -76,8 +76,8 @@ define Package/block-mount/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/block $(1)/sbin/ $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libblkid-tiny.so $(1)/lib/ - ln -s /sbin/block $(1)/usr/sbin/swapon - ln -s /sbin/block $(1)/usr/sbin/swapoff + $(LN) ../../sbin/block $(1)/usr/sbin/swapon + $(LN) ../../sbin/block $(1)/usr/sbin/swapoff endef diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile index 2db011abaa8..e6989899934 100644 --- a/package/system/ubox/Makefile +++ b/package/system/ubox/Makefile @@ -36,11 +36,11 @@ define Package/ubox/install $(INSTALL_BIN) ./files/log.init $(1)/etc/init.d/log $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libvalidate.so $(1)/lib - ln -s /sbin/kmodloader $(1)/usr/sbin/rmmod - ln -s /sbin/kmodloader $(1)/usr/sbin/insmod - ln -s /sbin/kmodloader $(1)/usr/sbin/lsmod - ln -s /sbin/kmodloader $(1)/usr/sbin/modinfo - ln -s /sbin/kmodloader $(1)/usr/sbin/modprobe + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/rmmod + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/insmod + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/lsmod + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modinfo + $(LN) ../../sbin/kmodloader $(1)/usr/sbin/modprobe endef $(eval $(call BuildPackage,ubox)) -- 2.30.2