X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=blobdiff_plain;f=Makefile;h=ce0262b9463f1ed2ef1b4eda268847574d206733;hp=d38a949636542746422f2dcf56c9c3d1281b906c;hb=d98b500c721b2bd5319d84f1e38a2e54db043834;hpb=b03f201f05debe6114a88fad1f0ef45c0ec21e3f diff --git a/Makefile b/Makefile index d38a949..ce0262b 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ SHELL := sh -e -LANGUAGES = de +LANGUAGES = $(shell cd manpages/po && ls) SCRIPTS = bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/* -all: test build +all: build test: @echo -n "Checking for syntax errors" @@ -33,7 +33,7 @@ test: echo "W: checkbashisms - command not found"; \ echo "I: checkbashisms can be optained from: "; \ echo "I: http://git.debian.org/?p=devscripts/devscripts.git"; \ - echo "I: On Debian systems, checkbashisms can be installed with:"; \ + echo "I: On Debian based systems, checkbashisms can be installed with:"; \ echo "I: apt-get install devscripts"; \ fi @@ -42,6 +42,9 @@ build: install: # Installing executables + mkdir -p $(DESTDIR)/lib/live + cp bin/boot.sh $(DESTDIR)/lib/live + mkdir -p $(DESTDIR)/sbin cp bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin @@ -77,15 +80,31 @@ install: uninstall: # Uninstalling executables + rm -f $(DESTDIR)/lib/live/boot.sh + rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib/live > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/lib > /dev/null 2>&1 || true + rm -f $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile + rmdir --ignore-fail-on-non-empty $(DESTDIR)/sbin > /dev/null 2>&1 || true + rm -rf $(DESTDIR)/usr/share/live-boot + rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live* rm -f $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/live + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/hooks > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools/scripts > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/initramfs-tools > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true + # Uninstalling docs rm -rf $(DESTDIR)/usr/share/doc/live-boot - # (FIXME) + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true # Uninstalling manpages for MANPAGE in manpages/en/*; \ @@ -103,8 +122,22 @@ uninstall: done; \ done + for SECTION in $(ls manpages/en/* | awk -F. '{ print $2 }'); \ + do \ + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/man$${SECTION} > /dev/null 2>&1 || true; \ + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man/*/man$${SECTION} > /dev/null 2>&1 || true; \ + done + + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/man > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true + rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true + + rmdir --ignore-fail-on-non-empty $(DESTDIR) > /dev/null 2>&1 || true + clean: + @echo "Nothing to clean." -distclean: +distclean: clean + @echo "Nothing to distclean." reinstall: uninstall install