Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor makefile improvements #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 18 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
PREFIX = ${HOME}/.blodwen
INSTALL ?= install
MKDIR ?= $(INSTALL) -d
DESTDIR ?=
PREFIX ?= ${HOME}/.blodwen
BINDIR ?= $(PREFIX)/bin

export BLODWEN_PATH = ${CURDIR}/prelude/build:${CURDIR}/base/build
export BLODWEN_DATA = ${CURDIR}/support

.PHONY: ttimp blodwen prelude test base clean lib_clean

all: ttimp blodwen prelude base test
all: ttimp blodwen prelude base

ttimp:
idris --build ttimp.ipkg
Expand All @@ -15,7 +20,7 @@ blodwen: src/BlodwenPaths.idr
src/BlodwenPaths.idr:
echo 'module BlodwenPaths; export bprefix : String; bprefix = "${PREFIX}"' > src/BlodwenPaths.idr

prelude:
prelude: blodwen
make -C prelude BLODWEN=../blodwen

base: prelude
Expand All @@ -34,19 +39,17 @@ lib_clean:
make -C prelude clean
make -C base clean

test:
test: base
idris --build test.ipkg
make -C tests

install:
mkdir -p ${PREFIX}/bin
mkdir -p ${PREFIX}/blodwen/support/chez
mkdir -p ${PREFIX}/blodwen/support/chicken
mkdir -p ${PREFIX}/blodwen/support/racket
make -C prelude install BLODWEN=../blodwen
make -C base install BLODWEN=../blodwen

install blodwen ${PREFIX}/bin
install support/chez/* ${PREFIX}/blodwen/support/chez
install support/chicken/* ${PREFIX}/blodwen/support/chicken
install support/racket/* ${PREFIX}/blodwen/support/racket
$(MKDIR) ${DESTDIR}${BINDIR}
$(MKDIR) ${DESTDIR}${PREFIX}/blodwen/support/chez
$(MKDIR) ${DESTDIR}${PREFIX}/blodwen/support/chicken
$(MKDIR) ${DESTDIR}${PREFIX}/blodwen/support/racket

$(INSTALL) blodwen ${DESTDIR}${BINDIR}
$(INSTALL) support/chez/* ${DESTDIR}${PREFIX}/blodwen/support/chez
$(INSTALL) support/chicken/* ${DESTDIR}${PREFIX}/blodwen/support/chicken
$(INSTALL) support/racket/* ${DESTDIR}${PREFIX}/blodwen/support/racket
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Installation

To build and install what exists of it so far:

+ Optionally, set the `PREFIX` in `Makefile`
+ Optionally, set or override the `PREFIX` in `Makefile`
+ `make all`
+ This builds the main executable `blodwen`, and a minimal dependently
typed language with implicit syntax, `ttimp`. Most likely you'll only
Expand Down