Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add so versioning when building shared library #217

Closed
wants to merge 1 commit into from

Conversation

mochaaP
Copy link

@mochaaP mochaaP commented Jul 17, 2023

Signed-off-by: Zephyr Lykos [email protected]

Fixes #214 (comment) for packaging guidelines & GNUInstallDirs compliance.

Tested on Linux x86_64, need feedback on other platforms.

@mochaaP
Copy link
Author

mochaaP commented Jul 17, 2023

cc @waruqi review?

@waruqi waruqi changed the base branch from master to dev July 17, 2023 03:49
configure Show resolved Hide resolved
configure Show resolved Hide resolved
@mochaaP
Copy link
Author

mochaaP commented Jul 17, 2023

#217 (comment) 構建 demo 時需要此行為

@mochaaP mochaaP force-pushed the master branch 2 times, most recently from bd86d23 to fe55976 Compare July 17, 2023 04:56
@mochaaP mochaaP marked this pull request as draft July 17, 2023 04:57
@mochaaP mochaaP force-pushed the master branch 5 times, most recently from e790a25 to be62a47 Compare July 17, 2023 05:33
local srcheaderfile=""
local includedir="${_install_includedir_default}"
local includedir="\$(DESTDIR)${_install_includedir_default}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why? 不要改。。./configure 是通用脚本,不光给 linux 构建用的。。不一定有设置 DESTDIR 不要直接用 DESTDIR

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果沒有 DESTDIR 就直接是空的

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你看上面 install_includedir_default 已經默認是 \$(PREFIX)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是空的,会走到 INSTALLDIR:=\$(PREFIX)" 。。目前这边大部分时候安装 都是不设置 DESTDIR 的。。一直能 work

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INSTALLDIR 已經不存在了(因為 ${prefix} 被替換成 \$(PREFIX))。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INSTALLDIR 已經不存在了(因為 ${prefix} 被替換成 \$(PREFIX))。

那里也不要改。。

echo "INSTALLDIR:=\$(PREFIX)" >> "${xmake_sh_makefile}"
echo "endif" >> "${xmake_sh_makefile}"
echo "endif" >> "${xmake_sh_makefile}"
echo "" >> "${xmake_sh_makefile}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要删了,走 INSTALLDIR

print "\t@mkdir -p ${_install_bindir_default}" >> "${xmake_sh_makefile}"
print "\t@cp -p ${targetfile} ${_install_bindir_default}/${filename}" >> "${xmake_sh_makefile}"
print "\t@mkdir -p \$(DESTDIR)${_install_bindir_default}" >> "${xmake_sh_makefile}"
print "\t@cp -p ${targetfile} \$(DESTDIR)${_install_bindir_default}/${filename}" >> "${xmake_sh_makefile}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不考虑直接用 DESTDIR 。。revert 了

@waruqi
Copy link
Member

waruqi commented Jul 17, 2023

先放着吧,下个版本 有时间的话,我会搞下

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Leave it alone, the next version, if I have time, I will do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

configure 脚本无法构建 .so 动态库,但 xmake f -k shared 可以
3 participants