Skip to content

Commit a90e524

Browse files
Merge pull request #1101 from Parrot7483/makefile-improvement
Makefile improvement
2 parents 6605ad3 + eed238b commit a90e524

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

fstar-helpers/Makefile.generic

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ endef
100100
export FINDLIBS
101101

102102
FSTAR_INCLUDE_DIRS_EXTRA ?=
103-
FINDLIBS_OUTPUT := $(shell bash -c '${FINDLIBS}')
103+
FINDLIBS_OUTPUT ?= $(shell bash -c '${FINDLIBS}')
104104
FSTAR_INCLUDE_DIRS = $(FSTAR_INCLUDE_DIRS_EXTRA) $(FINDLIBS_OUTPUT)
105105

106106
# Make sure FSTAR_INCLUDE_DIRS has the `proof-libs`, print hints and
@@ -128,10 +128,16 @@ all-keep-going:
128128
$(Q)rm -f .depend
129129
$(Q)$(MAKE) --keep-going .depend hax.fst.config.json verify
130130

131-
# If no any F* file is detected, we run hax
131+
# Only run code extraction for build targets, not for 'clean'.
132+
all all-keep-going:
132133
ifeq "$(wildcard *.fst *fsti)" ""
133-
$(shell cargo hax into fstar)
134+
$(shell cargo hax into fstar)
134135
endif
136+
$(Q)rm -f .depend
137+
all:
138+
$(Q)$(MAKE) .depend hax.fst.config.json verify
139+
all-keep-going:
140+
$(Q)$(MAKE) --keep-going .depend hax.fst.config.json verify
135141

136142
# By default, we process all the files in the current directory
137143
ROOTS ?= $(wildcard *.fst *fsti)
@@ -257,9 +263,11 @@ vscode:
257263
$(Q)rm -f .depend
258264
$(Q)$(MAKE) hax.fst.config.json
259265

266+
267+
.PHONY: clean
260268
SHELL=bash
261269

262270
# Clean target
263271
clean:
264272
rm -rf $(CACHE_DIR)/*
265-
rm *.fst
273+
rm -f *.fst *.fsti *.hints *.smt2

0 commit comments

Comments
 (0)