aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile23
-rw-r--r--README.md4
2 files changed, 17 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 2b44f75..72b36b4 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ VERSION = 0.1
4 4
5PREFIX = /usr/local 5PREFIX = /usr/local
6MANPREFIX = ${PREFIX}/share/man 6MANPREFIX = ${PREFIX}/share/man
7SDEPDATA = ${XDG_DATA_HOME}/sdep 7SDEPDATA = ${HOME}/.local/share/sdep
8SCRIPTS = sdep-add sdep-checknow sdep-clear sdep-edit sdep-list 8SCRIPTS = sdep-add sdep-checknow sdep-clear sdep-edit sdep-list
9 9
10CPPFLAGS = -D_XOPEN_SOURCE=700 -DVERSION=\"${VERSION}\" 10CPPFLAGS = -D_XOPEN_SOURCE=700 -DVERSION=\"${VERSION}\"
@@ -21,10 +21,10 @@ options:
21 @echo "CC = ${CC}" 21 @echo "CC = ${CC}"
22 22
23sdep: 23sdep:
24 ${CC} ${CFLAGS} -o sdep sdep.c 24 ${CC} ${CFLAGS} -o sdep.o sdep.c
25 25
26clean: 26clean:
27 rm -f sdep sdep-${VERSION}.tar.gz 27 rm -rf sdep.o sdep-${VERSION}.tar.gz scripts-build
28 28
29dist: clean 29dist: clean
30 mkdir -p sdep-${VERSION} 30 mkdir -p sdep-${VERSION}
@@ -35,17 +35,24 @@ dist: clean
35 35
36install: all 36install: all
37 mkdir -p ${DESTDIR}${PREFIX}/bin 37 mkdir -p ${DESTDIR}${PREFIX}/bin
38 cp -f sdep ${DESTDIR}${PREFIX}/bin 38 cp -f sdep.o ${DESTDIR}${PREFIX}/bin/sdep
39 chmod 755 ${DESTDIR}${PREFIX}/bin/sdep 39 chmod 755 ${DESTDIR}${PREFIX}/bin/sdep
40 mkdir -p ${DESTDIR}${MANPREFIX}/man1 40 mkdir -p ${DESTDIR}${MANPREFIX}/man1
41 sed "s/VERSION/${VERSION}/g" < sdep.1 > ${DESTDIR}${MANPREFIX}/man1/sdep.1 41 sed "s/VERSION/${VERSION}/g" < sdep.1 \
42 > ${DESTDIR}${MANPREFIX}/man1/sdep.1
42 chmod 644 ${DESTDIR}${MANPREFIX}/man1/sdep.1 43 chmod 644 ${DESTDIR}${MANPREFIX}/man1/sdep.1
43 44
44scripts: 45scripts:
45 mkdir -p ${DESTDIR}${SDEPDATA} 46 mkdir -p scripts-build
47 mkdir -p ${SDEPDATA}
46 for s in ${SCRIPTS}; do\ 48 for s in ${SCRIPTS}; do\
47 sed "s|SDEPDATA|${DESTDIR}${SDEPDATA}|g" < scripts/$$s \ 49 sed "s|SDEPDATA|${SDEPDATA}|g" < scripts/$$s \
48 > ${DESTDIR}${PREFIX}/bin/$$s ;\ 50 > scripts-build/$$s ;\
51 done
52
53scriptsinstall:
54 for s in ${SCRIPTS}; do\
55 cp -f scripts-build/$$s ${DESTDIR}${PREFIX}/bin ; \
49 chmod 755 ${DESTDIR}${PREFIX}/bin/$$s ;\ 56 chmod 755 ${DESTDIR}${PREFIX}/bin/$$s ;\
50 done 57 done
51 58
diff --git a/README.md b/README.md
index a511256..43016d7 100644
--- a/README.md
+++ b/README.md
@@ -88,8 +88,8 @@ between multiple devices using something like
88The `scripts` folder contains the few scripts that I use. They are basically 88The `scripts` folder contains the few scripts that I use. They are basically
89just a more elaborate version of the calendar system described above, 89just a more elaborate version of the calendar system described above,
90with support for recurring events (e.g. weekly, daily). You can install them 90with support for recurring events (e.g. weekly, daily). You can install them
91with `make scripts`, but first make sure to adjust them to match your local 91with `make scripts` and then `make scriptsinstall`, but first make sure to
92configuration. 92adjust them to match your local configuration.
93For example check that the folder SDEPDATA in Makefile suits you. 93For example check that the folder SDEPDATA in Makefile suits you.
94 94
95Most of the scripts rely on the `-d` option of the GNU date utility, so you 95Most of the scripts rely on the `-d` option of the GNU date utility, so you

Generated with cgit - Back to sebastiano.tronto.net