This repository has been archived on 2025-02-01. You can view files and clone it, but cannot push or open issues or pull requests.
alock/GNUmakefile
mathias.gumz 3a17f9f123 fix for #13, bug in 'make install' when no 'asciidoc' is installed
--HG--
extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%4086
2008-11-04 07:02:34 +00:00

92 lines
2.7 KiB
Makefile

ifeq ($(wildcard config.mk),config.mk)
include config.mk
ifdef WITH_DOCS
first: alock docs
else
first: alock
endif
else
first:
@echo "run './configure' first"
endif
clean:
$(MAKE) -C src clean
distclean:
$(MAKE) -C src distclean
rm -f config.mk config.log tmp.c
ifdef WITH_DOCS
install : alock docs
else
install : alock
endif
mkdir -p $(DESTDIR)$(prefix)/bin/
cp -fv src/alock $(DESTDIR)$(prefix)/bin/alock
chmod 755 $(DESTDIR)$(prefix)/bin/alock
@if [ -f alock.1 ]; then \
mkdir -p $(DESTDIR)$(prefix)/man/man1/ ;\
cp -fv alock.1 $(DESTDIR)$(prefix)/man/man1/alock.1 ;\
chmod 444 $(DESTDIR)$(prefix)/man/man1/alock.1 ;\
else \
echo ",-----------------------------------------------------------," ;\
echo "| not installing the documentation because it was not built |" ;\
echo "| install 'asciidoc' and run './configure && make' again |" ; \
echo "\`-----------------------------------------------------------'" ;\
fi
mkdir -p $(DESTDIR)$(prefix)/share/alock/xcursors
cp -fv contrib/xcursor-alock contrib/xcursor-gentoo \
contrib/xcursor-fluxbox contrib/xcursor-pekwm \
$(DESTDIR)$(prefix)/share/alock/xcursors/
mkdir -p $(DESTDIR)$(prefix)/share/alock/bitmaps
cp -fv bitmaps/alock.xbm bitmaps/alock_mask.xbm \
bitmaps/mini.xbm bitmaps/mini_mask.xbm \
bitmaps/xtr.xbm bitmaps/xtr_mask.xbm \
$(DESTDIR)$(prefix)/share/alock/bitmaps/
chmod 444 $(DESTDIR)$(prefix)/share/alock/xcursors/*
chmod 444 $(DESTDIR)$(prefix)/share/alock/bitmaps/*
cp -fv README.txt LICENSE.txt CHANGELOG.txt \
$(DESTDIR)$(prefix)/share/alock/
chmod 444 $(DESTDIR)$(prefix)/share/alock/README.txt
chmod 444 $(DESTDIR)$(prefix)/share/alock/LICENSE.txt
chmod 444 $(DESTDIR)$(prefix)/share/alock/CHANGELOG.txt
@if `./src/alock -auth list | grep passwd > /dev/null`; then \
echo ",-------------------------------------------------,"; \
echo "| it seems that you have compiled 'alock' with |"; \
echo "| 'shadow' support. to use that binary you have |"; \
echo "| set the 'suid' - bit, something like: |"; \
echo "| |"; \
echo "| $$> chown root:root \$$prefix/bin/alock |";\
echo "| $$> chmod 4111 \$$prefix/bin/alock |";\
echo "| |"; \
echo "| if not you ll get 'permission denied' problems. |"; \
echo "\`-------------------------------------------------'";\
fi
alock :
$(MAKE) -C src
ifdef WITH_DOCS
ASCIIDOC := asciidoc
XMLTO := xmlto
FOP := fop
docs: alock.1 alock.html
alock.xml : alock.txt
$(ASCIIDOC) -d manpage -b docbook -o $@ $<
alock.1 : alock.xml
$(XMLTO) man $<
alock.html : alock.txt
$(ASCIIDOC) -d manpage -b xhtml11 -o $@ $<
alock.pdf : alock.xml
$(XMLTO) fo $< && $(FOP) $(@:.pdf=.fo) $@
endif