mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-25 23:13:54 +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 glob
|
||||||
import subprocess
|
import subprocess
|
||||||
from sets import Set
|
from sets import Set
|
||||||
|
import pwd
|
||||||
|
|
||||||
all_deps = Set()
|
all_deps = Set()
|
||||||
dep_tree = {}
|
dep_tree = {}
|
||||||
order = []
|
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):
|
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):
|
def read_deps(cur):
|
||||||
path = find_proj_path(cur)
|
path = find_proj_path(cur)
|
||||||
|
|
@ -70,5 +78,5 @@ def build(module, target):
|
||||||
for m in order:
|
for m in order:
|
||||||
run_make(m, target)
|
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