mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 20:13:32 +01:00
build.py: Change usage an project path search
- Change usage (target first) - Add some more sense to find_proj_path()
This commit is contained in:
parent
ed3d466dd4
commit
0b3a1e16f5
1 changed files with 10 additions and 2 deletions
|
|
@ -9,13 +9,21 @@ import fileinput
|
|||
import glob
|
||||
import subprocess
|
||||
from sets import Set
|
||||
import pwd
|
||||
|
||||
all_deps = Set()
|
||||
dep_tree = {}
|
||||
order = []
|
||||
proj_base=pwd.getpwuid(os.getuid()).pw_dir + "/local/src/cvs.stable/proj"
|
||||
search_path=[".", "dspc/src", "dspc/src/dspcd-plugins", "dspc/src/io" ]
|
||||
|
||||
def find_proj_path(name):
|
||||
return "/home/jan/local/src/cvs.stable/proj/" + name
|
||||
name=name.replace("dspider-", "")
|
||||
for sub in search_path:
|
||||
path=proj_base + "/" + sub + "/" + name
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
raise Exception("module " + name + " not found below " + proj_base)
|
||||
|
||||
def read_deps(cur):
|
||||
path = find_proj_path(cur)
|
||||
|
|
@ -70,5 +78,5 @@ def build(module, target):
|
|||
for m in order:
|
||||
run_make(m, target)
|
||||
|
||||
build(sys.argv[1], sys.argv[2])
|
||||
build(sys.argv[2], sys.argv[1])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue