5 LANGUAGES
= $(shell cd manpages
/po
&& ls
)
7 SCRIPTS
= frontend
/cli
/* frontend
/cgi
/live-build-cgi frontend
/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 frontend
/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 frontend
/cli
/* $(DESTDIR
)/usr
/bin
50 mkdir
-p
$(DESTDIR
)/usr
/lib
/live
51 cp
-a scripts
/* $(DESTDIR
)/usr
/lib
/live
52 cp
-a components
/* $(DESTDIR
)/usr
/lib
/live
/build
54 # Installing documentation
55 mkdir
-p
$(DESTDIR
)/usr
/share
/doc
/live-build
56 cp
-r COPYING examples
$(DESTDIR
)/usr
/share
/doc
/live-build
59 for MANPAGE in manpages
/en
/*; \
61 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
62 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE}); \
65 for LANGUAGE in
$(LANGUAGES
); \
67 for MANPAGE in manpages
/$${LANGUAGE}/*; \
69 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
70 install -D
-m
0644 $${MANPAGE} $(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
75 # Uninstalling shared data
76 rm -rf
$(DESTDIR
)/usr
/share
/live
/build
77 rmdir
--ignore-fail-on-non-empty
$(DESTDIR
)/usr
/share
/live
> /dev
/null
2>&1 || true
79 # Uninstalling executables
80 rm -f
$(DESTDIR
)/usr
/bin
/lb
$(DESTDIR
)/usr
/bin
/live-build
82 # Uninstalling documentation
83 rm -rf
$(DESTDIR
)/usr
/share
/doc
/live-build
85 # Uninstalling manpages
86 for MANPAGE in manpages
/en
/*; \
88 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
89 rm -f
$(DESTDIR
)/usr
/share
/man
/man
$${SECTION}/$$(basename $${MANPAGE} .en.
$${SECTION}).
$${SECTION}; \
92 for LANGUAGE in
$(LANGUAGES
); \
94 for MANPAGE in manpages
/$${LANGUAGE}/*; \
96 SECTION
="$$(basename $${MANPAGE} | awk -F. '{ print $$3 }')"; \
97 rm -f
$(DESTDIR
)/usr
/share
/man
/$${LANGUAGE}/man
$${SECTION}/$$(basename $${MANPAGE} .
$${LANGUAGE}.
$${SECTION}).
$${SECTION}; \
105 reinstall
: uninstall install