Skip to content

Commit

Permalink
Load flattening_tags_for_git into tags.
Browse files Browse the repository at this point in the history
git-svn-id: https://wush.net/svn/mdaus-oss/tags/SIX-2.1.1@625 9d772353-a6c9-4ee9-b2cc-df47a7649cd5
  • Loading branch information
asylvest committed Apr 12, 2015
1 parent 35de7b1 commit c6a7087
Show file tree
Hide file tree
Showing 922 changed files with 270,792 additions and 0 deletions.
1,446 changes: 1,446 additions & 0 deletions modules/build/build.py

Large diffs are not rendered by default.

1,501 changes: 1,501 additions & 0 deletions modules/build/config.guess

Large diffs are not rendered by default.

1,521 changes: 1,521 additions & 0 deletions modules/build/config.sub

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions modules/build/dumpenv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from waflib.Build import BuildContext

class dumpenv(BuildContext):
'''dumps the environment'''
cmd = 'dumpenv'
fun = 'build'

def execute(self):
# Recurse through all the wscripts to find all available tasks
self.restore()
if not self.all_envs:
self.load_envs()
self.recurse([self.run_dir])

targets = self.targets.split(',')
defines = []
for target in targets:
# Find the target
tsk = self.get_tgen_by_name(target)

# Actually create the task object
tsk.post()

# Now we can grab his defines
defines += tsk.env.DEFINES

# Sort and uniquify it, then print them all out preceded by the
# compiler define flag
defines = sorted(list(set(defines)))

str = ''
for define in defines:
if str:
str += ' '
str += self.env['DEFINES_ST'] % define
print str
85 changes: 85 additions & 0 deletions modules/build/dumplib.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
from waflib.Build import BuildContext
import os

class dumplib(BuildContext):
'''dumps the libs connected to the targets'''
cmd = 'dumplib'
fun = 'build'

# Returns either shared or static libs depending on the
# waf configuration
def resolveLibType(self, env):
if env.LIB_TYPE == 'stlib':
return env.STLIB
else:
return env.LIB

def execute(self):

# Recurse through all the wscripts to find all available tasks
self.restore()
if not self.all_envs:
self.load_envs()

self.recurse([self.run_dir])

targets = self.targets.split(',')
libs = []

for target in targets:
# Find the target
tsk = self.get_tgen_by_name(target)

# Actually create the task object
tsk.post()

# Now we can grab his libs
libs += self.resolveLibType(tsk.env)

# Now run again but add all the targets we found
# This resolves running with multiple targets
moduleDeps = ''
for lib in libs:
moduleDeps += str(lib).split('-')[0] + ' '

# Add in the original targets again
for target in targets:
moduleDeps += str(target).split('-')[0] + ' '

# Now run with the new module deps
modArgs = globals()
modArgs['NAME'] = 'dumplib'
modArgs['MODULE_DEPS'] = moduleDeps

# We need a source file here so it doesn't think it is headers only
topDir = tsk.bld.top_dir
buildDir = os.path.dirname(os.path.realpath(__file__))
modArgs['SOURCE_DIR'] = os.path.relpath(buildDir, topDir)
modArgs['SOURCE_EXT'] = 'pyc'
self.module(**modArgs)

self.recurse([self.run_dir])

libs = []
tsk = self.get_tgen_by_name('dumplib-c++')
tsk.post()
libs += self.resolveLibType(tsk.env)

# Uselibs are only need in static build.
# In shared builds they are added to the LIB value automatically
if tsk.env.LIB_TYPE == 'stlib':
for uselib in tsk.uselib:
if tsk.env['LIB_' + uselib]:
libs += tsk.env['LIB_' + uselib]

if len(libs) == 0:
# If we found nothing print that we found nothing
# otherwise it looks like the command failed.
print 'No dependencies.'
else:
ret = ''
for lib in libs:
if ret:
ret += ' '
ret += tsk.env.STLIB_ST % lib
print ret
Loading

0 comments on commit c6a7087

Please sign in to comment.