diff --git a/Makefile b/Makefile index c53e143..61c70f2 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,12 @@ 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 @@ -14,6 +18,30 @@ distclean: $(MAKE) -C src distclean rm -f config.mk config.log tmp.c +install : alock + mkdir -p $(DESTDIR)$(prefix)/bin/ + cp -fv src/alock $(DESTDIR)$(prefix)/bin/alock + chmod 755 $(DESTDIR)$(prefix)/bin/alock + mkdir -p $(DESTDIR)$(prefix)/man/man1/ + cp -fv alock.1 $(DESTDIR)$(prefix)/man/man1/alock.1 + chmod 444 $(DESTDIR)$(prefix)/man/man1/alock.1 + 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 LICENSE CHANGELOG \ + $(DESTDIR)$(prefix)/share/alock/ + chmod 444 $(DESTDIR)$(prefix)/share/alock/README + chmod 444 $(DESTDIR)$(prefix)/share/alock/LICENSE + chmod 444 $(DESTDIR)$(prefix)/share/alock/CHANGELOG + alock : $(MAKE) -C src @@ -34,4 +62,6 @@ alock.html : alock.txt $(ASCIIDOC) -d manpage -b xhtml11 -o $@ $< alock.pdf : alock.xml + $(XMLTO) fo $< && $(FOP) $(@:.pdf=.fo) $@ + diff --git a/configure b/configure index c57227b..0268313 100755 --- a/configure +++ b/configure @@ -10,7 +10,7 @@ CHECK_XPM=0 CHECK_IMLIB2=0 CHECK_PAM=0 CHECK_PASSWD=0 -CHECK_HASH=0 +CHECK_HASH=1 prefix=/usr/local @@ -21,6 +21,19 @@ msg_chkfor() { echo -n "checking for "$1" ... " } +check_docs() { + + msg_chkfor "asciidoc" + if which asciidoc 1> /dev/null 2>&3 + then + echo "ok." + echo "#_______________________" >&4 + echo "WITH_DOCS=1" >&4 + echo "" >&4 + else + echo "no. you cant rebuild the docs." + fi +} check_imlib2() { @@ -325,7 +338,7 @@ echo "LIBS=${LIBS}" >&4 echo "#_______________________" >&4 echo "" >&4 - +check_docs check_xlib check_xlogo16 [[ $CHECK_XPM == 1 ]] && check_xpm