Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ function find_xml_files($path) // {{{
break;

case 'history-file':
$ac['SOURCES_FILE'] = $v;
$ac['HISTORY_FILE'] = $v;
break;

case 'libxml-check':
Expand Down Expand Up @@ -1163,13 +1163,41 @@ function xml_validate_libxml( $dom )
php_history();
phd_sources();
phd_version();
phd_conf_json();

exit( 0 );

exit(0); // Finished successfully.
function phd_conf_json()
{
// State used by other phd_*() functions, serialized to allow these
// to be moved out of configure.php into php/phd (genphdfiles.php).

global $ac;

$conf = array(
'rootdir' => $ac['rootdir'],
'srcdir' => $ac['srcdir'],
'lang' => $ac['LANG'],
'enDir' => $ac['EN_DIR'],
'langDir' => $ac['LANGDIR'],
'generate' => $ac['GENERATE'],
'xpointerReporting' => $ac['XPOINTER_REPORTING'] === 'yes',
'stderrToStdout' => $ac['STDERR_TO_STDOUT'] === 'yes',
'outputs' => array(
'version' => $ac['VERSION_FILES'] === 'yes',
'sources' => $ac['SOURCES_FILE'] === 'yes',
'history' => $ac['HISTORY_FILE'] === 'yes',
),
);

$path = __DIR__ . '/temp/phd-conf.json';
file_put_contents($path, json_encode($conf, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n");
}

// TODO: Should this moved to github/php/phd?
// Any input/state can be serialized into doc-base/temp/phd-conf.json.
// TODO: These functions are to be erased, after moved to php/phd.
// Then, files version.xml, sources.xml and fileModHistory.php can be
// removed from .gitignore.
// Depends on https://github.com/php/phd/pull/261 .

function phd_acronym()
{
Expand Down