Skip to content
This repository
Browse code

Add Makefile for easy installation

  • Loading branch information...
commit 0782f0b2876646db36b772a058b20960775a7c91 1 parent d36b1e9
Yu-Jie Lin authored

Showing 3 changed files with 44 additions and 1 deletion. Show diff stats Hide diff stats

  1. +4 0 CHANGES.mkd
  2. +22 0 Makefile
  3. +18 1 README.mkd
4 CHANGES.mkd
Source Rendered
... ... @@ -1,6 +1,10 @@
1 1 Changelog
2 2 =========
3 3
  4 +## Version 1.0.2 (2012-04-21T17:14:23Z)
  5 +
  6 + * Add Makefile for easy installation
  7 +
4 8 ## Version 1.0.1 (2012-01-18T20:42:10Z)
5 9
6 10 * Make test script print out the testing parameters, such as -P, -p, etc.
22 Makefile
... ... @@ -0,0 +1,22 @@
  1 +PREFIX=/usr/local
  2 +DESTDIR=
  3 +
  4 +INSTDIR=$(DESTDIR)$(PREFIX)
  5 +INSTBIN=$(INSTDIR)/bin
  6 +
  7 +all:
  8 + @echo do nothing. try targets: install, uninstall, or test.
  9 +
  10 +install:
  11 + test -d $(INSTDIR) || mkdir -p $(INSTDIR)
  12 + test -d $(INSTBIN) || mkdir -p $(INSTBIN)
  13 +
  14 + install -m 0755 td.sh $(INSTBIN)
  15 +
  16 +uninstall:
  17 + rm -f $(INSTBIN)/td.sh
  18 +
  19 +test:
  20 + ./td-test.sh
  21 +
  22 +.PHONY: all install uninstall test
19 README.mkd
Source Rendered
@@ -3,6 +3,23 @@ td.sh
3 3
4 4 Converting seconds to human readable time duration.
5 5
  6 +Installation
  7 +------------
  8 +
  9 +By default, to install to `/usr/local`, run:
  10 +
  11 + $ make install
  12 +
  13 +Or to `/usr`:
  14 +
  15 + $ make install PREFIX=/usr
  16 +
  17 +Or to your home:
  18 +
  19 + $ make install PREFIX=$HOME
  20 +
  21 +To uninstall, use `uninstall` target with `PREFIX` if supplied during installation.
  22 +
6 23 Usage
7 24 -----
8 25
@@ -45,7 +62,7 @@ You can source the script to have `print_td` function for better performance:
45 62 Tests
46 63 -----
47 64
48   -There is a script named `td-test.sh` for testing.
  65 +There is a script named `td-test.sh` for testing, you can also run `make test`.
49 66
50 67 Links
51 68 -----

0 comments on commit 0782f0b

Please sign in to comment.
Something went wrong with that request. Please try again.