5 LANGUAGES
= $(shell cd manpages
/po
&& ls
)
7 SCRIPTS
= backends
/*/* bin
/* scripts
/*.sh 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."
45 mkdir
-p
$(DESTDIR
)/lib
/live
46 cp
-r scripts
/boot.sh scripts
/boot
$(DESTDIR
)/lib
/live
48 # Installing executables
49 mkdir
-p
$(DESTDIR
)/sbin
50 cp bin
/live-new-uuid bin
/live-swapfile
$(DESTDIR
)/sbin
52 mkdir
-p
$(DESTDIR
)/usr
/share
/initramfs-tools
/hooks
53 cp backends
/initramfs-tools
/live.hook
$(DESTDIR
)/usr
/share
/initramfs-tools
/hooks
/live
54 mkdir
-p
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
55 cp backends
/initramfs-tools
/live.script
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
/live
58 mkdir
-p
$(DESTDIR
)/usr
/share
/doc
/live-boot
59 cp
-r COPYING
$(DESTDIR
)/usr
/share
/doc
/live-boot
62 for MANPAGE in manpages
/en
/*; \
64 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
65 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE}); \
68 for LANGUAGE in
$(LANGUAGES
); \
70 for MANPAGE in manpages
/$${LANGUAGE}/*; \
72 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
73 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
78 # Uninstalling executables
79 rm -f
$(DESTDIR
)/sbin
/live-swapfile
80 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/sbin
> /dev
/null
2>&1 || true
82 rm -f
$(DESTDIR
)/usr
/share
/initramfs-tools
/hooks
/live
83 rm -f
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
/live
85 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/initramfs-tools
/hooks
> /dev
/null
2>&1 || true
86 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/initramfs-tools
/scripts
> /dev
/null
2>&1 || true
87 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/initramfs-tools
> /dev
/null
2>&1 || true
88 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
> /dev
/null
2>&1 || true
89 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
> /dev
/null
2>&1 || true
92 rm -rf
$(DESTDIR
)/usr
/share
/doc
/live-boot
93 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/doc
> /dev
/null
2>&1 || true
94 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
> /dev
/null
2>&1 || true
95 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
> /dev
/null
2>&1 || true
97 # Uninstalling manpages
98 for MANPAGE in manpages
/en
/*; \
100 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
101 rm -f
$(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE} .en.
$${SECTION}).
$${SECTION}; \
104 for LANGUAGE in
$(LANGUAGES
); \
106 for MANPAGE in manpages
/$${LANGUAGE}/*; \
108 SECTION
="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
109 rm -f
$(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
113 for SECTION in
$(for MANPAGE in
$(ls manpages
/en
/*); do
basename $${MANPAGE} | sed
-e
's|\.|\n|g' | tail
-n1
; done |
sort -u
); \
115 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/man
/man
$${SECTION} > /dev
/null
2>&1 || true
; \
116 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/man
/*/man
$${SECTION} > /dev
/null
2>&1 || true
; \
119 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/man
> /dev
/null
2>&1 || true
120 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
> /dev
/null
2>&1 || true
121 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
> /dev
/null
2>&1 || true
123 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
) > /dev
/null
2>&1 || true
126 @echo
"Nothing to clean."
129 @echo
"Nothing to distclean."
131 reinstall
: uninstall install