From 14472b20eb23eeb99b2142248efb07daceade992 Mon Sep 17 00:00:00 2001 From: Soonho Kong Date: Tue, 7 Oct 2014 11:53:09 -0700 Subject: [PATCH] fix(bin/linja): add 'all' to phony target; allow multiple phony targets --- bin/linja | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bin/linja b/bin/linja index a54a300c1..3f0edb12e 100755 --- a/bin/linja +++ b/bin/linja @@ -31,7 +31,7 @@ if platform.system() == "Windows": # behavior to subprocesses. if "MSYSTEM" in os.environ: del os.environ["MSYSTEM"] - + if platform.system().startswith("MSYS"): # In MSYS platform, realpath has a strange behavior. # os.path.realpath("c:\a\b\c") => \:\a\b\c @@ -39,7 +39,7 @@ if platform.system().startswith("MSYS"): else: g_linja_path = os.path.abspath(os.path.realpath(__file__)) g_lean_bin_dir = os.path.dirname(g_linja_path) -g_phony_targets = ["clean", "tags", "clear-cache"] +g_phony_targets = ["all", "clean", "tags", "clear-cache"] g_project_filename = ".project" g_lean_path = "USE DEFAULT" # System will search automatically g_ltags_path = "USE DEFAULT" # System will search automatically @@ -57,7 +57,7 @@ def init_logger(): g_logger.addHandler(streamHandler) if g_debug_mode == True: fileHandler = logging.FileHandler('./linja.log') - fileHandler.setFormatter(formatter) + fileHandler.setFormatter(formatter) g_logger.addHandler(fileHandler) def log(msg): @@ -236,8 +236,6 @@ def process_args(args): error("cache argument has to be ends with .lean") args.cache = args.cache[:-4] + "clean" args.phony_targets = list(set(g_phony_targets) & set(args.targets)) - if len(args.phony_targets) > 1: - error("Please provide at most one phony target: " + str(args.phony_targets)) if args.verbose: g_logger.setLevel(logging.INFO) return args