1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
# Makefile
## live-config(7) - System Configuration Components
## Copyright (C) 2016-2020 The Debian Live team
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
SHELL := sh -e
LANGUAGES = $(shell cd manpages/po && ls)
SCRIPTS = backend/*/*.init frontend/* components/*
all: build
test:
@echo -n "Checking for syntax errors"
@for SCRIPT in $(SCRIPTS); \
do \
sh -n $${SCRIPT}; \
echo -n "."; \
done
@echo " done."
@if [ -x "$$(which checkbashisms 2>/dev/null)" ]; \
then \
echo -n "Checking for bashisms"; \
for SCRIPT in $(SCRIPTS); \
do \
checkbashisms -f -x $${SCRIPT}; \
echo -n "."; \
done; \
echo " done."; \
else \
echo "W: checkbashisms - command not found"; \
echo "I: checkbashisms can be obtained from: "; \
echo "I: http://git.debian.org/?p=devscripts/devscripts.git"; \
echo "I: On Debian based systems, checkbashisms can be installed with:"; \
echo "I: apt-get install devscripts"; \
fi
build:
@echo "Nothing to build."
install:
# Installing backend
mkdir -p $(DESTDIR)/etc/init.d
cp backend/sysvinit/live-config.init $(DESTDIR)/etc/init.d/live-config
mkdir -p $(DESTDIR)/lib/systemd/system $(DESTDIR)/lib/systemd/system-generators
cp backend/systemd/live-config.systemd $(DESTDIR)/lib/systemd/system/live-config.service
cp backend/systemd/live-config-getty-generator $(DESTDIR)/lib/systemd/system-generators/
# Installing frontend and components
mkdir -p $(DESTDIR)/bin $(DESTDIR)/lib/live/config
cp frontend/live-* $(DESTDIR)/bin
cp frontend/*.sh $(DESTDIR)/lib/live/
cp components/* $(DESTDIR)/lib/live/config
mkdir -p $(DESTDIR)/var/lib/live/config
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live/config
cp -r VERSION share/* $(DESTDIR)/usr/share/live/config
# Installing docs
mkdir -p $(DESTDIR)/usr/share/doc/live-config
cp -r COPYING examples $(DESTDIR)/usr/share/doc/live-config
# 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
clean:
@echo "Nothing to clean."
distclean: clean
@echo "Nothing to distclean."
reinstall: uninstall install
|