Skip to content

Commit e243b17

Browse files
Fix dependencies for documentation master html; more targets
1 parent 134e587 commit e243b17

File tree

2 files changed

+47
-43
lines changed

2 files changed

+47
-43
lines changed

ChangeLog

+7-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,18 @@ Release Name: 0.8.3
88
* removed spaces from arguments for shell_output to fix SConstruct on darwin
99
* added header polybori/embed.h for easy python/polybori integration
1010
* support pkgconfig and .desktop files
11-
* ipbori2, ipbori2.*, PolyGUI2, PolyGUI2.x for supporting multiple python
11+
* ipbori2, ipbori2.*, PolyGUI2, PolyGUI2.x for supporting multiple python
1212
* side-by-side installation of python module documentation for multiple python
1313
* LIBRARY_VERSION customizable
1414
* fixed boost::python::range disambiguity by explicitly using namespace
1515
* added target docs and install-docs for building and installing platform-
1616
independent documentation (DOCS=False to suppress them on build and install)
17-
17+
* target naming: prepare-install, prepare-docs, prepare-static, prepare-devel
18+
install, install-docs, install-headers, install-static, install-devel
19+
build (without docs, but with static libs)
20+
aliases: devel-install (=install-devel), docs (=prepare-docs)
21+
Note: prepare-install and install do not care for static libs anymore
22+
1823
Release Name: 0.8.2
1924
* Dependencies of optional rpm package gui fixed
2025
* Fixed bug which prevented self-testing of polybori.plot

SConstruct

+40-41
Original file line numberDiff line numberDiff line change
@@ -1176,8 +1176,8 @@ if HAVE_DOXYGEN:
11761176
cxxdocu = env.Doxygen(source=[DocPath('doxygen.conf')],
11771177
target=docutarget)
11781178

1179-
11801179
env.Clean(DocPath('c++'), glob(DocPath('c++/*')))
1180+
env.Clean(DocPath(), DocPath('c++'))
11811181

11821182
######################################################################
11831183
# Boost-test based tests
@@ -1233,14 +1233,8 @@ if BOOST_TEST:
12331233
LIBS = env['LIBS']+[env['BOOST_PYTHON']]+USERLIBS
12341234

12351235

1236-
documentable_python_modules = [PyRootPath('polybori', f)
1237-
for f in Split("""ll.py check_claims.py nf.py
1238-
gbrefs.py statistics.py randompoly.py blocks.py
1239-
specialsets.py memusage.py
1240-
heuristics.py gbcore.py interpolate.py
1241-
interred.py ncf.py partial.py simplebb.py
1242-
PyPolyBoRi.py __init__.py dynamic/__init__.py""")
1243-
]
1236+
documentable_python_modules = glob(PyRootPath('polybori/*.py')) + \
1237+
[PyRootPath('polybori/dynamic/__init__.py')]
12441238

12451239

12461240
# Currently all python modules are at place
@@ -1438,32 +1432,36 @@ readabledevellibs = pb_symlinks + gb_symlinks + pypb_symlinks
14381432

14391433
dylibs_inst = env.Install(DevelInstLibPath(), dylibs)
14401434
stlibs_inst = env.Install(DevelInstLibPath(), stlibs)
1435+
env.Alias('install-static', stlibs_inst)
1436+
14411437
dylibs_readable_inst = SymlinkReadableLibname(dylibs_inst)
14421438

14431439
devellibs_inst = dylibs_readable_inst + dylibs_inst + stlibs_inst
14441440

14451441

14461442
# Installation for development purposes
1447-
if 'devel-install' in COMMAND_LINE_TARGETS:
1448-
1443+
if 'devel-install' in COMMAND_LINE_TARGETS or \
1444+
'install-devel' in COMMAND_LINE_TARGETS or \
1445+
'install-headers' in COMMAND_LINE_TARGETS:
1446+
14491447
for elt in ['..', '.'] + [path.basename(elt)
14501448
for elt in glob(PBInclPath('*'))
1451-
if path.isdir(elt) and path.basename(elt) != 'cudd' ]:
1449+
if path.isdir(elt) and \
1450+
path.basename(elt) != 'cudd' ]:
14521451
env.Install(DevelInstInclPath(elt), glob(PBInclPath(elt, '*.h')))
14531452

14541453
env.Install(DevelInstInclPath('groebner'),
14551454
glob(GBPath('include/polybori/groebner/*.h')))
14561455

1457-
# Install our own copy the cudd header to ensure correct (patched) version
1456+
# To ensure correct (patched) version of cudd we install our own
1457+
# copy of the cudd headers (to our inclusion "namespace" to avoid clashes)
14581458
env.Install(DevelInstInclPath('cudd'), cudd_headers)
14591459

14601460
if not(external_m4ri):
14611461
env.Install(DevelInstInclPath('m4ri'), glob('M4RI/m4ri/*.h'))
1462-
1463-
env.Alias('devel-install', DevelInstPath())
1464-
env.Alias('devel-install', DevelInstInclPath())
1465-
env.Alias('devel-install', DevelInstLibPath())
1466-
1462+
1463+
env.Alias('install-headers', DevelInstInclPath())
1464+
14671465
env.Append(COPYALL_PATTERNS = ['*'])
14681466

