diff options
| author | ruki <[email protected]> | 2024-07-12 00:55:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-07-15 12:21:42 +0800 |
| commit | 30f574369dd606d4eb03e10d35f972d725ad074d (patch) | |
| tree | ee87f6174b068a0e932902333ed61d1b03eaa92e | |
| parent | fd5e83fd340b9d610392d6432cd652813819c7d3 (diff) | |
rename var name
| -rw-r--r-- | xmake/modules/target/action/install/unix.lua | 36 | ||||
| -rw-r--r-- | xmake/modules/target/action/install/windows.lua | 38 | ||||
| -rw-r--r-- | xmake/modules/target/action/uninstall/unix.lua | 26 | ||||
| -rw-r--r-- | xmake/modules/target/action/uninstall/windows.lua | 30 |
4 files changed, 65 insertions, 65 deletions
diff --git a/xmake/modules/target/action/install/unix.lua b/xmake/modules/target/action/install/unix.lua index 5b4507622..dc1354519 100644 --- a/xmake/modules/target/action/install/unix.lua +++ b/xmake/modules/target/action/install/unix.lua @@ -81,13 +81,13 @@ end function install_binary(target, opt) -- install binary - local binarydir = target:bindir() - os.mkdir(binarydir) - os.vcp(target:targetfile(), binarydir) + local bindir = target:bindir() + os.mkdir(bindir) + os.vcp(target:targetfile(), bindir) -- install libraries - local librarydir = target:libdir() - os.mkdir(librarydir) + local libdir = target:libdir() + os.mkdir(libdir) -- install the dependent shared (*.so) target -- @see https://github.com/xmake-io/xmake/issues/961 @@ -95,23 +95,23 @@ function install_binary(target, opt) if dep:kind() == "shared" then local depfile = dep:targetfile() if os.isfile(depfile) then - os.vcp(depfile, librarydir) + os.vcp(depfile, libdir) end end -- install all shared libraries in packages in all deps - _install_shared_for_packages(dep, librarydir) + _install_shared_for_packages(dep, libdir) end -- install shared libraries for all packages - _install_shared_for_packages(target, librarydir) + _install_shared_for_packages(target, libdir) end -- install shared library function install_shared(target, opt) -- install libraries - local librarydir = target:libdir() - os.mkdir(librarydir) + local libdir = target:libdir() + os.mkdir(libdir) local targetfile = target:targetfile() if os.islink(targetfile) then local targetfile_with_soname = os.readlink(targetfile) @@ -123,16 +123,16 @@ function install_shared(target, opt) if not path.is_absolute(targetfile_with_version) then targetfile_with_version = path.join(target:targetdir(), targetfile_with_version) end - os.vcp(targetfile_with_version, librarydir, {symlink = true, force = true}) + os.vcp(targetfile_with_version, libdir, {symlink = true, force = true}) end - os.vcp(targetfile_with_soname, librarydir, {symlink = true, force = true}) - os.vcp(targetfile, librarydir, {symlink = true, force = true}) + os.vcp(targetfile_with_soname, libdir, {symlink = true, force = true}) + os.vcp(targetfile, libdir, {symlink = true, force = true}) else - os.vcp(targetfile, librarydir) + os.vcp(targetfile, libdir) end -- install shared libraries for all packages - _install_shared_for_packages(target, librarydir) + _install_shared_for_packages(target, libdir) -- install headers _install_headers(target, opt) @@ -142,9 +142,9 @@ end function install_static(target, opt) -- install libraries - local librarydir = target:libdir() - os.mkdir(librarydir) - os.vcp(target:targetfile(), librarydir) + local libdir = target:libdir() + os.mkdir(libdir) + os.vcp(target:targetfile(), libdir) -- install headers _install_headers(target, opt) diff --git a/xmake/modules/target/action/install/windows.lua b/xmake/modules/target/action/install/windows.lua index 7474f1411..c52c1c934 100644 --- a/xmake/modules/target/action/install/windows.lua +++ b/xmake/modules/target/action/install/windows.lua @@ -83,10 +83,10 @@ function install_binary(target, opt) -- install binary local installdir = _get_installdir(target) - local binarydir = path.join(installdir, opt and opt.bindir or "bin") - os.mkdir(binarydir) - os.vcp(target:targetfile(), binarydir) - os.trycp(target:symbolfile(), binarydir) + local bindir = path.join(installdir, opt and opt.bindir or "bin") + os.mkdir(bindir) + os.vcp(target:targetfile(), bindir) + os.trycp(target:symbolfile(), bindir) -- install the dependent shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/961 @@ -96,40 +96,40 @@ function install_binary(target, opt) local depfile = dep:targetfile() if os.isfile(depfile) then if not _g.installed_dllfiles[depfile] then - os.vcp(depfile, binarydir) + os.vcp(depfile, bindir) _g.installed_dllfiles[depfile] = true end end end -- install all shared libraries in packages in all deps - _install_shared_for_packages(dep, binarydir) + _install_shared_for_packages(dep, bindir) end -- install shared libraries for all packages - _install_shared_for_packages(target, binarydir) + _install_shared_for_packages(target, bindir) end -- install shared library function install_shared(target, opt) -- install dll library to the binary directory - local binarydir = _check_installdir(target:bindir()) - os.mkdir(binarydir) - os.vcp(target:targetfile(), binarydir) - os.trycp(target:symbolfile(), binarydir) + local bindir = _check_installdir(target:bindir()) + os.mkdir(bindir) + os.vcp(target:targetfile(), bindir) + os.trycp(target:symbolfile(), bindir) -- install *.lib for shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/714 local targetfile = target:targetfile() - local librarydir = _check_installdir(target:libdir()) + local libdir = _check_installdir(target:libdir()) local targetfile_lib = path.join(path.directory(targetfile), path.basename(targetfile) .. (target:is_plat("mingw") and ".dll.a" or ".lib")) if os.isfile(targetfile_lib) then - os.mkdir(librarydir) - os.vcp(targetfile_lib, librarydir) + os.mkdir(libdir) + os.vcp(targetfile_lib, libdir) end -- install shared libraries for all packages - _install_shared_for_packages(target, binarydir) + _install_shared_for_packages(target, bindir) -- install headers _install_headers(target, opt) @@ -139,10 +139,10 @@ end function install_static(target, opt) -- install library - local librarydir = _check_installdir(target:libdir()) - os.mkdir(librarydir) - os.vcp(target:targetfile(), librarydir) - os.trycp(target:symbolfile(), librarydir) + local libdir = _check_installdir(target:libdir()) + os.mkdir(libdir) + os.vcp(target:targetfile(), libdir) + os.trycp(target:symbolfile(), libdir) -- install headers _install_headers(target, opt) diff --git a/xmake/modules/target/action/uninstall/unix.lua b/xmake/modules/target/action/uninstall/unix.lua index 835197228..4615be820 100644 --- a/xmake/modules/target/action/uninstall/unix.lua +++ b/xmake/modules/target/action/uninstall/unix.lua @@ -69,38 +69,38 @@ end function uninstall_binary(target, opt) -- remove the target file - local binarydir = target:bindir() - os.vrm(path.join(binarydir, path.filename(target:targetfile()))) + local bindir = target:bindir() + os.vrm(path.join(bindir, path.filename(target:targetfile()))) -- remove the dependent shared (*.so) target -- @see https://github.com/xmake-io/xmake/issues/961 - local librarydir = target:libdir() + local libdir = target:libdir() for _, dep in ipairs(target:orderdeps()) do if dep:kind() == "shared" then - os.vrm(path.join(librarydir, path.filename(dep:targetfile()))) + os.vrm(path.join(libdir, path.filename(dep:targetfile()))) end - _uninstall_shared_for_packages(dep, librarydir) + _uninstall_shared_for_packages(dep, libdir) end -- uninstall shared libraries for packages - _uninstall_shared_for_packages(target, librarydir) + _uninstall_shared_for_packages(target, libdir) end -- uninstall shared library function uninstall_shared(target, opt) -- remove the target file - local librarydir = target:libdir() - local targetfile = path.join(librarydir, path.filename(target:targetfile())) + local libdir = target:libdir() + local targetfile = path.join(libdir, path.filename(target:targetfile())) if os.islink(targetfile) then local targetfile_with_soname = os.readlink(targetfile) if not path.is_absolute(targetfile_with_soname) then - targetfile_with_soname = path.join(librarydir, targetfile_with_soname) + targetfile_with_soname = path.join(libdir, targetfile_with_soname) end if os.islink(targetfile_with_soname) then local targetfile_with_version = os.readlink(targetfile_with_soname) if not path.is_absolute(targetfile_with_version) then - targetfile_with_version = path.join(librarydir, targetfile_with_version) + targetfile_with_version = path.join(libdir, targetfile_with_version) end os.vrm(targetfile_with_version) end @@ -112,15 +112,15 @@ function uninstall_shared(target, opt) _uninstall_headers(target, opt) -- uninstall shared libraries for packages - _uninstall_shared_for_packages(target, librarydir) + _uninstall_shared_for_packages(target, libdir) end -- uninstall static library function uninstall_static(target, opt) -- remove the target file - local librarydir = target:libdir() - os.vrm(path.join(librarydir, path.filename(target:targetfile()))) + local libdir = target:libdir() + os.vrm(path.join(libdir, path.filename(target:targetfile()))) -- remove headers from the include directory _uninstall_headers(target, opt) diff --git a/xmake/modules/target/action/uninstall/windows.lua b/xmake/modules/target/action/uninstall/windows.lua index 5dcc01b5e..2982bbee1 100644 --- a/xmake/modules/target/action/uninstall/windows.lua +++ b/xmake/modules/target/action/uninstall/windows.lua @@ -54,51 +54,51 @@ end function uninstall_binary(target, opt) -- remove the target file - local binarydir = target:bindir() - os.vrm(path.join(binarydir, path.filename(target:targetfile()))) - os.tryrm(path.join(binarydir, path.filename(target:symbolfile()))) + local bindir = target:bindir() + os.vrm(path.join(bindir, path.filename(target:targetfile()))) + os.tryrm(path.join(bindir, path.filename(target:symbolfile()))) -- remove the dependent shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/961 for _, dep in ipairs(target:orderdeps()) do if dep:kind() == "shared" then - os.vrm(path.join(binarydir, path.filename(dep:targetfile()))) + os.vrm(path.join(bindir, path.filename(dep:targetfile()))) end - _uninstall_shared_for_packages(dep, binarydir) + _uninstall_shared_for_packages(dep, bindir) end -- uninstall shared libraries for packages - _uninstall_shared_for_packages(target, binarydir) + _uninstall_shared_for_packages(target, bindir) end -- uninstall shared library function uninstall_shared(target, opt) -- remove the target file - local binarydir = target:bindir() - os.vrm(path.join(binarydir, path.filename(target:targetfile()))) - os.tryrm(path.join(binarydir, path.filename(target:symbolfile()))) + local bindir = target:bindir() + os.vrm(path.join(bindir, path.filename(target:targetfile()))) + os.tryrm(path.join(bindir, path.filename(target:symbolfile()))) -- remove *.lib for shared/windows (*.dll) target -- @see https://github.com/xmake-io/xmake/issues/714 local targetfile = target:targetfile() - local librarydir = target:libdir() - os.vrm(path.join(librarydir, path.basename(targetfile) .. (target:is_plat("mingw") and ".dll.a" or ".lib"))) + local libdir = target:libdir() + os.vrm(path.join(libdir, path.basename(targetfile) .. (target:is_plat("mingw") and ".dll.a" or ".lib"))) -- remove headers from the include directory _uninstall_headers(target, opt) -- uninstall shared libraries for packages - _uninstall_shared_for_packages(target, binarydir) + _uninstall_shared_for_packages(target, bindir) end -- uninstall static library function uninstall_static(target, opt) -- remove the target file - local librarydir = target:libdir() - os.vrm(path.join(librarydir, path.filename(target:targetfile()))) - os.tryrm(path.join(librarydir, path.filename(target:symbolfile()))) + local libdir = target:libdir() + os.vrm(path.join(libdir, path.filename(target:targetfile()))) + os.tryrm(path.join(libdir, path.filename(target:symbolfile()))) -- remove headers from the include directory _uninstall_headers(target, opt) |
