Skip to content

Commit

Permalink
Migrate configure settings to Windows (#4479)
Browse files Browse the repository at this point in the history
Migrate the settings `with_proper` and `erlang_md5` to `configure.ps1`
to add it to `config.erl`.
  • Loading branch information
big-r81 committed Mar 17, 2023
1 parent b976247 commit a25336f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Param(
[switch]$DisableFauxton = $false, # do not build Fauxton
[switch]$DisableDocs = $false, # do not build any documentation or manpages
[switch]$SkipDeps = $false, # do not update erlang dependencies
[switch]$DisableProper = $false, # a compilation pragma. proper is a kind of automated test suite
[switch]$EnableErlangMD5 = $false, # don't use Erlang for md5 hash operations by default

[ValidateNotNullOrEmpty()]
[string]$CouchDBUser = [Environment]::UserName, # set the username to run as (defaults to current user)
Expand Down Expand Up @@ -126,6 +128,8 @@ $LogFile="$LogDir\couch.log"
$BuildFauxton = [int](-not $DisableFauxton)
$BuildDocs = [int](-not $DisableDocs)
$Hostname = [System.Net.Dns]::GetHostEntry([string]"localhost").HostName
$WithProper = (-not $DisableProper).ToString().ToLower()
$ErlangMD5 = ($EnableErlangMD5).ToString().ToLower()

Write-Verbose "==> configuring couchdb in rel\couchdb.config"
$CouchDBConfig = @"
Expand Down Expand Up @@ -199,6 +203,8 @@ spidermonkey_version = $SpiderMonkeyVersion
$InstallMk | Out-File "$rootdir\install.mk" -encoding ascii

$ConfigERL = @"
{with_proper, $WithProper}.
{erlang_md5, $ErlangMD5}.
{spidermonkey_version, "$SpiderMonkeyVersion"}.
"@
$ConfigERL | Out-File "$rootdir\config.erl" -encoding ascii
Expand Down

0 comments on commit a25336f

Please sign in to comment.