mirror of https://github.com/YosysHQ/yosys.git
Further improved "make" prettiness
This commit is contained in:
parent
6aa792c864
commit
01dbf12ac9
15
Makefile
15
Makefile
|
@ -106,13 +106,15 @@ LDLIBS += $(patsubst %,$(VERIFIC_DIR)/%/*-linux.a,$(VERIFIC_COMPONENTS))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(PRETTY), 1)
|
ifeq ($(PRETTY), 1)
|
||||||
I = 0
|
P_STATUS = 0
|
||||||
P = @echo "$(eval I=$(shell bash -c 'i=0; for x in $(OBJS) yosys; do ((i++)); [ "$$x" = "$@" -a $I -lt $$i ] && echo $$i && exit; done; echo $I'))[$(shell \
|
P_OFFSET = 0
|
||||||
gawk "BEGIN { N=`echo $(OBJS) yosys | wc -w`; printf \"%3d\", 100*$I/N; exit; }")%] Building $@";
|
P_UPDATE = $(eval P_STATUS=$(shell echo $(OBJS) yosys | gawk 'BEGIN { RS = " "; I = $(P_STATUS)+0; } $$1 == "$@" && NR > I { I = NR; } END { print I; }'))
|
||||||
|
P_SHOW = [$(shell gawk "BEGIN { N=$(words $(OBJS) yosys); printf \"%3d\", $(P_OFFSET)+90*$(P_STATUS)/N; exit; }")%]
|
||||||
|
P = @echo "$(if $(findstring $@,$(TARGETS) $(EXTRA_TARGETS)),$(eval P_OFFSET = 10))$(call P_UPDATE)$(call P_SHOW) Building $@";
|
||||||
Q = @
|
Q = @
|
||||||
S = -s
|
S = -s
|
||||||
else
|
else
|
||||||
I =
|
P_SHOW = ->
|
||||||
P =
|
P =
|
||||||
Q =
|
Q =
|
||||||
S =
|
S =
|
||||||
|
@ -166,6 +168,9 @@ include backends/ilang/Makefile.inc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
top-all: $(TARGETS) $(EXTRA_TARGETS)
|
top-all: $(TARGETS) $(EXTRA_TARGETS)
|
||||||
|
@echo ""
|
||||||
|
@echo " It's a Yosys."
|
||||||
|
@echo ""
|
||||||
|
|
||||||
yosys: $(OBJS)
|
yosys: $(OBJS)
|
||||||
$(P) $(CXX) -o yosys $(LDFLAGS) $(OBJS) $(LDLIBS)
|
$(P) $(CXX) -o yosys $(LDFLAGS) $(OBJS) $(LDLIBS)
|
||||||
|
@ -202,7 +207,7 @@ ifneq ($(ABCREV),default)
|
||||||
fi
|
fi
|
||||||
endif
|
endif
|
||||||
$(Q) rm -f abc/abc-[0-9a-f]*
|
$(Q) rm -f abc/abc-[0-9a-f]*
|
||||||
$(Q) cd abc && $(MAKE) $(S) PROG="abc-$(ABCREV)" MSG_PREFIX="YOSYS-ABC: "
|
$(Q) cd abc && $(MAKE) $(S) PROG="abc-$(ABCREV)" MSG_PREFIX="$(eval P_OFFSET = 5)$(call P_SHOW)$(eval P_OFFSET = 10) ABC: "
|
||||||
|
|
||||||
ifeq ($(ABCREV),default)
|
ifeq ($(ABCREV),default)
|
||||||
.PHONY: abc/abc-$(ABCREV)
|
.PHONY: abc/abc-$(ABCREV)
|
||||||
|
|
Loading…
Reference in New Issue