14691467
# Copy glob('*') from one directory to the other
@@ -1489,16 +1487,6 @@ def cp_all(target, source, env):
14891487

14901488
return None
14911489

1492-
def CopyAll(targetdir, sourcedir, env):
1493-
targets = []
1494-
for patt in env['COPYALL_PATTERNS']:
1495-
for filename in glob(path.join(sourcedir, patt)):
1496-
if not path.isdir(filename):
1497-
result = str(path.join(targetdir, path.basename(filename)))
1498-
targets += env.Install(targetdir, filename)
1499-
1500-
return FinalizeNonExecs(targets)
1501-
15021490
# Copy python docu from one directory to the other and correct paths to modules
15031491
def cp_pydoc(target, source, env):
15041492

@@ -1688,11 +1676,13 @@ if have_l2h or have_t4h or HAVE_DOXYGEN:
16881676
if docpybase not in documastersubdirs:
16891677
documastersubdirs += [docpybase]
16901678

1691-
env.DocuMaster(DocPath('index.html'), [DocPath('index.html.in')] + [
1692-
env.Dir(DocPath(srcs)) for srcs in documastersubdirs ])
1693-
1679+
docmstr = env.DocuMaster(DocPath('index.html'),
1680+
[DocPath('index.html.in')] + [
1681+
env.Dir(DocPath(srcs)) for srcs in documastersubdirs ])
1682+
16941683
# build-independent doc targets
1695-
env.Alias('docs', [DocPath('c++'), DocPath('tutorial')])
1684+
env.Alias('prepare-docs', docmstr + [DocPath('c++'), DocPath('tutorial')])
1685+
env.Alias('docs', 'prepare-docs')
16961686

16971687
# Clean, even, if L2H/TexToHt are not available anymore
16981688
env.Clean(DocPath('tutorial'), DocPath('tutorial/tutorial'))
@@ -1840,11 +1830,10 @@ if 'install' in COMMAND_LINE_TARGETS or 'install-docs' in COMMAND_LINE_TARGETS:
18401830

18411831
# Copy c++ documentation
18421832
if HAVE_DOXYGEN:
1843-
cxxdocinst = CopyAll(InstDocPath('c++'),
1844-
DocPath('c++/html'), env)
1833+
cxxdocinst = env.CopyAll(env.Dir(InstDocPath('c++')),
1834+
env.Dir(DocPath('c++/html')))
18451835
env.Depends(cxxdocinst, cxxdocu)
18461836

1847-
18481837
htmlpatterns = Split("*.html *.css *.png *gif *.jpg")
18491838

18501839
# Copy python documentation
@@ -2013,11 +2002,17 @@ Type=Application
20132002

20142003
if have_l2h or have_t4h or HAVE_DOXYGEN:
20152004
env.Alias('install-docs', instdocu)
2005+
env.Depends('install-docs', 'prepare-docs')
20162006
env.Alias('install', 'install-docs')
20172007

2018-
2019-
env.Alias('prepare-devel', dylibs + stlibs + readabledevellibs)
2020-
env.Alias('prepare-install', [pyroot, DocPath()])
2008+
2009+
env.Alias('prepare-static', stlibs)
2010+
env.Alias('prepare-install',
2011+
dylibs + readabledevellibs + [BuildPyPBPath(), pyroot, DocPath()])
2012+
2013+
env.Alias('prepare-devel', ['prepare-static', 'prepare-install'])
2014+
2015+
20212016

20222017
for sfx in [pyconf.major, pyconf.version]:
20232018
Default(env.SymLink(IPBPath('ipbori' + sfx),
@@ -2055,16 +2050,20 @@ if retrieve_m4ri:
20552050
env.Install(env.subst('$PKGCONFIGPATH'),
20562051
BuildLibPath('pkginfo/m4ri.pc'))
20572052

2058-
env.Alias("devel-install",
2053+
env.Alias("install-headers",
20592054
env.CopyAll(env.Dir(DevelInstInclPath('m4ri')),
20602055
env.Dir(BuildInclTopPath('m4ri'))))
2056+
env.Alias('install-static', DevelInstLibPath("libm4ri.a"))
20612057

20622058
env.Alias("m4ri-build", m4ribld)
20632059
env.Append(LIBPATH=BuildLibPath())
20642060
env.Depends(libgbShared + pypb, m4ribld)
20652061
env.Clean(BuildPath('tmp'), m4ri_dir)
2066-
2067-
env.Clean('.', "m4ri.download")
2062+
2063+
2064+
2065+
env.Alias('install-devel', ['install-static', 'install-headers'])
2066+
env.Alias('devel-install', 'install-devel') # allow old naming convention
20682067

20692068
# This one last!
20702069
env.Clean('.', '.sconsign.dblite')

0 commit comments

Comments
 (0)