Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Bug 777379 - Add support for .DEFAULT_GOAL. r=ted
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Aug 6, 2012
1 parent 127c20c commit d371240
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pymake/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1542,6 +1542,10 @@ def finishparsing(self):
if len(np.rules):
self.context = process.getcontext(1)

flavor, source, value = self.variables.get('.DEFAULT_GOAL')
if value is not None:
self.defaulttarget = value.resolvestr(self, self.variables, ['.DEFAULT_GOAL']).strip()

self.error = False

def include(self, path, required=True, weak=False, loc=None):
Expand Down
7 changes: 7 additions & 0 deletions tests/default-goal.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
not-default:
@echo TEST-FAIL

default:
@echo TEST-PASS

.DEFAULT_GOAL := default

0 comments on commit d371240

Please sign in to comment.