5 LANGUAGES
= $(shell cd manpages
/po
&& ls
)
7 SCRIPTS
= bin
/* frontends
/cgi
/live-build-cgi frontends
/cgi
/live-build-cgi.cron functions
/* examples
/auto
/* examples
/hooks
/* scripts
/*.sh scripts
/*/* share
/bin
/* share
/hooks
/*
12 @echo
-n
"Checking for syntax errors"
14 @for SCRIPT in
$(SCRIPTS
); \
22 @echo
-n
"Checking for bashisms"
24 @if
[ -x
/usr
/bin
/checkbashisms
]; \
26 for SCRIPT in
$(SCRIPTS
); \
28 checkbashisms
-f
-x
$${SCRIPT}; \
32 echo
"WARNING: skipping bashism test - you need to install devscripts."; \
38 @echo
"Nothing to build."
41 # Installing shared data
42 mkdir
-p
$(DESTDIR
)/usr
/share
/live
/build
43 cp
-r frontends
/cgi data functions templates VERSION
$(DESTDIR
)/usr
/share
/live
/build
44 cp
-r share
/* $(DESTDIR
)/usr
/share
/live
/build
46 # Installing executables
47 mkdir
-p
$(DESTDIR
)/usr
/bin
48 cp
-a bin
/* $(DESTDIR
)/usr
/bin
50 mkdir
-p
$(DESTDIR
)/usr
/lib
/live
51 cp
-a scripts
/* $(DESTDIR
)/usr
/lib
/live
53 # Installing documentation
54 mkdir
-p
$(DESTDIR
)/usr
/share
/doc
/live-build
55 cp
-r COPYING docs
/* examples
$(DESTDIR
)/usr
/share
/doc
/live-build
58 for MANPAGE in manpages
/en
/*; \
60 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
61 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE}); \
64 for LANGUAGE in
$(LANGUAGES
); \
66 for MANPAGE in manpages
/$${LANGUAGE}/*; \
68 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
69 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
74 # Uninstalling shared data
75 rm -rf
$(DESTDIR
)/usr
/share
/live
/build
76 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/live
> /dev
/null
2>&1 || true
78 # Uninstalling executables
79 rm -f
$(DESTDIR
)/usr
/bin
/lb
$(DESTDIR
)/usr
/bin
/live-build
81 # Uninstalling documentation
82 rm -rf
$(DESTDIR
)/usr
/share
/doc
/live-build
84 # Uninstalling manpages
85 for MANPAGE in manpages
/en
/*; \
87 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
88 rm -f
$(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE} .en.
$${SECTION}).
$${SECTION}; \
91 for LANGUAGE in
$(LANGUAGES
); \
93 for MANPAGE in manpages
/$${LANGUAGE}/*; \
95 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
96 rm -f
$(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
104 reinstall
: uninstall install