Cleaning up makefile.
This commit is contained in:
parent
142228914f
commit
9671888069
59
Makefile
59
Makefile
|
@ -1,22 +1,24 @@
|
||||||
# Makefile
|
# Makefile
|
||||||
|
|
||||||
|
SHELL := sh -e
|
||||||
|
|
||||||
#TRANSLATIONS="de"
|
#TRANSLATIONS="de"
|
||||||
|
|
||||||
all: build
|
all: test install
|
||||||
|
|
||||||
test:
|
test:
|
||||||
# Checking for syntax errors
|
# Checking for syntax errors
|
||||||
set -e; for SCRIPT in functions.sh functions/* examples/*/*.sh helpers/* hooks/*; \
|
for SCRIPT in functions.sh functions/* examples/*/*.sh helpers/* hooks/*; \
|
||||||
do \
|
do \
|
||||||
sh -n $$SCRIPT; \
|
sh -n $$SCRIPT; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# Checking for bashisms
|
# Checking for bashisms
|
||||||
set -e; if [ -x /usr/bin/checkbashisms ]; \
|
if [ -x /usr/bin/checkbashisms ]; \
|
||||||
then \
|
then \
|
||||||
checkbashisms functions.sh functions/* examples/*/*.sh helpers/* hooks/*; \
|
checkbashisms functions.sh functions/* examples/*/*.sh helpers/* hooks/*; \
|
||||||
else \
|
else \
|
||||||
echo "bashism test skipped - you need to install devscripts."; \
|
echo "WARNING: skipping bashism test - you need to install devscripts.";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
@ -36,25 +38,25 @@ install:
|
||||||
cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-helper
|
cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-helper
|
||||||
|
|
||||||
# Installing manpages
|
# Installing manpages
|
||||||
set -e; for MANPAGE in manpages/*.en.1; \
|
for MANPAGE in manpages/*.en.1; \
|
||||||
do \
|
do \
|
||||||
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1; \
|
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man1/$$(basename $$MANPAGE .en.1).1; \
|
||||||
done
|
done
|
||||||
|
|
||||||
set -e; for MANPAGE in manpages/*.en.7; \
|
for MANPAGE in manpages/*.en.7; \
|
||||||
do \
|
do \
|
||||||
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7; \
|
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/man7/$$(basename $$MANPAGE .en.7).7; \
|
||||||
done
|
done
|
||||||
|
|
||||||
set -e; for TRANSLATIONS in $$TRANSLATIONS; \
|
for TRANSLATIONS in $$TRANSLATIONS; \
|
||||||
do \
|
do \
|
||||||
for MANPAGE in manpages/*.$$TRANSLATION.1; \
|
for MANPAGE in manpages/*.$$TRANSLATION.1; \
|
||||||
do \
|
do \
|
||||||
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/`basename $$MANPAGE .$$TRANSLATION.1`.1; \
|
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1; \
|
||||||
done; \
|
done; \
|
||||||
for MANPAGE in manpages/*.$$TRANSLATION.7; \
|
for MANPAGE in manpages/*.$$TRANSLATION.7; \
|
||||||
do \
|
do \
|
||||||
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .$$TRANSLATION.7`.7; \
|
install -D -m 0644 $$MANPAGE $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/$$(basename $$MANPAGE .$$TRANSLATION.7).7; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -65,7 +67,7 @@ uninstall:
|
||||||
# Uninstalling executables
|
# Uninstalling executables
|
||||||
for HELPER in helpers/*; \
|
for HELPER in helpers/*; \
|
||||||
do \
|
do \
|
||||||
rm -f $(DESTDIR)/usr/bin/`basename $$HELPER`; \
|
rm -f $(DESTDIR)/usr/bin/$$(basename $$HELPER); \
|
||||||
done
|
done
|
||||||
|
|
||||||
# Uninstalling shared data
|
# Uninstalling shared data
|
||||||
|
@ -75,37 +77,28 @@ uninstall:
|
||||||
rm -rf $(DESTDIR)/usr/share/doc/live-helper
|
rm -rf $(DESTDIR)/usr/share/doc/live-helper
|
||||||
|
|
||||||
# Uninstalling manpages
|
# Uninstalling manpages
|
||||||
set -e; for MANPAGE in manpages/*.en.1; \
|
for MANPAGE in manpages/*.en.1; \
|
||||||
do \
|
do \
|
||||||
rm -f $(DESTDIR)/usr/share/man/man1/`basename $$MANPAGE .en.1`.1*; \
|
rm -f $(DESTDIR)/usr/share/man/man1/$$(basename $$MANPAGE .en.1).1*; \
|
||||||
done
|
done
|
||||||
|
|
||||||
set -e; for MANPAGE in manpages/*.en.7; \
|
for MANPAGE in manpages/*.en.7; \
|
||||||
do \
|
do \
|
||||||
rm -f $(DESTDIR)/usr/share/man/man7/`basename $$MANPAGE .en.7`.7*; \
|
rm -f $(DESTDIR)/usr/share/man/man7/$$(basename $$MANPAGE .en.7).7*; \
|
||||||
done
|
done
|
||||||
|
|
||||||
set -e; for TRANSLATIONS in $$TRANSLATIONS; \
|
for TRANSLATIONS in $$TRANSLATIONS; \
|
||||||
do \
|
do \
|
||||||
for MANPAGE in manpages/*.$$TRANSLATION.1; \
|
for MANPAGE in manpages/*.$$TRANSLATION.1; \
|
||||||
do \
|
do \
|
||||||
rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/`basename $$MANPAGE .$$TRANSLATION.1`.1*; \
|
rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man1/$$(basename $$MANPAGE .$$TRANSLATION.1).1*; \
|
||||||
done; \
|
done; \
|
||||||
for MANPAGE in manpages/*.$$TRANSLATION.7; \
|
for MANPAGE in manpages/*.$$TRANSLATION.7; \
|
||||||
do \
|
do \
|
||||||
rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/`basename $$MANPAGE .$$TRANSLATION.7`.7*; \
|
rm -f $(DESTDIR)/usr/share/man/$$TRANSLATION/man7/$$(basename $$MANPAGE .$$TRANSLATION.7).7*; \
|
||||||
done; \
|
done; \
|
||||||
done
|
done
|
||||||
|
|
||||||
update:
|
|
||||||
set -e; for FILE in functions.sh functions/*.sh examples/cron/*.sh manpages/*.en.*; \
|
|
||||||
do \
|
|
||||||
sed -i -e 's/2007\\-11\\-26/2007\\-12\\-03/' \
|
|
||||||
-e 's/26.11.2007/03.12.2007/' \
|
|
||||||
-e 's/1.0~a38/1.0~a39/' \
|
|
||||||
$$FILE; \
|
|
||||||
done
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
|
@ -114,8 +107,10 @@ reinstall: uninstall install
|
||||||
|
|
||||||
po4a:
|
po4a:
|
||||||
# Automatic generation of translated manpages
|
# Automatic generation of translated manpages
|
||||||
set -e; if [ $$(which po4a) ]; then \
|
if [ $$(which po4a) ]; \
|
||||||
cd manpages/ ; po4a po4a/live-helper.cfg; \
|
then \
|
||||||
|
cd manpages; \
|
||||||
|
po4a po4a/live-helper.cfg; \
|
||||||
else \
|
else \
|
||||||
echo "Please install po4a (http://po4a.alioth.debian.org/)."; \
|
echo "ERROR: skipping po generation - you need to install po4a <http://po4a.alioth.debian.org/>."; \
|
||||||
fi;
|
fi
|
||||||
|
|
Loading…
Reference in New Issue