From d83647d76e7aa7d126de6daddb9be5eceb6274cf Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Wed, 31 Jul 2024 01:55:32 +0200 Subject: [PATCH] make: simplify symlink installs Since we mandate coreutils on macOS too, we can simplify calls to `ln`. --- Makefile | 18 +++++++++--------- base | 2 +- make/appimage.mk | 6 +++--- make/kindle.mk | 14 +++++++------- make/ubuntu-touch.mk | 14 +++++++------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/Makefile b/Makefile index 2479ae0ed..1bade55c9 100644 --- a/Makefile +++ b/Makefile @@ -72,19 +72,19 @@ else bash -O extglob -c '$(SYMLINK) $(OUTPUT_DIR_ARTIFACTS) $(INSTALL_DIR)/koreader/' ifneq (,$(EMULATE_READER)) @echo "[*] install front spec only for the emulator" - $(SYMLINK) $(abspath spec) $(INSTALL_DIR)/koreader/spec/front - $(SYMLINK) $(abspath test) $(INSTALL_DIR)/koreader/spec/front/unit/data + $(SYMLINK) spec $(INSTALL_DIR)/koreader/spec/front + $(SYMLINK) test $(INSTALL_DIR)/koreader/spec/front/unit/data endif endif - $(SYMLINK) $(abspath $(INSTALL_FILES)) $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(INSTALL_FILES) $(INSTALL_DIR)/koreader/ ifdef ANDROID - $(SYMLINK) $(abspath $(ANDROID_DIR)/*.lua) $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(ANDROID_DIR)/*.lua $(INSTALL_DIR)/koreader/ endif @echo "[*] Install update once marker" @echo "# This file indicates that update once patches have not been applied yet." > $(INSTALL_DIR)/koreader/update_once.marker ifdef WIN32 @echo "[*] Install runtime libraries for win32..." - $(SYMLINK) $(abspath $(WIN32_DIR)/*.dll) $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(WIN32_DIR)/*.dll $(INSTALL_DIR)/koreader/ endif ifdef SHIP_SHARED_STL @echo "[*] Install C++ runtime..." @@ -93,9 +93,9 @@ ifdef SHIP_SHARED_STL $(STRIP) --strip-unneeded $(INSTALL_DIR)/koreader/libs/$(notdir $(SHARED_STL_LIB)) endif @echo "[*] Install plugins" - $(SYMLINK) $(abspath plugins) $(INSTALL_DIR)/koreader/ + $(SYMLINK) plugins $(INSTALL_DIR)/koreader/ @echo "[*] Install resources" - $(SYMLINK) $(abspath resources/fonts/*) $(INSTALL_DIR)/koreader/fonts/ + $(SYMLINK) resources/fonts/* $(INSTALL_DIR)/koreader/fonts/ install -d $(INSTALL_DIR)/koreader/{screenshots,data/{dict,tessdata},fonts/host,ota} ifeq ($(IS_RELEASE),1) @echo "[*] Clean up, remove unused files for releases" @@ -106,10 +106,10 @@ base: $(MAKE) -C $(KOR_BASE) $(INSTALL_DIR)/koreader/.busted: .busted - $(SYMLINK) $(abspath .busted) $@ + $(SYMLINK) .busted $@ $(INSTALL_DIR)/koreader/.luacov: - $(SYMLINK) $(abspath .luacov) $@ + $(SYMLINK) .luacov $@ testfront: $(INSTALL_DIR)/koreader/.busted # sdr files may have unexpected impact on unit testing diff --git a/base b/base index d8c607168..aade35b80 160000 --- a/base +++ b/base @@ -1 +1 @@ -Subproject commit d8c60716878ff346658f38b78b49861093367440 +Subproject commit aade35b80ffe07619a462d9bbf7f899a3962ee09 diff --git a/make/appimage.mk b/make/appimage.mk index afd208faa..489e698fe 100644 --- a/make/appimage.mk +++ b/make/appimage.mk @@ -6,9 +6,9 @@ APPIMAGETOOL_URL = https://github.com/AppImage/AppImageKit/releases/download/13/ update: all # remove old package if any rm -f koreader-appimage-$(MACHINE)-$(VERSION).appimage - $(SYMLINK) $(abspath $(APPIMAGE_DIR)/AppRun) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(APPIMAGE_DIR)/koreader.desktop) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath resources/koreader.png) $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(APPIMAGE_DIR)/AppRun $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(APPIMAGE_DIR)/koreader.desktop $(INSTALL_DIR)/koreader/ + $(SYMLINK) resources/koreader.png $(INSTALL_DIR)/koreader/ sed -e 's/%%VERSION%%/$(VERSION)/' -e 's/%%DATE%%/$(RELEASE_DATE)/' $(PLATFORM_DIR)/common/koreader.metainfo.xml >$(INSTALL_DIR)/koreader/koreader.appdata.xml # TODO at best this is DebUbuntu specific $(SYMLINK) /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 $(INSTALL_DIR)/koreader/libs/libSDL2.so diff --git a/make/kindle.mk b/make/kindle.mk index 6f45988fb..72c189ab4 100644 --- a/make/kindle.mk +++ b/make/kindle.mk @@ -14,13 +14,13 @@ update: all # remove old package if any rm -f $(KINDLE_PACKAGE) # Kindle launching scripts - $(SYMLINK) $(abspath $(KINDLE_DIR)/extensions) $(INSTALL_DIR)/ - $(SYMLINK) $(abspath $(KINDLE_DIR)/launchpad) $(INSTALL_DIR)/ - $(SYMLINK) $(abspath $(KINDLE_DIR)/koreader.sh) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(KINDLE_DIR)/libkohelper.sh) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(KINDLE_DIR)/libkohelper.sh) $(INSTALL_DIR)/extensions/koreader/bin/ - $(SYMLINK) $(abspath $(COMMON_DIR)/spinning_zsync) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(KINDLE_DIR)/wmctrl) $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(KINDLE_DIR)/extensions $(INSTALL_DIR)/ + $(SYMLINK) $(KINDLE_DIR)/launchpad $(INSTALL_DIR)/ + $(SYMLINK) $(KINDLE_DIR)/koreader.sh $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(KINDLE_DIR)/libkohelper.sh $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(KINDLE_DIR)/libkohelper.sh $(INSTALL_DIR)/extensions/koreader/bin/ + $(SYMLINK) $(COMMON_DIR)/spinning_zsync $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(KINDLE_DIR)/wmctrl $(INSTALL_DIR)/koreader/ # create new package cd $(INSTALL_DIR) && pwd && \ zip -9 -r \ diff --git a/make/ubuntu-touch.mk b/make/ubuntu-touch.mk index 46a22faa0..90b023d7c 100644 --- a/make/ubuntu-touch.mk +++ b/make/ubuntu-touch.mk @@ -6,13 +6,13 @@ update: all file $(INSTALL_DIR)/koreader/luajit | grep ARM || exit 1 # remove old package if any rm -f koreader-ubuntu-touch-$(MACHINE)-$(VERSION).click - $(SYMLINK) $(abspath $(UBUNTUTOUCH_DIR)/koreader.sh) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(UBUNTUTOUCH_DIR)/manifest.json) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(UBUNTUTOUCH_DIR)/koreader.apparmor) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(UBUNTUTOUCH_DIR)/koreader.apparmor.openstore) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(UBUNTUTOUCH_DIR)/koreader.desktop) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(UBUNTUTOUCH_DIR)/koreader.png) $(INSTALL_DIR)/koreader/ - $(SYMLINK) $(abspath $(UBUNTUTOUCH_DIR)/libSDL2.so) $(INSTALL_DIR)/koreader/libs/ + $(SYMLINK) $(UBUNTUTOUCH_DIR)/koreader.sh $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(UBUNTUTOUCH_DIR)/manifest.json $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(UBUNTUTOUCH_DIR)/koreader.apparmor $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(UBUNTUTOUCH_DIR)/koreader.apparmor.openstore $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(UBUNTUTOUCH_DIR)/koreader.desktop $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(UBUNTUTOUCH_DIR)/koreader.png $(INSTALL_DIR)/koreader/ + $(SYMLINK) $(UBUNTUTOUCH_DIR)/libSDL2.so $(INSTALL_DIR)/koreader/libs/ # create new package cd $(INSTALL_DIR) && pwd && \ zip -9 -r \