ソースを参照

Improved error handling for undefined platform

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7765 8c9fc860-2736-0410-a75d-ab315db34111
negelef 7 年 前
コミット
fbd45a1530
1 ファイル変更6 行追加2 行削除
  1. 6 2
      tools/builds/a2/makefile

+ 6 - 2
tools/builds/a2/makefile

@@ -1,6 +1,6 @@
 all: oberon
 
-.PHONY: all compiler execution compilation execution builds clean
+.PHONY: all compiler execution compilation execution builds build clean
 MAKEFLAGS += --no-builtin-rules --no-builtin-variables
 .SUFFIXES: # delete the default suffixes
 
@@ -48,13 +48,17 @@ builds:
 
 ifdef platform
 
-.PHONY: build
 build: $(if $(filter $(platforms), $(platform)), $(platform), $(error invalid platform))
 
 $(platform): oberon source/Release.Tool $(addprefix source/, $(shell env AOSPATH=source ./original Release.Build --list $(platform) | tr -d '\r' | grep "^[^ ]\+\.Mod\s" | tr -d ' '))
 	@rm -rf $@ && mkdir $@
 	@env AOSPATH=source ./oberon Release.Build --path=$@/ --build $(platform) || (rm -rf $@ && false)
 
+else
+
+build:
+	$(error undefined platform)
+
 endif
 
 # utilities