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')
|
||||
OLEAN_FILES = $(LEAN_FILES:.lean=.olean)
|
||||
DEP_FILES = $(LEAN_FILES:.lean=.d)
|
||||
SED = sed
|
||||
|
||||
all: $(OLEAN_FILES) $(DEP_FILES)
|
||||
|
||||
|
@ -14,16 +13,12 @@ all: $(OLEAN_FILES) $(DEP_FILES)
|
|||
|
||||
%.d: %.lean
|
||||
@echo Making dependency file \'$@\' ...
|
||||
@echo -n "$(basename $@).olean : $< $@ " > $@.tmp.1
|
||||
@$(LEAN) --deps $< | $(SED) -e ':a;N;$$!ba;s/\n/ /g' > $@.tmp.2
|
||||
@cat $@.tmp.1 $@.tmp.2 > $@
|
||||
@rm -f $@.tmp.1
|
||||
@rm -f $@.tmp.2
|
||||
@printf "$(basename $@).olean : $< $@ " > $@
|
||||
@$(LEAN) --deps $< | tr "\n" " " >> $@
|
||||
|
||||
-include $(LEAN_FILES:.lean=.d)
|
||||
|
||||
.PHONY: all 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