Browse Source
Create a standard Makefile that replaces the non-standard installation script.pull/4/head
George Vlahavas
10 years ago
2 changed files with 25 additions and 24 deletions
@ -0,0 +1,25 @@ |
|||
PREFIX ?= /usr/local |
|||
DESTDIR ?= / |
|||
|
|||
man: |
|||
@txt2tags -o man/xdgmenumaker.1 man/xdgmenumaker.t2t || \
|
|||
echo "WARNING: txt2tags is not installed. The xdgmenumaker manpage will not be created." |
|||
|
|||
install: |
|||
install -d -m 755 $(DESTDIR)/$(PREFIX)/bin |
|||
install -d -m 755 $(DESTDIR)/usr/share/desktop-directories |
|||
install -m 755 src/xdgmenumaker $(DESTDIR)/$(PREFIX)/bin/ |
|||
install -m 644 desktop-directories/* $(DESTDIR)/usr/share/desktop-directories |
|||
if [ -f man/xdgmenumaker.man ]; then \
|
|||
install -d -m 755 $(DESTDIR)/$(PREFIX)/share/man/man1; \
|
|||
install -m 644 man/xdgmenumaker.1 $(DESTDIR)/$(PREFIX)/share/man/man1/; \
|
|||
fi |
|||
|
|||
clean: |
|||
rm -f man/xdgmenumaker.1 |
|||
|
|||
uninstall: |
|||
rm -f $(DESTDIR)/$(PREFIX)/bin/xdgmenumaker |
|||
rm -f $(DESTDIR)/usr/share/desktop-directories/xdgmenumaker* |
|||
|
|||
.PHONY: man clean install |
@ -1,24 +0,0 @@ |
|||
#!/bin/sh |
|||
|
|||
cd $(dirname $0) |
|||
|
|||
which txt2tags &> /dev/null |
|||
retval=$? |
|||
if [ $retval -eq 0 ]; then |
|||
cd man |
|||
txt2tags xdgmenumaker.t2t |
|||
cd .. |
|||
else |
|||
echo "WARNING: txt2tags is not installed. The xdgmenumaker manpage will not be created." |
|||
fi |
|||
|
|||
install -d -m 755 $DESTDIR/usr/bin |
|||
install -d -m 755 $DESTDIR/usr/share/desktop-directories |
|||
install -m 755 src/xdgmenumaker $DESTDIR/usr/bin/ |
|||
install -m 644 desktop-directories/* $DESTDIR/usr/share/desktop-directories |
|||
|
|||
if [ -f man/xdgmenumaker.man ]; then |
|||
install -d -m 755 $DESTDIR/usr/share/man/man1 |
|||
install -m 644 man/xdgmenumaker.man $DESTDIR/usr/share/man/man1/xdgmenumaker.1 |
|||
fi |
|||
|
Loading…
Reference in new issue