source = [m + '.xml']
if extra_source is not None:
source = [source, extra_source]
- # ${SRC[1]} and ${SRC[2]} are not referenced in the
+ # ${SRC[1]}, ${SRC[2]} and ${SRC[3]} are not referenced in the
# SAMBA_GENERATOR but trigger the dependency calculation so
# ensures that manpages are rebuilt when these change.
- source += ['build/DTD/samba.entities', 'build/DTD/samba.build.version']
+ source += ['build/DTD/samba.build.pathconfig', 'build/DTD/samba.entities', 'build/DTD/samba.build.version']
bld.SAMBA_GENERATOR(m,
source=source,
target=m,
"http://www.samba.org/samba/LOCAL.BUILDDIR.DTD/samba.build.version">
%samba.build.version;
+<!ENTITY % samba.build.pathconfig PUBLIC
+ "-//Samba-Team//VERSION Samba Build Version//EN"
+ "http://www.samba.org/samba/LOCAL.BUILDDIR.DTD/samba.build.pathconfig">
+%samba.build.pathconfig;
+
<!-- smb.conf options -->
<!ELEMENT smbconfblock ((smbconfoption|smbconfsection|smbconfcomment)*)>
'vfs_xattr_tdb',
'vfs_zfsacl' ]
-def smbdotconf_generate_parameter_list(task):
- parameter_all = task.outputs[0].bldpath(task.env)
- articles = task.inputs
-
+def generate_path_entity_list():
entities = bld.pathconfig_entities()
# We need this if we build with Heimdal as we can't easily make
if bld.CONFIG_SET('MIT_KDC_PATH'):
mit_kdc_path = bld.CONFIG_GET('MIT_KDC_PATH')
- t = "<!DOCTYPE section [\n" +\
- "\n".join(entities) +\
+ t = "\n".join(entities) +\
"\n" +\
"<!ENTITY pathconfig.MITKDCPATH " + mit_kdc_path + ">\n" +\
+ "\n"
+ return t
+
+def smbdotconf_generate_parameter_list_file(task):
+ parameter_all = task.outputs[0].bldpath(task.env)
+ articles = task.inputs
+
+ t = "<!DOCTYPE section [\n" +\
+ generate_path_entity_list() + \
"]>\n" +\
"<section>\n" +\
"".join(art.read() for art in articles) +\
"</section>\n"
+
save_file(parameter_all, t , create_dir=True)
return 0
bld.SAMBA_GENERATOR(parameter_all,
source=articles,
target=parameter_all,
- rule=smbdotconf_generate_parameter_list,
+ rule=smbdotconf_generate_parameter_list_file)
+
+def generate_path_entity_file(task):
+ path_entities_file = task.outputs[0].bldpath(task.env)
+
+ save_file(path_entities_file,
+ generate_path_entity_list(),
+ create_dir=True)
+ return 0
+
+path_entities = 'build/DTD/samba.build.pathconfig'
+
+bld.SAMBA_GENERATOR(path_entities,
+ source=articles,
+ target=path_entities,
+ rule=generate_path_entity_file,
dep_vars=bld.dynconfig_varnames())
+
def SMBDOTCONF_MANPAGE(bld, target):
''' assemble and build smb.conf.5 manual page'''
bld.SAMBAMANPAGES(target, parameter_all)