Fix the Makefile to work with the install instructions in the README (#259)
* Fix the Makefile to work with the install instructions in the README * Put back DEST_DIR * Add simple ifdef checks to see if the user has set custom dirs via the commandline * Update README to match Makefile
This commit is contained in:
23
Makefile
23
Makefile
@@ -10,13 +10,28 @@ INSTALL_DATA = $(INSTALL) -m 644
|
||||
|
||||
prefix = /usr/local
|
||||
|
||||
# ifdef check allows the user to pass custom dirs
|
||||
# as per the README
|
||||
|
||||
# The directory to install todo.sh in.
|
||||
bindir = $(prefix)/bin
|
||||
ifdef INSTALL_DIR
|
||||
bindir = $(INSTALL_DIR)
|
||||
else
|
||||
bindir = $(prefix)/bin
|
||||
endif
|
||||
|
||||
# The directory to install the config file in.
|
||||
sysconfdir = $(prefix)/etc
|
||||
ifdef CONFIG_DIR
|
||||
sysconfdir = $(CONFIG_DIR)
|
||||
else
|
||||
sysconfdir = $(prefix)/etc
|
||||
endif
|
||||
|
||||
datarootdir = $(prefix)/share
|
||||
ifdef BASH_COMPLETION
|
||||
datarootdir = $(BASH_COMPLETION)
|
||||
else
|
||||
datarootdir = $(prefix)/share
|
||||
endif
|
||||
|
||||
# Dynamically detect/generate version file as necessary
|
||||
# This file will define a variable called VERSION.
|
||||
@@ -85,4 +100,4 @@ test: aggregate-results
|
||||
rm -rf tests/test-results
|
||||
|
||||
# Force tests to get run every time
|
||||
.PHONY: test test-pre-clean aggregate-results $(TESTS)
|
||||
.PHONY: test test-pre-clean aggregate-results $(TESTS)
|
||||
@@ -42,7 +42,7 @@ make test
|
||||
- `BASH_COMPLETION`: PATH for autocompletion scripts (default to /etc/bash_completion.d)
|
||||
|
||||
```shell
|
||||
make install CONFIG_DIR=/etc INSTALL_DIR=/usr/bin BASH_COMPLETION_DIR=/usr/share/bash-completion/completions
|
||||
make install CONFIG_DIR=/etc INSTALL_DIR=/usr/bin BASH_COMPLETION=/usr/share/bash-completion/completions
|
||||
```
|
||||
|
||||
#### Arch Linux (AUR)
|
||||
|
||||
Reference in New Issue
Block a user