Skip to content

Commit

Permalink
Wrap quote around make commands
Browse files Browse the repository at this point in the history
  • Loading branch information
karbassi authored Aug 4, 2021
1 parent 4099399 commit 0b6a52a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ tests/trash\ directory.*
done.txt
report.txt
todo.txt
todo.txt_cli-*.tar.gz
todo.txt_cli-*.zip
48 changes: 24 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand All @@ -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)

0 comments on commit 0b6a52a

Please sign in to comment.