fix(library/Makefile.common): make OSX-compatible
This commit is contained in:
parent
d27c85e30c
commit
3cb9b4c265
2 changed files with 3 additions and 18 deletions
|
@ -2,7 +2,6 @@ TOP := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||||
LEAN_FILES = $(shell find . -type f -name '*.lean')
|
LEAN_FILES = $(shell find . -type f -name '*.lean')
|
||||||
OLEAN_FILES = $(LEAN_FILES:.lean=.olean)
|
OLEAN_FILES = $(LEAN_FILES:.lean=.olean)
|
||||||
DEP_FILES = $(LEAN_FILES:.lean=.d)
|
DEP_FILES = $(LEAN_FILES:.lean=.d)
|
||||||
SED = sed
|
|
||||||
|
|
||||||
all: $(OLEAN_FILES) $(DEP_FILES)
|
all: $(OLEAN_FILES) $(DEP_FILES)
|
||||||
|
|
||||||
|
@ -14,16 +13,12 @@ all: $(OLEAN_FILES) $(DEP_FILES)
|
||||||
|
|
||||||
%.d: %.lean
|
%.d: %.lean
|
||||||
@echo Making dependency file \'$@\' ...
|
@echo Making dependency file \'$@\' ...
|
||||||
@echo -n "$(basename $@).olean : $< $@ " > $@.tmp.1
|
@printf "$(basename $@).olean : $< $@ " > $@
|
||||||
@$(LEAN) --deps $< | $(SED) -e ':a;N;$$!ba;s/\n/ /g' > $@.tmp.2
|
@$(LEAN) --deps $< | tr "\n" " " >> $@
|
||||||
@cat $@.tmp.1 $@.tmp.2 > $@
|
|
||||||
@rm -f $@.tmp.1
|
|
||||||
@rm -f $@.tmp.2
|
|
||||||
|
|
||||||
-include $(LEAN_FILES:.lean=.d)
|
-include $(LEAN_FILES:.lean=.d)
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.olean *.d *.d.tmp.1 $.d.tmp.2
|
rm -f *.olean *.d
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
for LEANFILE in $@; do
|
|
||||||
OLEANFILE=${LEANFILE//.lean/.olean}
|
|
||||||
DEPS=`$LEAN --deps $LEANFILE | cut -d ' ' -f 2- | tr "\n" " "`
|
|
||||||
echo -n "$OLEANFILE:"
|
|
||||||
for DEP in $DEPS; do
|
|
||||||
echo -n " ${DEP}"
|
|
||||||
done
|
|
||||||
echo ""
|
|
||||||
done
|
|
Loading…
Reference in a new issue