Add json to suffix

This commit is contained in:
nolash 2020-12-11 16:09:35 +01:00
parent 6b2a9286b2
commit 1fcef8a213
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -1,22 +1,22 @@
# Author: Louis Holbrook <dev@holbrook.no> 0826EDA1702D1E87C6E2875121D2E7BB88C2A746
# SPDX-License-Identifier: GPL-3.0-or-later
# File-version: 3
# File-version: 4
INPUTS = $(wildcard *.sol)
PREFIX = /usr/local/share/cic/solidity/abi
%.abi: $(wildcard *.sol)
%.abi.json: $(wildcard *.sol)
install -vDm0644 $@ $(PREFIX)/$@
%.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)
all: $(INPUTS)
install: $(wildcard *.abi)
install: $(wildcard *.abi.json)
clean:
rm -vf *.abi
rm -vf *.abi.json
.PHONY: clean install