-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Makefile, README: installation instructions as in the Makefile
- Loading branch information
Showing
2 changed files
with
37 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# pipefail is not POSIX complaint | ||
|
||
# Export these variables for all commands in this Makefile | ||
# the 'export' seems not to be necessary | ||
$(eval isGuix := $(shell command -v guix > /dev/null 2>&1 && echo t || echo f)) | ||
$(eval destDir := $(shell [ "${isGuix}" = t ] && echo $${dotf}/bin || echo ~/bin)) | ||
|
||
all: show-environment clean install-deps | ||
[ ! -d ${destDir} ] && mkdir ${destDir} || : | ||
raco exe -o ${destDir}/search-notes main.rkt | ||
[ "${isGuix}" = t ] && gxhre --cores=${cores} || : | ||
|
||
@# both can be used: ${...} also $(...) | ||
@# commands must be terminated by '; \' | ||
@# @if [ "$(isGuix)" = t ]; then \ | ||
# @# echo '# => $$isGuix: ${isGuix}; true branch'; \ | ||
# else \ | ||
# @# echo '# => $$isGuix: ${isGuix}; false branch'; \ | ||
# : ; \ | ||
# fi | ||
|
||
show-environment: | ||
@echo '### => $$isGuix: ${isGuix}' | ||
@echo '### => $$destDir: ${destDir}' | ||
|
||
install-deps: | ||
@# without --skip-installed the this target fails. | ||
raco pkg install --skip-installed --auto ansi-color | ||
|
||
clean: | ||
rm -rf ./compiled/ ./scribblings/compiled/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters