mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 06:05:59 +01:00
Use ${PREFIX} rather than /usr directly in Makefile, and force the build to attempt compilation even if the user does not have ${PREFIX}/lib write permissions (#1688)
* Force the make process to use ${PREFIX} rather than /usr directly, and make the build attempt to continue even if the user does not have write permissions in ${PREFIX}/lib (for libwlroots) * Prevent insufficient permissions error with make install --------- Co-authored-by: Froggo8311 <Froggo8311@localhost>
This commit is contained in:
parent
8bfb2ad2b7
commit
3b41169395
1 changed files with 8 additions and 8 deletions
16
Makefile
16
Makefile
|
@ -156,7 +156,7 @@ clear:
|
||||||
all:
|
all:
|
||||||
make clear
|
make clear
|
||||||
make fixwlr
|
make fixwlr
|
||||||
cd ./subprojects/wlroots && meson build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 /usr/lib/ && cd ../..
|
cd ./subprojects/wlroots && meson build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 ${PREFIX}/lib/ || echo "Could not install libwlroots to ${PREFIX}/lib/libwlroots.so.12032" && cd ../..
|
||||||
cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc)
|
cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc)
|
||||||
make protocols
|
make protocols
|
||||||
make release
|
make release
|
||||||
|
@ -165,17 +165,17 @@ all:
|
||||||
install:
|
install:
|
||||||
make clear
|
make clear
|
||||||
make fixwlr
|
make fixwlr
|
||||||
cd ./subprojects/wlroots && meson build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 /usr/lib/ && cd ../..
|
cd ./subprojects/wlroots && meson build/ --buildtype=release && ninja -C build/ && cp ./build/libwlroots.so.12032 ${PREFIX}/lib/ || echo "Could not install libwlroots to ${PREFIX}/lib/libwlroots.so.12032" && cd ../..
|
||||||
cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) && cd ../..
|
cd subprojects/udis86 && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja && cmake --build ./build --config Release --target all -j$(shell nproc) && cd ../..
|
||||||
make protocols
|
make protocols
|
||||||
make release
|
make release
|
||||||
cd hyprctl && make all && cd ..
|
cd hyprctl && make all && cd ..
|
||||||
|
|
||||||
mkdir -p /usr/share/wayland-sessions
|
mkdir -p ${PREFIX}/share/wayland-sessions
|
||||||
mkdir -p ${PREFIX}/bin
|
mkdir -p ${PREFIX}/bin
|
||||||
cp ./build/Hyprland ${PREFIX}/bin
|
cp ./build/Hyprland ${PREFIX}/bin
|
||||||
cp ./hyprctl/hyprctl ${PREFIX}/bin
|
cp ./hyprctl/hyprctl ${PREFIX}/bin
|
||||||
if [ ! -f /usr/share/wayland-sessions/hyprland.desktop ]; then cp ./example/hyprland.desktop /usr/share/wayland-sessions; fi
|
if [ ! -f ${PREFIX}/share/wayland-sessions/hyprland.desktop ]; then cp ./example/hyprland.desktop ${PREFIX}/share/wayland-sessions; fi
|
||||||
mkdir -p ${PREFIX}/share/hyprland
|
mkdir -p ${PREFIX}/share/hyprland
|
||||||
cp ./assets/wall_2K.png ${PREFIX}/share/hyprland
|
cp ./assets/wall_2K.png ${PREFIX}/share/hyprland
|
||||||
cp ./assets/wall_4K.png ${PREFIX}/share/hyprland
|
cp ./assets/wall_4K.png ${PREFIX}/share/hyprland
|
||||||
|
@ -191,7 +191,7 @@ uninstall:
|
||||||
rm -f ${PREFIX}/share/wayland-sessions/hyprland.desktop
|
rm -f ${PREFIX}/share/wayland-sessions/hyprland.desktop
|
||||||
rm -f ${PREFIX}/bin/Hyprland
|
rm -f ${PREFIX}/bin/Hyprland
|
||||||
rm -f ${PREFIX}/bin/hyprctl
|
rm -f ${PREFIX}/bin/hyprctl
|
||||||
rm -f /usr/lib/libwlroots.so.12032
|
rm -f ${PREFIX}/lib/libwlroots.so.12032
|
||||||
rm -rf ${PREFIX}/share/hyprland
|
rm -rf ${PREFIX}/share/hyprland
|
||||||
rm -f ${PREFIX}/share/man/man1/Hyprland.1
|
rm -f ${PREFIX}/share/man/man1/Hyprland.1
|
||||||
rm -f ${PREFIX}/share/man/man1/hyprctl.1
|
rm -f ${PREFIX}/share/man/man1/hyprctl.1
|
||||||
|
@ -208,7 +208,7 @@ config:
|
||||||
|
|
||||||
make fixwlr
|
make fixwlr
|
||||||
|
|
||||||
cd subprojects/wlroots && meson ./build --prefix=/usr --buildtype=release -Dwerror=false -Dexamples=false
|
cd subprojects/wlroots && meson ./build --prefix=${PREFIX} --buildtype=release -Dwerror=false -Dexamples=false
|
||||||
cd subprojects/wlroots && ninja -C build/
|
cd subprojects/wlroots && ninja -C build/
|
||||||
|
|
||||||
cd subprojects/wlroots && ninja -C build/ install
|
cd subprojects/wlroots && ninja -C build/ install
|
||||||
|
@ -222,7 +222,7 @@ pluginenv:
|
||||||
|
|
||||||
make fixwlr
|
make fixwlr
|
||||||
|
|
||||||
cd subprojects/wlroots && meson ./build --prefix=/usr --buildtype=release -Dwerror=false -Dexamples=false
|
cd subprojects/wlroots && meson ./build --prefix=${PREFIX} --buildtype=release -Dwerror=false -Dexamples=false
|
||||||
cd subprojects/wlroots && ninja -C build/
|
cd subprojects/wlroots && ninja -C build/
|
||||||
|
|
||||||
configdebug:
|
configdebug:
|
||||||
|
@ -230,7 +230,7 @@ configdebug:
|
||||||
|
|
||||||
make fixwlr
|
make fixwlr
|
||||||
|
|
||||||
cd subprojects/wlroots && meson ./build --prefix=/usr --buildtype=debug -Dwerror=false -Dexamples=false -Db_sanitize=address
|
cd subprojects/wlroots && meson ./build --prefix=${PREFIX} --buildtype=debug -Dwerror=false -Dexamples=false -Db_sanitize=address
|
||||||
cd subprojects/wlroots && ninja -C build/
|
cd subprojects/wlroots && ninja -C build/
|
||||||
|
|
||||||
cd subprojects/wlroots && ninja -C build/ install
|
cd subprojects/wlroots && ninja -C build/ install
|
||||||
|
|
Loading…
Reference in a new issue