From 3cb9b4c265796f7d561ecbaee7768672abb8f1a5 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Fri, 1 Aug 2014 10:21:17 -0700 Subject: [PATCH] fix(library/Makefile.common): make OSX-compatible --- library/Makefile.common | 11 +++-------- library/extract_deps | 10 ---------- 2 files changed, 3 insertions(+), 18 deletions(-) delete mode 100755 library/extract_deps diff --git a/library/Makefile.common b/library/Makefile.common index 8512a7552..fbcaae6d0 100644 --- a/library/Makefile.common +++ b/library/Makefile.common @@ -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 diff --git a/library/extract_deps b/library/extract_deps deleted file mode 100755 index dc642aad3..000000000 --- a/library/extract_deps +++ /dev/null @@ -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