@@ -10,6 +10,12 @@ INSTALL_DATA = $(INSTALL) -m 644
1010
1111prefix = /usr/local
1212
13+ ifeq ($(OS ) , Windows_NT)
14+ ZIP_PROGRAM=7z a -r
15+ else
16+ ZIP_PROGRAM=zip -r -9
17+ endif
18+
1319# ifdef check allows the user to pass custom dirs
1420# as per the README
1521
@@ -54,7 +60,7 @@ dist: $(DISTFILES) todo.sh
5460 chmod +x " $( DISTNAME) /todo.sh"
5561 tar cf $(DISTNAME ) .tar " $( DISTNAME) "
5662 gzip -f -9 " $( DISTNAME) .tar"
57- zip -r -9 " $( DISTNAME) .zip" " $( DISTNAME) "
63+ $( ZIP_PROGRAM ) " $( DISTNAME) .zip" " $( DISTNAME) "
5864 rm -r " $( DISTNAME) "
5965
6066.PHONY : clean
@@ -66,7 +72,7 @@ install: installdirs
6672 $(INSTALL_PROGRAM ) todo.sh " $( DESTDIR) $( bindir) /todo.sh"
6773 $(INSTALL_DATA ) todo_completion " $( DESTDIR) $( datarootdir) /todo"
6874 [ -e " $( DESTDIR) $( sysconfdir) /todo/config" ] || \
69- sed " s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > " $( DESTDIR) $( sysconfdir) /todo/config"
75+ sed " s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > " $( DESTDIR) $( sysconfdir) /todo/config"
7076
7177uninstall :
7278 rm -f " $( DESTDIR) $( bindir) /todo.sh"
@@ -78,8 +84,8 @@ uninstall:
7884
7985installdirs :
8086 mkdir -p " $( DESTDIR) $( bindir) " \
81- " $( DESTDIR) $( sysconfdir) /todo" \
82- " $( DESTDIR) $( datarootdir) "
87+ " $( DESTDIR) $( sysconfdir) /todo" \
88+ " $( DESTDIR) $( datarootdir) "
8389
8490#
8591# Testing
0 commit comments