diff options
| author | Palmer Dabbelt | 2015-10-08 12:14:36 -0700 |
|---|---|---|
| committer | Palmer Dabbelt | 2015-10-08 12:14:36 -0700 |
| commit | 87c58ab4a0753d8dccb8ebb9210a0c1fde7da7b1 (patch) | |
| tree | 03114c0325c7f783b2d6160f2ebb25681da0c2d8 | |
| parent | 4183c648b719eac9da26e2d9d34fa852ebdbfd20 (diff) | |
Install Stanza as a dependency of anything that uses it
This way I don't have to type "make install-linux" whenever a new
Stanza zip drops.
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 37 | ||||
| -rw-r--r-- | README.md | 4 |
3 files changed, 23 insertions, 19 deletions
@@ -23,6 +23,7 @@ src/lib/stanza src/*/__MACOSX src/main/stanza/firrtl-main utils/bin/firrtl +utils/bin/stanza spec/spec.aux spec/spec.log spec/spec.toc @@ -1,32 +1,37 @@ -# Installs stanza into /usr/local/bin -# TODO Talk to Patrick to fill this in - root_dir ?= $(PWD) test_dir ?= $(root_dir)/test regress_dir ?= $(root_dir)/regress firrtl_dir ?= $(root_dir)/src/main/stanza +install_dir ?= $(root_dir)/utils/bin + +stanza ?= $(install_dir)/stanza all-noise: ${MAKE} all || ${MAKE} fail all: done -install-linux: - cd src/lib && unzip stanza-linux.zip - cd src/lib/stanza && sudo ./stanza -platform linux -install /usr/local/bin/stanza +# Installs Stanza into $(insall_dir) +stanza_zip_name = $(subst Darwin,mac,$(subst Linux,linux,$(shell uname))) +stanza_target_name = $(subst Darwin,os-x,$(subst Linux,linux,$(shell uname))) + +$(root_dir)/src/lib/stanza/stamp: src/lib/stanza-$(stanza_zip_name).zip + rm -rf src/lib/stanza + mkdir -p src/lib + cd src/lib && unzip stanza-$(stanza_zip_name).zip + touch $@ -install-mac: - cd src/lib && unzip stanza-mac.zip - cd src/lib/stanza && sudo ./stanza -platform os-x -install /usr/local/bin/stanza +$(stanza): $(root_dir)/src/lib/stanza/stamp + cd src/lib/stanza && ./stanza -platform $(stanza_target_name) -install $(stanza) -build-deploy: - cd $(firrtl_dir) && stanza -i firrtl-main.stanza -o $(root_dir)/utils/bin/firrtl +build-deploy: $(stanza) + cd $(firrtl_dir) && $(stanza) -i firrtl-main.stanza -o $(root_dir)/utils/bin/firrtl -build: - cd $(firrtl_dir) && stanza -i firrtl-test-main.stanza -o $(root_dir)/utils/bin/firrtl +build: $(stanza) + cd $(firrtl_dir) && $(stanza) -i firrtl-test-main.stanza -o $(root_dir)/utils/bin/firrtl -build-fast: - cd $(firrtl_dir) && stanza -i firrtl-test-main.stanza -o $(root_dir)/utils/bin/firrtl -flags OPTIMIZE +build-fast: $(stanza) + cd $(firrtl_dir) && $(stanza) -i firrtl-test-main.stanza -o $(root_dir)/utils/bin/firrtl -flags OPTIMIZE check: cd $(test_dir) && lit -v . --path=$(root_dir)/utils/bin/ @@ -49,6 +54,8 @@ custom: clean: rm -f $(test_dir)/*/*/*.out rm -f $(test_dir)/*/*.out + rm -rf src/lib/stanza + rm -f $(stanza) riscv: cd $(test_dir)/riscv-mini && lit -v . --path=$(root_dir)/utils/bin/ @@ -16,8 +16,6 @@ ##### For Linux: 1. Clone the repository: `git clone https://github.com/ucb-bar/firrtl` - 1. Install Stanza: - `make install-linux` 1. Install lit (you need to have pip installed first): `pip install lit` 1. Build firrtl: @@ -36,8 +34,6 @@ ##### For Mac: 1. Clone the repository: `git clone https://github.com/ucb-bar/firrtl` - 1. Install Stanza: - `make install-mac` 1. Install lit (you need to have pip installed first): `pip install lit` 1. Build firrtl: |
