mirror of
https://github.com/immortalwrt/immortalwrt.git
synced 2025-08-14 14:19:53 +08:00
tools/gnulib: use exact directory copy for install
The python implementation of gnulib-tool uses a hidden file as the independent main function. A copy with glob ('*') does not include hidden files at the top level directory, so use whole directory copy instead and remove the patch for a non-hidden python file. Ensure the directory does not already exist by attempting uninstall first to remove it and by not using "install" to create a directory. Rename the clean target to uninstall, as it handles the staging directory and not the build directory. Removed: - 021-python-main.patch Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:

committed by
Robert Marko

parent
b07b8c8b43
commit
774ce21c66
@ -14,14 +14,14 @@ define Host/Configure
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Install
|
define Host/Install
|
||||||
|
$(call Host/Uninstall)
|
||||||
$(INSTALL_DIR) $(1)/share/aclocal
|
$(INSTALL_DIR) $(1)/share/aclocal
|
||||||
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/*.m4 $(1)/share/aclocal/
|
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/*.m4 $(1)/share/aclocal/
|
||||||
$(INSTALL_DIR) $(1)/share/gnulib
|
$(CP) $(HOST_BUILD_DIR)/ $(1)/share/gnulib/
|
||||||
$(CP) $(HOST_BUILD_DIR)/* $(1)/share/gnulib/
|
|
||||||
ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool
|
ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Clean
|
define Host/Uninstall
|
||||||
rm -rf $(STAGING_DIR_HOST)/bin/gnulib-tool $(STAGING_DIR_HOST)/share/gnulib
|
rm -rf $(STAGING_DIR_HOST)/bin/gnulib-tool $(STAGING_DIR_HOST)/share/gnulib
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
--- /dev/null
|
|
||||||
+++ b/gnulib-tool-main.py
|
|
||||||
@@ -0,0 +1,4 @@
|
|
||||||
+from pygnulib import main
|
|
||||||
+
|
|
||||||
+if __name__ == '__main__':
|
|
||||||
+ main.main_with_exception_handling()
|
|
||||||
--- a/gnulib-tool.py
|
|
||||||
+++ b/gnulib-tool.py
|
|
||||||
@@ -157,4 +157,4 @@ fi
|
|
||||||
profiler_args=
|
|
||||||
# For profiling, cf. <https://docs.python.org/3/library/profile.html>.
|
|
||||||
#profiler_args="-m cProfile -s tottime"
|
|
||||||
-exec python3 $profiler_args "$gnulib_dir/.gnulib-tool.py" "$@"
|
|
||||||
+exec python3 $profiler_args "$gnulib_dir/gnulib-tool-main.py" "$@"
|
|
Reference in New Issue
Block a user