5 LANGUAGES
= $(shell cd manpages
/po
&& ls
)
7 SCRIPTS
= bin
/* hooks
/* scripts
/live scripts
/live-functions scripts
/live-helpers scripts
/*/*
12 @echo
-n
"Checking for syntax errors"
14 @for SCRIPT in
$(SCRIPTS
); \
22 @
# We can't just fail yet on bashisms (FIXME)
23 @if
[ -x
"$$(which checkbashisms 2>/dev/null)" ]; \
25 echo
-n
"Checking for bashisms"; \
26 for SCRIPT in
$(SCRIPTS
); \
28 checkbashisms
-f
-x
$${SCRIPT} || true
; \
33 echo
"W: checkbashisms - command not found"; \
34 echo
"I: checkbashisms can be optained from: "; \
35 echo
"I: http://git.debian.org/?p=devscripts/devscripts.git"; \
36 echo
"I: On Debian based systems, checkbashisms can be installed with:"; \
37 echo
"I: apt-get install devscripts"; \
41 @echo
"Nothing to build."
44 # Installing executables
45 mkdir
-p
$(DESTDIR
)/sbin
46 cp bin
/live-new-uuid bin
/live-snapshot bin
/live-swapfile
$(DESTDIR
)/sbin
48 mkdir
-p
$(DESTDIR
)/usr
/share
/live-boot
49 cp bin
/live-preseed bin
/live-reconfigure local
/languagelist
$(DESTDIR
)/usr
/share
/live-boot
51 mkdir
-p
$(DESTDIR
)/usr
/share
/initramfs-tools
52 cp
-r hooks scripts
$(DESTDIR
)/usr
/share
/initramfs-tools
55 mkdir
-p
$(DESTDIR
)/usr
/share
/doc
/live-boot
56 cp
-r COPYING
$(DESTDIR
)/usr
/share
/doc
/live-boot
58 mkdir
-p
$(DESTDIR
)/usr
/share
/doc
/live-boot
/examples
59 cp
-r etc
/* $(DESTDIR
)/usr
/share
/doc
/live-boot
/examples
63 for MANPAGE in manpages
/en
/*; \
65 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
66 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE}); \
69 for LANGUAGE in
$(LANGUAGES
); \
71 for MANPAGE in manpages
/$${LANGUAGE}/*; \
73 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
74 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
79 # Uninstalling executables
80 rm -f
$(DESTDIR
)/sbin
/live-snapshot
$(DESTDIR
)/sbin
/live-swapfile
81 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/sbin
> /dev
/null
2>&1 || true
83 rm -rf
$(DESTDIR
)/usr
/share
/live-boot
85 rm -f
$(DESTDIR
)/usr
/share
/initramfs-tools
/hooks
/live
86 rm -rf
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
/live
*
87 rm -f
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
/local-top
/live
89 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/initramfs-tools
/hooks
> /dev
/null
2>&1 || true
90 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
/local-top
> /dev
/null
2>&1 || true
91 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
> /dev
/null
2>&1 || true
92 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/initramfs-tools
> /dev
/null
2>&1 || true
93 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
> /dev
/null
2>&1 || true
94 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
> /dev
/null
2>&1 || true
97 rm -rf
$(DESTDIR
)/usr
/share
/doc
/live-boot
98 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/doc
> /dev
/null
2>&1 || true
99 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
> /dev
/null
2>&1 || true
100 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
> /dev
/null
2>&1 || true
102 # Uninstalling manpages
103 for MANPAGE in manpages
/en
/*; \
105 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
106 rm -f
$(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE} .en.
$${SECTION}).
$${SECTION}; \
109 for LANGUAGE in
$(LANGUAGES
); \
111 for MANPAGE in manpages
/$${LANGUAGE}/*; \
113 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
114 rm -f
$(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
118 for SECTION in
$(for MANPAGE in
$(ls manpages
/en
/*); do
basename $${MANPAGE} | sed
-e
's|\.|\n|g' | tail
-n1
; done |
sort -u
); \
120 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/man
/man
$${SECTION} > /dev
/null
2>&1 || true
; \
121 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/man
/*/man
$${SECTION} > /dev
/null
2>&1 || true
; \
124 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/man
> /dev
/null
2>&1 || true
125 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
> /dev
/null
2>&1 || true
126 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
> /dev
/null
2>&1 || true
128 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
) > /dev
/null
2>&1 || true
131 @echo
"Nothing to clean."
134 @echo
"Nothing to distclean."
136 reinstall
: uninstall install