diff --git a/.gitignore b/.gitignore index 73f74b61..1c3cf10b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,5 @@ tests/trash\ directory.* done.txt report.txt todo.txt +todo.txt_cli-*.tar.gz +todo.txt_cli-*.zip diff --git a/Makefile b/Makefile index 58c1e697..4219bf22 100644 --- a/Makefile +++ b/Makefile @@ -48,38 +48,38 @@ DISTFILES := todo.cfg todo_completion DISTNAME=todo.txt_cli-$(VERSION) dist: $(DISTFILES) todo.sh - mkdir -p $(DISTNAME) - cp -f $(DISTFILES) $(DISTNAME)/ - sed -e 's/@DEV_VERSION@/'$(VERSION)'/' todo.sh > $(DISTNAME)/todo.sh - chmod +x $(DISTNAME)/todo.sh - tar cf $(DISTNAME).tar $(DISTNAME) - gzip -f -9 $(DISTNAME).tar - zip -r -9 $(DISTNAME).zip $(DISTNAME) - rm -r $(DISTNAME) + mkdir -p "$(DISTNAME)" + cp -f $(DISTFILES) "$(DISTNAME)/" + sed -e 's/@DEV_VERSION@/'$(VERSION)'/' todo.sh > "$(DISTNAME)/todo.sh" + chmod +x "$(DISTNAME)/todo.sh" + tar cf $(DISTNAME).tar "$(DISTNAME)" + gzip -f -9 "$(DISTNAME).tar" + zip -r -9 "$(DISTNAME).zip" "$(DISTNAME)" + rm -r "$(DISTNAME)" .PHONY: clean clean: test-pre-clean - rm -f $(DISTNAME).tar.gz $(DISTNAME).zip - rm VERSION-FILE + rm -f "$(DISTNAME).tar.gz" "$(DISTNAME).zip" + rm "VERSION-FILE" install: installdirs - $(INSTALL_PROGRAM) todo.sh $(DESTDIR)$(bindir)/todo.sh - $(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo - [ -e $(DESTDIR)$(sysconfdir)/todo/config ] || \ - sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > $(DESTDIR)$(sysconfdir)/todo/config + $(INSTALL_PROGRAM) todo.sh "$(DESTDIR)$(bindir)/todo.sh" + $(INSTALL_DATA) todo_completion "$(DESTDIR)$(datarootdir)/todo" + [ -e "$(DESTDIR)$(sysconfdir)/todo/config" ] || \ + sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > "$(DESTDIR)$(sysconfdir)/todo/config" uninstall: - rm -f $(DESTDIR)$(bindir)/todo.sh - rm -f $(DESTDIR)$(datarootdir)/todo - rm -f $(DESTDIR)$(sysconfdir)/todo/config + rm -f "$(DESTDIR)$(bindir)/todo.sh" + rm -f "$(DESTDIR)$(datarootdir)/todo" + rm -f "$(DESTDIR)$(sysconfdir)/todo/config" - rmdir $(DESTDIR)$(datarootdir) - rmdir $(DESTDIR)$(sysconfdir)/todo + rmdir "$(DESTDIR)$(datarootdir)" + rmdir "$(DESTDIR)$(sysconfdir)/todo" installdirs: - mkdir -p $(DESTDIR)$(bindir) \ - $(DESTDIR)$(sysconfdir)/todo \ - $(DESTDIR)$(datarootdir) + mkdir -p "$(DESTDIR)$(bindir)" \ + "$(DESTDIR)$(sysconfdir)/todo" \ + "$(DESTDIR)$(datarootdir)" # # Testing @@ -88,7 +88,7 @@ TESTS = $(wildcard tests/t[0-9][0-9][0-9][0-9]-*.sh) #TEST_OPTIONS=--verbose test-pre-clean: - rm -rf tests/test-results "tests/trash directory"* + rm -rf "tests/test-results" "tests/trash directory"* aggregate-results: $(TESTS) @@ -98,7 +98,7 @@ $(TESTS): test-pre-clean test: aggregate-results tests/aggregate-results.sh tests/test-results/t*-* rm -rf tests/test-results - + # Force tests to get run every time .PHONY: test test-pre-clean aggregate-results $(TESTS)