Kaynağa Gözat

Improve makefile, made civcc symlink generated

Taddeus Kroes 10 yıl önce
ebeveyn
işleme
c7be3c455e
3 değiştirilmiş dosya ile 9 ekleme ve 3 silme
  1. 1 0
      .gitignore
  2. 8 2
      Makefile
  3. 0 1
      civcc

+ 1 - 0
.gitignore

@@ -2,6 +2,7 @@
 bin/civcc
 bin/civas
 bin/civvm
+civcc
 *.cmo
 *.cmi
 *.cmx

+ 8 - 2
Makefile

@@ -14,6 +14,7 @@ LIBS := str unix
 # Other config
 CIVAS := $(BIN_DIR)/civas
 CIVVM := $(BIN_DIR)/civvm
+CIVCC_LINK := civcc
 
 DIST_TGT := civicaml.tar.gz
 DIST_FILES := $(BIN_DIR) $(SOURCES) Makefile OCamlMakefile README.md test \
@@ -30,7 +31,12 @@ YFLAGS := --infer --explain
 
 .PHONY: all check dist testsuite myclean cleaner toolchain
 
-all: native-code
+all: $(RESULT) $(CIVCC_LINK)
+
+$(RESULT): native-code
+
+$(CIVCC_LINK):
+	ln -sf $(RESULT) $@
 
 # The Types module needs an implementation file to stop ocamlc from complaining
 types.ml: types.mli
@@ -67,7 +73,7 @@ myclean:
 	rm -f a.out $(DIST_TGT) $(TESTSUITE_TGT) $(TOOLCHAIN_TGT)
 
 cleaner: clean
-	rm -rf doc/$(RESULT) $(CIVAS) $(CIVVM)
+	rm -rf doc/$(RESULT) $(CIVAS) $(CIVVM) $(CIVCC_LINK)
 
 toolchain: $(TOOLCHAIN_TGT)
 

+ 0 - 1
civcc

@@ -1 +0,0 @@
-bin/civcc