1 Star 0 Fork 1

/live-build

forked from openKylin/live-build 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 2.67 KB
一键复制 编辑 原始数据 按行查看 历史
openKylinBot 提交于 2022-05-25 18:21 . Import Upstream version 3.0~a57
# Makefile
SHELL := sh -e
LANGUAGES = $(shell cd manpages/po && ls)
SCRIPTS = bin/* frontends/cgi/live-build-cgi frontends/cgi/live-build-cgi.cron functions/* examples/auto/* examples/hooks/* scripts/*.sh scripts/*/* share/bin/* share/hooks/*
all: build
test:
@echo -n "Checking for syntax errors"
@for SCRIPT in $(SCRIPTS); \
do \
sh -n $${SCRIPT}; \
echo -n "."; \
done
@echo " done."
@echo -n "Checking for bashisms"
@if [ -x /usr/bin/checkbashisms ]; \
then \
for SCRIPT in $(SCRIPTS); \
do \
checkbashisms -f -x $${SCRIPT}; \
echo -n "."; \
done; \
else \
echo "WARNING: skipping bashism test - you need to install devscripts."; \
fi
@echo " done."
build:
@echo "Nothing to build."
install:
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live/build
cp -r frontends/cgi data functions templates VERSION $(DESTDIR)/usr/share/live/build
cp -r share/* $(DESTDIR)/usr/share/live/build
# Installing executables
mkdir -p $(DESTDIR)/usr/bin
cp -a bin/* $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/usr/lib/live
cp -a scripts/* $(DESTDIR)/usr/lib/live
# Installing documentation
mkdir -p $(DESTDIR)/usr/share/doc/live-build
cp -r COPYING docs/* examples $(DESTDIR)/usr/share/doc/live-build
# Installing manpages
for MANPAGE in manpages/en/*; \
do \
SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE}); \
done
for LANGUAGE in $(LANGUAGES); \
do \
for MANPAGE in manpages/$${LANGUAGE}/*; \
do \
SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
done; \
done
uninstall:
# Uninstalling shared data
rm -rf $(DESTDIR)/usr/share/live/build
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/live > /dev/null 2>&1 || true
# Uninstalling executables
rm -f $(DESTDIR)/usr/bin/lb $(DESTDIR)/usr/bin/live-build
# Uninstalling documentation
rm -rf $(DESTDIR)/usr/share/doc/live-build
# Uninstalling manpages
for MANPAGE in manpages/en/*; \
do \
SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE} .en.$${SECTION}).$${SECTION}; \
done
for LANGUAGE in $(LANGUAGES); \
do \
for MANPAGE in manpages/$${LANGUAGE}/*; \
do \
SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
rm -f $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
done; \
done
clean:
distclean:
reinstall: uninstall install
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/add/live-build.git
[email protected]:add/live-build.git
add
live-build
live-build
openkylin/yangtze

搜索帮助