Adding upstream version 2.0~a10.
[debian-live-boot/hramrach.git] / Makefile
blob85b4b849d8638fe08da3de3897c14f1bc71c2260
1 # Makefile
3 SHELL := sh -e
5 LANGUAGES = de
7 SCRIPTS = bin/* hooks/* scripts/live scripts/live-functions scripts/live-helpers scripts/*/*
9 all: test build
11 test:
12 @echo -n "Checking for syntax errors"
14 @for SCRIPT in $(SCRIPTS); \
15 do \
16 sh -n $${SCRIPT}; \
17 echo -n "."; \
18 done
20 @echo " done."
22 @echo -n "Checking for bashisms"
24 @# We can't just fail yet on bashisms (FIXME)
25 @if [ -x /usr/bin/checkbashisms ]; \
26 then \
27 for SCRIPT in $(SCRIPTS); \
28 do \
29 checkbashisms -f -x $${SCRIPT} || true; \
30 echo -n "."; \
31 done; \
32 else \
33 echo "WARNING: skipping bashism test - you need to install devscripts."; \
36 @echo " done."
38 build:
39 @echo "Nothing to build."
41 install:
42 # Installing executables
43 mkdir -p $(DESTDIR)/sbin
44 cp bin/live-new-uuid bin/live-snapshot bin/live-swapfile $(DESTDIR)/sbin
46 mkdir -p $(DESTDIR)/usr/share/live-boot
47 cp bin/live-preseed bin/live-reconfigure contrib/languagelist $(DESTDIR)/usr/share/live-boot
49 mkdir -p $(DESTDIR)/usr/share/initramfs-tools
50 cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
52 # Installing docs
53 mkdir -p $(DESTDIR)/usr/share/doc/live-boot
54 cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-boot
56 mkdir -p $(DESTDIR)/usr/share/doc/live-boot/examples
57 cp -r conf/* $(DESTDIR)/usr/share/doc/live-boot/examples
58 # (FIXME)
60 # Installing manpages
61 for MANPAGE in manpages/en/*; \
62 do \
63 SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
64 install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE}); \
65 done
67 for LANGUAGE in $(LANGUAGES); \
68 do \
69 for MANPAGE in manpages/$${LANGUAGE}/*; \
70 do \
71 SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
72 install -D -m 0644 $${MANPAGE} $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
73 done; \
74 done
76 uninstall:
77 # Uninstalling executables
78 rm -f $(DESTDIR)/sbin/live-snapshot $(DESTDIR)/sbin/live-swapfile
79 rm -rf $(DESTDIR)/usr/share/live-boot
80 rm -f $(DESTDIR)/usr/share/initramfs-tools/hooks/live
81 rm -rf $(DESTDIR)/usr/share/initramfs-tools/scripts/live*
82 rm -f $(DESTDIR)/usr/share/initramfs-tools/scripts/local-top/live
84 # Uninstalling docs
85 rm -rf $(DESTDIR)/usr/share/doc/live-boot
86 # (FIXME)
88 # Uninstalling manpages
89 for MANPAGE in manpages/en/*; \
90 do \
91 SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
92 rm -f $(DESTDIR)/usr/share/man/man$${SECTION}/$$(basename $${MANPAGE} .en.$${SECTION}).$${SECTION}; \
93 done
95 for LANGUAGE in $(LANGUAGES); \
96 do \
97 for MANPAGE in manpages/$${LANGUAGE}/*; \
98 do \
99 SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
100 rm -f $(DESTDIR)/usr/share/man/$${LANGUAGE}/man$${SECTION}/$$(basename $${MANPAGE} .$${LANGUAGE}.$${SECTION}).$${SECTION}; \
101 done; \
102 done
104 clean:
106 distclean:
108 reinstall: uninstall install