mirror of
https://github.com/Ed94/gencpp.git
synced 2025-06-14 18:51:47 -07:00
Update readme and scripts
Both bootstrap and singleheader now name the files the same as the library's default. Output now directed toward gen directory for the corresponding dir (project, singleheader, or test)
This commit is contained in:
@ -16,6 +16,7 @@ foreach ( $arg in $args )
|
||||
$path_root = git rev-parse --show-toplevel
|
||||
$path_project = Join-Path $path_root project
|
||||
$path_project_build = Join-Path $path_project build
|
||||
$path_project_gen = Join-Path $path_project gen
|
||||
|
||||
write-host "`n`nBuilding gencpp bootstrap`n"
|
||||
|
||||
@ -41,6 +42,10 @@ Push-Location $path_root
|
||||
Pop-Location
|
||||
|
||||
Push-location $path_project
|
||||
if ( -not(Test-Path($path_project_gen) )) {
|
||||
New-Item -ItemType Directory -Path $path_project_gen
|
||||
}
|
||||
|
||||
# Run meta-program
|
||||
$gencpp_bootstrap = Join-Path $path_project_build gencpp_bootstrap.exe
|
||||
|
||||
|
@ -7,6 +7,8 @@ $path_gen_build = Join-Path $path_gen build
|
||||
$path_test_build = Join-Path $path_test build
|
||||
$path_project_build = Join-Path $path_project build
|
||||
$path_singleheader_build = Join-Path $path_singleheader build
|
||||
$path_project_gen = Join-Path $path_project gen
|
||||
$path_singleheader_gen = Join-Path $path_singleheader gen
|
||||
|
||||
if ( Test-Path $path_project_build)
|
||||
{
|
||||
@ -28,17 +30,17 @@ if ( Test-Path $path_gen_build )
|
||||
Remove-Item $path_gen_build -Recurse
|
||||
}
|
||||
|
||||
[string[]] $include = 'gencpp.hpp', 'gencpp.cpp'
|
||||
[string[]] $include = 'gen.hpp', 'gen.cpp'
|
||||
[string[]] $exclude =
|
||||
|
||||
$files = Get-ChildItem -Recurse -Path $path_project -Include $include -Exclude $exclude
|
||||
$files = Get-ChildItem -Recurse -Path $path_project_gen -Include $include -Exclude $exclude
|
||||
|
||||
if ( $files )
|
||||
{
|
||||
Remove-Item $files
|
||||
}
|
||||
|
||||
$files = Get-ChildItem -Recurse -Path $path_singleheader -Include $include -Exclude $exclude
|
||||
$files = Get-ChildItem -Recurse -Path $path_singleheader_gen -Include $include -Exclude $exclude
|
||||
|
||||
if ( $files )
|
||||
{
|
||||
|
@ -16,6 +16,7 @@ foreach ( $arg in $args )
|
||||
$path_root = git rev-parse --show-toplevel
|
||||
$path_singleheader = Join-Path $path_root singleheader
|
||||
$path_singleheader_build = Join-Path $path_singleheader build
|
||||
$path_singleheader_gen = Join-Path $path_singleheader gen
|
||||
|
||||
write-host "`n`nBuilding gencpp bootstrap`n"
|
||||
|
||||
@ -41,6 +42,10 @@ Push-Location $path_root
|
||||
Pop-Location
|
||||
|
||||
Push-location $path_singleheader
|
||||
if ( -not(Test-Path($path_singleheader_gen) )) {
|
||||
New-Item -ItemType Directory -Path $path_singleheader_gen
|
||||
}
|
||||
|
||||
# Run meta-program
|
||||
$gencpp_singleheader = Join-Path $path_singleheader_build gencpp_singleheader.exe
|
||||
|
||||
|
Reference in New Issue
Block a user