# Makefile
-BUILD_SYSTEM := $(shell lsb_release --short --id)
-
TRANSLATIONS="it"
all: build
test:
+ # Checking for syntax errors
set -e; for SCRIPT in bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/*; \
do \
sh -n $$SCRIPT; \
done
+ # Checking for bashisms (temporary not failing, but only listing)
+ if [ -x /usr/bin/checkbashisms ]; \
+ then \
+ checkbashisms bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/* || true; \
+ else \
+ echo "bashism test skipped - you need to install devscripts."; \
+ fi
+
build:
- # Setting BUILD_SYSTEM
- sed -e 's/\(BUILD_SYSTEM="\).*"/\1'$(BUILD_SYSTEM)'"/g' conf/live.conf > live.conf
+ $(MAKE) -C manpages
install: test build
# Installing configuration
- install -D -m 0644 live.conf $(DESTDIR)/etc/live.conf
+ install -D -m 0644 conf/live.conf $(DESTDIR)/etc/live.conf
+ install -D -m 0644 conf/compcache $(DESTDIR)/usr/share/initramfs-tools/conf.d/compcache
# Installing executables
mkdir -p $(DESTDIR)/sbin
- cp bin/live-getty bin/live-login bin/live-snapshot $(DESTDIR)/sbin
+ cp bin/live-getty bin/live-login bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin
mkdir -p $(DESTDIR)/usr/share/live-initramfs
- cp bin/live-preseed bin/live-reconfigure $(DESTDIR)/usr/share/live-initramfs
+ cp bin/live-preseed bin/live-reconfigure contrib/languagelist $(DESTDIR)/usr/share/live-initramfs
mkdir -p $(DESTDIR)/usr/share/initramfs-tools
cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-initramfs
mkdir -p $(DESTDIR)/usr/share/doc/live-initramfs/examples
- cp -r conf/live.conf $(DESTDIR)/usr/share/doc/live-initramfs/examples
+ cp -r conf/* $(DESTDIR)/usr/share/doc/live-initramfs/examples
# Installing manpages
set -e; for MANPAGE in manpages/*.en.1; \
rm -f $(DESTDIR)/etc/live.conf
# Uninstalling executables
- rm -f $(DESTDIR)/sbin/live-getty $(DESTDIR)/sbin/live-login $(DESTDIR)/sbin/live-snapshot
+ rm -f $(DESTDIR)/sbin/live-getty $(DESTDIR)/sbin/live-login $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile
rm -rf $(DESTDIR)/usr/share/live-initramfs
rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live
rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live*
rm -f $(DESTDIR)/usr/share/man/man7/live-login.7.gz
update:
- set -e; for FILE in docs/parameters.txt manpages/*.en.*; \
- do \
- sed -i -e 's/2007\\-09\\-03/2007\\-09\\-10/' \
- -e 's/03.09.2007/10.09.2007/' \
- -e 's/1.99.1/1.99.2/' \
- $$FILE; \
- done
+ # Update language list
+ wget -O "contrib/languagelist" \
+ "http://svn.debian.org/viewsvn/*checkout*/d-i/trunk/packages/localechooser/languagelist"
clean:
- rm -f live.conf
+ $(MAKE) -C manpages clean
distclean: