summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarg@10ksloc.org <unknown>2006-08-03 13:50:37 +0200
committerarg@10ksloc.org <unknown>2006-08-03 13:50:37 +0200
commit4d55eee7547ff3b9e0d801c1aa86ba62286f56c4 (patch)
treece4ed4a3709105d2d236994fab45954d217222cf
parentd41b232b524afe38d4ce416f335571654f61abf0 (diff)
applied Sanders Makefile patch
-rw-r--r--Makefile46
1 files changed, 20 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index f8c394a4..57cacbb4 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,6 @@ include config.mk
SRC = client.c draw.c event.c main.c tag.c util.c
OBJ = ${SRC:.c=.o}
-MAN1 = dwm.1
-BIN = dwm
all: options dwm
@echo finished
@@ -24,7 +22,7 @@ options:
${OBJ}: dwm.h config.h
config.h:
- @echo missing config.h created
+ @echo creating default $@
@cp config.default.h $@
dwm: ${OBJ}
@@ -32,36 +30,32 @@ dwm: ${OBJ}
@${CC} -o $@ ${OBJ} ${LDFLAGS}
clean:
- rm -f dwm *.o dwm-${VERSION}.tar.gz
+ @echo cleaning
+ @rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
dist: clean
- mkdir -p dwm-${VERSION}
- cp -R Makefile README LICENSE config.mk dwm.h config.*.h \
- ${SRC} ${MAN1} dwm-${VERSION}
- tar -cf dwm-${VERSION}.tar dwm-${VERSION}
- gzip dwm-${VERSION}.tar
- rm -rf dwm-${VERSION}
+ @echo creating dist tarball
+ @mkdir -p dwm-${VERSION}
+ @cp -R LICENSE Makefile README config.*.h config.mk \
+ dwm.1 dwm.h ${SRC} dwm-${VERSION}
+ @tar -cf dwm-${VERSION}.tar dwm-${VERSION}
+ @gzip dwm-${VERSION}.tar
+ @rm -rf dwm-${VERSION}
install: all
+ @echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
- @cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
- @for i in ${BIN}; do \
- chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
- done
- @echo installed executable files to ${DESTDIR}${PREFIX}/bin
+ @cp -f dwm ${DESTDIR}${PREFIX}/bin
+ @chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
+ @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
- @cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
- @for i in ${MAN1}; do \
- chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
- done
- @echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
+ @cp -f dwm.1 ${DESTDIR}${MANPREFIX}/man1
+ @chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
uninstall:
- for i in ${BIN}; do \
- rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
- done
- for i in ${MAN1}; do \
- rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
- done
+ @echo removing executable file from ${DESTDIR}${PREFIX}/bin
+ @rm -f ${DESTDIR}${PREFIX}/bin/dwm
+ @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
+ @rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
.PHONY: all options clean dist install uninstall