Add json to suffix
This commit is contained in:
parent
6b2a9286b2
commit
1fcef8a213
10
Makefile
10
Makefile
@ -1,22 +1,22 @@
|
|||||||
# Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
# Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
# File-version: 3
|
# File-version: 4
|
||||||
|
|
||||||
INPUTS = $(wildcard *.sol)
|
INPUTS = $(wildcard *.sol)
|
||||||
PREFIX = /usr/local/share/cic/solidity/abi
|
PREFIX = /usr/local/share/cic/solidity/abi
|
||||||
|
|
||||||
%.abi: $(wildcard *.sol)
|
%.abi.json: $(wildcard *.sol)
|
||||||
install -vDm0644 $@ $(PREFIX)/$@
|
install -vDm0644 $@ $(PREFIX)/$@
|
||||||
|
|
||||||
%.sol:
|
%.sol:
|
||||||
solc $@ --abi | awk 'NR>3' > $(basename $@).abi
|
solc $@ --abi | awk 'NR>3' > $(basename $@).abi.json
|
||||||
|
|
||||||
# TODO: improve, does not detect changes in sol files (I suck at writing makefiles)
|
# TODO: improve, does not detect changes in sol files (I suck at writing makefiles)
|
||||||
all: $(INPUTS)
|
all: $(INPUTS)
|
||||||
|
|
||||||
install: $(wildcard *.abi)
|
install: $(wildcard *.abi.json)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -vf *.abi
|
rm -vf *.abi.json
|
||||||
|
|
||||||
.PHONY: clean install
|
.PHONY: clean install
|
||||||
|
Loading…
Reference in New Issue
Block a user