indent -linux -l144 -i4 -ts4 **/*.[ch]
[dockapps.git] / wmpager / Makefile
blobc0089b5e27816a0f75341fe8621a99afdac008ac
1 # $Id: Makefile,v 1.3 2002/08/16 17:22:26 essmann Exp $
3 # Copyright (c) 2001 Bruno Essmann <essmann@users.sourceforge.net>
4 # All rights reserved.
6 .SILENT:
8 INSTALLDIR = /usr/local
10 all: wmpager
12 wmpager:
13 @echo "*** `pwd`: $@" ; \
14 cd src ; \
15 $(MAKE) $@
17 clean:
18 @echo "*** `pwd`: $@" ; \
19 cd src ; \
20 $(MAKE) $@
22 install:
23 echo "*** `pwd`: $@" ; \
24 if [ ! -f src/wmpager ] ; then \
25 $(MAKE) wmpager ; \
26 fi ; \
27 if [ -z "`id | grep 'uid=.*(root)'`" ] ; then \
28 echo "you must be root to install wmpager!" ; \
29 exit ; \
30 fi ; \
31 for i in bin/wmpager man/man1/wmpager.1x ; do \
32 if [ -f ${INSTALLDIR}/$$i ] ; then \
33 echo "there's already a $$i in ${INSTALLDIR}" ; \
34 echo "installation aborted." ; \
35 exit ; \
36 fi ; \
37 done ; \
38 if [ ! -d ${INSTALLDIR}/bin ] ; then \
39 mkdir -p ${INSTALLDIR}/bin ; \
40 fi ; \
41 echo "copying wmpager to ${INSTALLDIR}/bin" ; \
42 cp src/wmpager ${INSTALLDIR}/bin/wmpager ; \
43 chmod 755 ${INSTALLDIR}/bin/wmpager ; \
44 if [ ! -d ${INSTALLDIR}/man/man1 ] ; then \
45 mkdir -p ${INSTALLDIR}/man/man1 ] ; \
46 fi ; \
47 echo "copying manual page to ${INSTALLDIR}/man/man1" ; \
48 cp man/man1/wmpager.1x ${INSTALLDIR}/man/man1/wmpager.1x ; \
49 chmod 644 ${INSTALLDIR}/man/man1/wmpager.1x ; \
50 echo "copying theme files to ${INSTALLDIR}/share/wmpager" ; \
51 if [ ! -d ${INSTALLDIR}/share/wmpager ] ; then \
52 mkdir -p ${INSTALLDIR}/share/wmpager ; \
53 fi ; \
54 cp src/buttons.xpm ${INSTALLDIR}/share/wmpager/blue.xpm ; \
55 cp themes/*.xpm ${INSTALLDIR}/share/wmpager ; \
56 chmod 644 ${INSTALLDIR}/share/wmpager/* ; \
57 echo "installation complete, make sure your have ${INSTALLDIR}/bin" ; \
58 echo "in your PATH and ${INSTALLDIR}/man in your MANPATH."
60 uninstall:
61 echo "*** `pwd`: $@" ; \
62 if [ -z "`id | grep 'uid=.*(root)'`" ] ; then \
63 echo "you must be root to uninstall wmpager!" ; \
64 exit ; \
65 fi ; \
66 for i in bin/wmpager man/man1/wmpager.1x ; do \
67 if [ -f ${INSTALLDIR}/$$i ] ; then \
68 echo "removing $$i from ${INSTALLDIR}" ; \
69 rm -f ${INSTALLDIR}/$$i ; \
70 fi ; \
71 done ; \
72 if [ -d ${INSTALLDIR}/share/wmpager ] ; then \
73 echo "removing directory $$i from ${INSTALLDIR}" ; \
74 rm -rf ${INSTALLDIR}/share/wmpager ; \
75 fi ; \
76 echo "uninstallation complete."