add .PHONY in Makefile

This commit is contained in:
Sebastian Ramacher 2011-04-18 11:31:57 +02:00
parent aac703778f
commit a98f69c3f3
5 changed files with 16 additions and 6 deletions

View file

@ -8,7 +8,7 @@ OBJECTS = $(patsubst %.c, %.o, $(SOURCE))
DOBJECTS = $(patsubst %.c, %.do, $(SOURCE))
all: options ${PROJECT}
make -C ft
${MAKE} -C ft
options:
@echo ${PROJECT} build options:
@ -35,14 +35,14 @@ ${PROJECT}: ${OBJECTS}
clean:
@rm -rf ${PROJECT} ${OBJECTS} ${PROJECT}-${VERSION}.tar.gz \
${DOBJECTS} ${PROJECT}-debug
make -C ft clean
@${MAKE} -C ft clean
${PROJECT}-debug: ${DOBJECTS}
@echo CC -o ${PROJECT}-debug
@${CC} ${LDFLAGS} -o ${PROJECT}-debug ${DOBJECTS} ${LIBS}
debug: ${PROJECT}-debug
make -C ft debug
@${MAKE} -C ft debug
valgrind: debug
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes \
@ -52,7 +52,7 @@ gdb: debug
cgdb ${PROJECT}-debug
dist: clean
@mkdir -p ${PROJECT}-${VERSION}
@${MAKE} -p ${PROJECT}-${VERSION}
@cp -R LICENSE Makefile config.mk README \
${PROJECT}.1 ${SOURCE} ${PROJECT}-${VERSION}
@tar -cf ${PROJECT}-${VERSION}.tar ${PROJECT}-${VERSION}
@ -68,11 +68,13 @@ install: all
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < ${PROJECT}.1 > ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
@make -C ft install
@${MAKE} -C ft install
uninstall:
@echo removing executable file
@rm -f ${DESTDIR}${PREFIX}/bin/${PROJECT}
@echo removing manual page
@rm -f ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
@make -C ft uninstall
@${MAKE} -C ft uninstall
.PHONY: all options clean debug valgrind gdb dist install uninstall

View file

@ -16,3 +16,5 @@ install:
uninstall:
@for dir in ${SUBDIRS}; do ${MAKE} -C $${dir} uninstall; done
.PHONY: all debug clean install uninstall

View file

@ -49,3 +49,5 @@ uninstall:
@echo uninstalling ${PLUGIN} plugin
@rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so
@rm -rf ${DESTDIR}${PREFIX}/lib/zathura
.PHONY: all options clean debug install uninstall

View file

@ -49,3 +49,5 @@ uninstall:
@echo uninstalling ${PLUGIN} plugin
@rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so
@rm -rf ${DESTDIR}${PREFIX}/lib/zathura
.PHONY: all options clean debug install uninstall

View file

@ -49,3 +49,5 @@ uninstall:
@echo uninstalling ${PLUGIN} plugin
@rm -f ${DESTDIR}${PREFIX}/lib/zathura/${PLUGIN}.so
@rm -rf ${DESTDIR}${PREFIX}/lib/zathura
.PHONY: all options clean debug install uninstall