aewl

changeset 180:6d2bc1d3a00d

applied Sanders Makefile patch
author arg@10ksloc.org
date Thu, 03 Aug 2006 13:50:37 +0200
parents 621222b67c3b
children 03cb4cc41818
files Makefile
diffstat 1 files changed, 20 insertions(+), 26 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Thu Aug 03 12:21:00 2006 +0200
     1.2 +++ b/Makefile	Thu Aug 03 13:50:37 2006 +0200
     1.3 @@ -5,8 +5,6 @@
     1.4  
     1.5  SRC = client.c draw.c event.c main.c tag.c util.c
     1.6  OBJ = ${SRC:.c=.o}
     1.7 -MAN1 = dwm.1 
     1.8 -BIN = dwm
     1.9  
    1.10  all: options dwm
    1.11  	@echo finished
    1.12 @@ -24,7 +22,7 @@
    1.13  ${OBJ}: dwm.h config.h
    1.14  
    1.15  config.h:
    1.16 -	@echo missing config.h created
    1.17 +	@echo creating default $@
    1.18  	@cp config.default.h $@
    1.19  
    1.20  dwm: ${OBJ}
    1.21 @@ -32,36 +30,32 @@
    1.22  	@${CC} -o $@ ${OBJ} ${LDFLAGS}
    1.23  
    1.24  clean:
    1.25 -	rm -f dwm *.o dwm-${VERSION}.tar.gz
    1.26 +	@echo cleaning
    1.27 +	@rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz
    1.28  
    1.29  dist: clean
    1.30 -	mkdir -p dwm-${VERSION}
    1.31 -	cp -R Makefile README LICENSE config.mk dwm.h config.*.h \
    1.32 -		${SRC} ${MAN1} dwm-${VERSION}
    1.33 -	tar -cf dwm-${VERSION}.tar dwm-${VERSION}
    1.34 -	gzip dwm-${VERSION}.tar
    1.35 -	rm -rf dwm-${VERSION}
    1.36 +	@echo creating dist tarball
    1.37 +	@mkdir -p dwm-${VERSION}
    1.38 +	@cp -R LICENSE Makefile README config.*.h config.mk \
    1.39 +		dwm.1 dwm.h ${SRC} dwm-${VERSION}
    1.40 +	@tar -cf dwm-${VERSION}.tar dwm-${VERSION}
    1.41 +	@gzip dwm-${VERSION}.tar
    1.42 +	@rm -rf dwm-${VERSION}
    1.43  
    1.44  install: all
    1.45 +	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
    1.46  	@mkdir -p ${DESTDIR}${PREFIX}/bin
    1.47 -	@cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
    1.48 -	@for i in ${BIN}; do \
    1.49 -		chmod 755 ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
    1.50 -	done
    1.51 -	@echo installed executable files to ${DESTDIR}${PREFIX}/bin
    1.52 +	@cp -f dwm ${DESTDIR}${PREFIX}/bin
    1.53 +	@chmod 755 ${DESTDIR}${PREFIX}/bin/dwm
    1.54 +	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
    1.55  	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
    1.56 -	@cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
    1.57 -	@for i in ${MAN1}; do \
    1.58 -		chmod 444 ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
    1.59 -	done
    1.60 -	@echo installed manual pages to ${DESTDIR}${MANPREFIX}/man1
    1.61 +	@cp -f dwm.1 ${DESTDIR}${MANPREFIX}/man1
    1.62 +	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1
    1.63  
    1.64  uninstall:
    1.65 -	for i in ${BIN}; do \
    1.66 -		rm -f ${DESTDIR}${PREFIX}/bin/`basename $$i`; \
    1.67 -	done
    1.68 -	for i in ${MAN1}; do \
    1.69 -		rm -f ${DESTDIR}${MANPREFIX}/man1/`basename $$i`; \
    1.70 -	done
    1.71 +	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
    1.72 +	@rm -f ${DESTDIR}${PREFIX}/bin/dwm
    1.73 +	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
    1.74 +	@rm -f ${DESTDIR}${MANPREFIX}/man1/dwm.1
    1.75  
    1.76  .PHONY: all options clean dist install uninstall