Merge pull request 181 from dev/rebuild into develop

This commit is contained in:
Andy Schwartzmeyer 2015-10-15 17:11:20 +00:00
commit 461008b0ba
5 changed files with 106 additions and 114 deletions

12
.gitignore vendored
View file

@ -1,11 +1,9 @@
.idea
.config/
.local/
CMakeCache.txt
CMakeFiles/
Makefile
!scripts/Makefile
cmake_install.cmake
scripts/*-tests.xml
scripts/powershell.inc
.bash_history
Makefile
!/scripts/Makefile
/.bash_history
/.local/
/.config/

27
scripts/.gitignore vendored
View file

@ -1,24 +1,9 @@
System.Collections.Immutable.*/
System.Reflection.Metadata.*/
Microsoft.Net.ToolsetCompilers.*/
dotnetlibs/
gen-all-files.txt
monad-src.diff
output.txt
string-resources-files.txt
string-resources-orig.txt
xunit.abstractions.*/
xunit.core.*/
xunit.extensibility.core.*/
xunit.runner.console.*/
TypeCatalogGen.exe
System.Collections.Immutable.dll
System.Reflection.Metadata.dll
commands-management-win.mk
commands-utility-win.mk
management-infrastructure-win.mk
system-automation-win.mk
*.txt
*.exe
*-tests.xml
*-win.mk
CorePsTypeCatalog.cs
powershell.inc
buildtemp/
exec_env/
libps/

View file

@ -1,10 +1,8 @@
.PHONY: all
# this should go away and be automatically generated
include assembly-load-context.mk
# the monad-linux superproject
MONAD=$(realpath $(CURDIR)/..)
# main references to the CoreCLR reference assemblies
MONAD_EXT=../src/monad-ext
MONAD_EXT=$(MONAD)/src/monad-ext
TARGETING_PACK=$(MONAD_EXT)/coreclr/TargetingPack
COREREF=$(addprefix -r:, $(shell ls $(TARGETING_PACK)/*.dll))
CORECLR_ASSEMBLY_BASE=$(MONAD_EXT)/coreclr/Runtime
@ -13,7 +11,7 @@ CORECLR_ASSEMBLY_BASE=$(MONAD_EXT)/coreclr/Runtime
include powershell-run.mk
# this variable is needed by module specific include makefiles below
ADMIN_GIT_ROOT=../src/monad
ADMIN_GIT_ROOT=$(MONAD)/src/monad
# these are automatically generated from the PowerShell build sytem
# - System.Management.Automation.dll (the main PS dll)
@ -25,12 +23,15 @@ include commands-utility.mk
include management-infrastructure.mk
include security.mk
# this should go away and be automatically generated
include assembly-load-context.mk
# reference sets for the PowerShell assemblies
MI_NATIVE_REF=-r:dotnetlibs/Microsoft.Management.Infrastructure.Native.dll
MI_REF_ASSEMBLY=-r:$(MONAD_EXT)/PS/PS_refs_modil/microsoft.management.infrastructure.metadata_dll
MI_ASSEMBLY=dotnetlibs/Microsoft.Management.Infrastructure.dll
MI_REF=-r:$(MI_ASSEMBLY)
PRODUCT_BASE_REFS=$(COREREF)
PRODUCT_MI_REFS=$(COREREF) $(MI_NATIVE_REF)
PRODUCT_PS_REFS=$(COREREF) $(MI_REF) -r:dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET)
PRODUCT_COMMANDS_REFS=$(COREREF) -r:dotnetlibs/System.Management.Automation.dll
@ -47,42 +48,43 @@ CSCOPTS_LIB_PS=$(CSCOPTS_LIB) -unsafe -define:CORECLR -define:_CORECLR /nowarn:C
RUN_TARGETS=$(POWERSHELL_RUN_TARGETS) $(addprefix dotnetlibs/, Microsoft.PowerShell.Commands.Management.dll Microsoft.PowerShell.Commands.Utility.dll Microsoft.PowerShell.Security.dll api-ms-win-core-registry-l1-1-0.dll host_cmdline)
.PHONY: all
all: dotnetlibs/System.Management.Automation.dll $(RUN_TARGETS) dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET)
# this is the build rule for SMA.dll
dotnetlibs/System.Management.Automation.dll: prepare $(SYS_AUTO_SRCS) dotnetlibs/Microsoft.Management.Infrastructure.dll ../src/assembly-info/System.Management.Automation.assembly-info.cs dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) $(SYS_AUTO_RES_SRCS) $(SYS_AUTO_RES_CS_SRCS)
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_PS_REFS) $(SYS_AUTO_SRCS) $(SYS_AUTO_RES_REF) $(SYS_AUTO_RES_CS_SRCS) ../src/assembly-info/System.Management.Automation.assembly-info.cs
dotnetlibs/System.Management.Automation.dll: $(MONAD)/src/assembly-info/System.Management.Automation.assembly-info.cs dotnetlibs/Microsoft.Management.Infrastructure.dll dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) $(SYS_AUTO_SRCS) $(SYS_AUTO_RES_SRCS) $(SYS_AUTO_RES_CS_SRCS) buildtemp
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_PS_REFS) $(SYS_AUTO_SRCS) $(SYS_AUTO_RES_REF) $(SYS_AUTO_RES_CS_SRCS) $<
# this is the build rule for MMI.dll
dotnetlibs/Microsoft.Management.Infrastructure.dll: prepare $(MAN_INFRA_SRCS) dotnetlibs/Microsoft.Management.Infrastructure.Native.dll ../src/assembly-info/Microsoft.Management.Infrastructure.assembly-info.cs $(MAN_INFRA_RES_SRCS) $(MAN_INFRA_RES_CS_SRCS)
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_MI_REFS) $(MAN_INFRA_SRCS) $(MAN_INFRA_RES_REF) $(MAN_INFRA_RES_CS_SRCS) ../src/assembly-info/Microsoft.Management.Infrastructure.assembly-info.cs
dotnetlibs/Microsoft.Management.Infrastructure.dll: $(MONAD)/src/assembly-info/Microsoft.Management.Infrastructure.assembly-info.cs dotnetlibs/Microsoft.Management.Infrastructure.Native.dll $(MAN_INFRA_SRCS) $(MAN_INFRA_RES_SRCS) $(MAN_INFRA_RES_CS_SRCS) buildtemp
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_MI_REFS) $(MAN_INFRA_SRCS) $(MAN_INFRA_RES_CS_SRCS) $(MAN_INFRA_RES_REF) $<
# Commands
dotnetlibs/Microsoft.PowerShell.Commands.Management.dll: prepare $(COMMANDS_MANAGEMENT_SRCS) dotnetlibs/System.Management.Automation.dll dotnetlibs/Microsoft.PowerShell.Security.dll $(COMMANDS_MANAGEMENT_RES_SRCS) $(COMMANDS_MANAGEMENT_RES_CS_SRCS) $(MI_ASSEMBLY)
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_COMMANDS_REFS) $(COMMANDS_MANAGEMENT_SRCS) $(COMMANDS_MANAGEMENT_RES_CS_SRCS) $(COMMANDS_MANAGEMENT_RES_REF) $(MI_REF) -r:dotnetlibs/Microsoft.PowerShell.Security.dll
dotnetlibs/Microsoft.PowerShell.Commands.Management.dll: dotnetlibs/System.Management.Automation.dll dotnetlibs/Microsoft.PowerShell.Security.dll $(MI_ASSEMBLY) $(COMMANDS_MANAGEMENT_SRCS) $(COMMANDS_MANAGEMENT_RES_SRCS) $(COMMANDS_MANAGEMENT_RES_CS_SRCS) buildtemp
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_COMMANDS_REFS) $(MI_REF) $(COMMANDS_MANAGEMENT_SRCS) $(COMMANDS_MANAGEMENT_RES_CS_SRCS) $(COMMANDS_MANAGEMENT_RES_REF) -r:dotnetlibs/Microsoft.PowerShell.Security.dll
dotnetlibs/Microsoft.PowerShell.Commands.Utility.dll: prepare $(COMMANDS_UTILITY_SRCS) dotnetlibs/System.Management.Automation.dll $(COMMANDS_UTILITY_RES_SRCS) $(COMMANDS_UTILITY_RES_CS_SRCS)
dotnetlibs/Microsoft.PowerShell.Commands.Utility.dll: dotnetlibs/System.Management.Automation.dll $(COMMANDS_UTILITY_SRCS) $(COMMANDS_UTILITY_RES_SRCS) $(COMMANDS_UTILITY_RES_CS_SRCS) buildtemp
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_COMMANDS_REFS) $(COMMANDS_UTILITY_SRCS) $(COMMANDS_UTILITY_RES_CS_SRCS) $(COMMANDS_UTILITY_RES_REF)
dotnetlibs/Microsoft.PowerShell.Security.dll: prepare $(SECURITY_SRCS) $(SECURITY_RES_SRCS) $(SECURITY_RES_CS_SRCS)
dotnetlibs/Microsoft.PowerShell.Security.dll: dotnetlibs/System.Management.Automation.dll $(SECURITY_SRCS) $(SECURITY_RES_SRCS) $(SECURITY_RES_CS_SRCS) buildtemp
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_COMMANDS_REFS) $(SECURITY_SRCS) $(SECURITY_RES_CS_SRCS) $(SECURITY_RES_REF)
# assembly load context
dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET): prepare $(ASSEMBLY_LOAD_CONTEXT_SRCS)
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_BASE_REFS) $(ASSEMBLY_LOAD_CONTEXT_SRCS)
dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET): $(ASSEMBLY_LOAD_CONTEXT_SRCS) buildtemp
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(COREREF) $(ASSEMBLY_LOAD_CONTEXT_SRCS)
# this one is built from stubs
MI_STUBS=../src/stubs/Microsoft.Management.Infrastructure.Native-stub.cs ../src/stubs/Microsoft.Management.Infrastructure.Native-stub-assembly-info.cs
dotnetlibs/Microsoft.Management.Infrastructure.Native.dll: prepare $(MI_STUBS)
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(PRODUCT_BASE_REFS) $(MI_STUBS)
MI_STUBS=$(MONAD)/src/stubs/Microsoft.Management.Infrastructure.Native-stub.cs $(MONAD)/src/stubs/Microsoft.Management.Infrastructure.Native-stub-assembly-info.cs
dotnetlibs/Microsoft.Management.Infrastructure.Native.dll: $(MI_STUBS) buildtemp
$(CSC) -out:$@ $(CSCOPTS_LIB_PS) $(COREREF) $(MI_STUBS)
# this creates the type catalog generator
MPATH=/usr/lib/mono/4.5/Facades
REFLECTION_METADATA=buildtemp/System.Reflection.Metadata.1.0.22/lib/dotnet/System.Reflection.Metadata.dll
COLLECTIONS_IMMUTABLE=buildtemp/System.Collections.Immutable.1.1.37/lib/dotnet/System.Collections.Immutable.dll
buildtemp/TypeCatalogGen.exe: ../src/monad/monad/nttargets/assemblies/core/PSAssemblyLoadContext/TypeCatalogGen/TypeCatalogGen.cs $(REFLECTION_METADATA) $(COLLECTIONS_IMMUTABLE)
buildtemp/TypeCatalogGen.exe: $(ADMIN_GIT_ROOT)/monad/nttargets/assemblies/core/PSAssemblyLoadContext/TypeCatalogGen/TypeCatalogGen.cs $(REFLECTION_METADATA) $(COLLECTIONS_IMMUTABLE) buildtemp
$(MCS) -out:$@ -target:exe -pkg:dotnet $(addprefix -r:, $(REFLECTION_METADATA) $(COLLECTIONS_IMMUTABLE) $(MPATH)/System.Runtime.dll $(MPATH)/System.Reflection.Primitives.dll $(MPATH)/System.IO.dll) $<
# this generates the necessary file of CoreCLR references that is an artifact of the Windows build process
@ -97,143 +99,149 @@ powershell.inc:
@echo '$(PROFILE_REFERENCES)' >> $@
# generate the Core PS type catalog
# this comes from: ../src/monad/monad/nttargets/assemblies/core/PSAssemblyLoadContext/makefile.inc
# this comes from: $(MONAD)/src/monad/monad/nttargets/assemblies/core/PSAssemblyLoadContext/makefile.inc
CorePsTypeCatalog.cs: powershell.inc buildtemp/TypeCatalogGen.exe
MONO_PATH=$(dir $(REFLECTION_METADATA)):$(dir $(COLLECTIONS_IMMUTABLE)) mono buildtemp/TypeCatalogGen.exe $< $@ $(MONAD_EXT)/coreclr/TargetingPack
# the native library, libps.so
LIBPS_BUILD=buildtemp/libps-build
$(LIBPS_BUILD)/Makefile: ../src/monad-native/src/CMakeLists.txt
mkdir -p $(LIBPS_BUILD)
MONAD_NATIVE=$(MONAD)/src/monad-native/src
LIBPS_BUILD=libps
$(LIBPS_BUILD)/Makefile: $(MONAD_NATIVE)/CMakeLists.txt
# cached files can change the path to be incorrect, this must be cleaned
rm -f ../src/monad-native/src/CMakeCache.txt
rm -f ../src/monad-native/src/cmake_install.cmake
cd $(LIBPS_BUILD) && cmake ../../../src/monad-native/src/
rm -f $(MONAD_NATIVE)/CMakeCache.txt
rm -f $(MONAD_NATIVE)/cmake_install.cmake
mkdir -p $(LIBPS_BUILD)
cd $(LIBPS_BUILD) && cmake $(MONAD_NATIVE)
NATIVE_BINARIES=libps.so monad_native host_cmdline
$(addprefix dotnetlibs/, $(NATIVE_BINARIES)): $(LIBPS_BUILD)/Makefile
$(MAKE) -j -C $(LIBPS_BUILD)
mkdir -p dotnetlibs
cp $(addprefix $(LIBPS_BUILD)/, $(notdir $@)) dotnetlibs
# C++ tests for monad-native - results in native-tests.xml
# see https://github.com/google/googletest
native-tests: dotnetlibs/monad_native
cd dotnetlibs && ./monad_native --gtest_output="xml:../native-tests.xml"
cd dotnetlibs && ./monad_native --gtest_output="xml:$(MONAD)/scripts/native-tests.xml"
# this is a windows dll that is needed because CoreCLR tries to access
# registry functions that don't exist on Linux and there is no other good
# way of fixing this right now
# (TODO linux: this should be removed by addressing it in CoreCLR)
dotnetlibs/api-ms-win-core-registry-l1-1-0.dll: ../src/win-dll/lib-api-ms-win-core-registry-l1-1-0.c
gcc -o $@ -fPIC -shared -Wall $^
dotnetlibs/api-ms-win-core-registry-l1-1-0.dll: $(MONAD)/src/win-dll/lib-api-ms-win-core-registry-l1-1-0.c dotnetlibs
gcc -o $@ -fPIC -shared -Wall $<
nuget.exe:
wget 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe'
buildtemp dotnetlibs:
# this creates the build output directories and restores packages from NuGet
buildtemp: nuget.exe
mkdir -p $@
prepare: nuget.exe buildtemp dotnetlibs
mono nuget.exe restore -PackagesDirectory buildtemp
# this is the execution environment from which all managed code is run
APP_BASE=exec_env/app_base
# this is an internal target, it's not intended to be called manually
#
# it will:
# this is a phony target that will:
# - create necessary directories for deployment layout
# - copy all the PowerShell stuff into PowerShell's app_base
# - copy the custom host and other scripts into PowerShell's app_base
# - copy PS modules
#
# This rule does not copy coreclr, because the selection of debug or
# release CoreCLR depends on the actual run target.
internal-prepare-exec_env: runps.sh $(POWERSHELL_RUN_TARGETS)
rm -rf exec_env
# - copy xUnit libraries
# this is the execution environment from which all managed code is run
APP_BASE=exec_env/app_base
.PHONY: $(APP_BASE)
$(APP_BASE): runps.sh $(POWERSHELL_RUN_TARGETS)
rm -rf $@
mkdir -p $(APP_BASE)/Modules
cp ../src/monad/monad/miscfiles/display/*.ps1xml $(APP_BASE)
cp ../src/monad/monad/miscfiles/types/CoreClr/*.ps1xml $(APP_BASE)
cp -r ../src/monad/monad/miscfiles/modules/* $(APP_BASE)/Modules
cp $(ADMIN_GIT_ROOT)/monad/miscfiles/display/*.ps1xml $(APP_BASE)
cp $(ADMIN_GIT_ROOT)/monad/miscfiles/types/CoreClr/*.ps1xml $(APP_BASE)
cp -r $(ADMIN_GIT_ROOT)/monad/miscfiles/modules/* $(APP_BASE)/Modules
cp -r dotnetlibs/*.dll $(APP_BASE)
cp -r dotnetlibs/*.exe $(APP_BASE)
cp -r dotnetlibs/*.so $(APP_BASE)
cp dotnetlibs/host_cmdline $(APP_BASE)
cp -r ../ext-src/pester $(APP_BASE)/Modules/Pester
cp -r $(MONAD)/ext-src/pester $(APP_BASE)/Modules/Pester
cp -r $(MONAD_EXT)/xunit/xunit* $(APP_BASE)
cp runps*.sh $(APP_BASE)
internal-prepare-clr:
mkdir -p exec_env/coreclr
cp -r $(CORECLR_ASSEMBLY_BASE)/* exec_env/coreclr/
CORECLR=exec_env/coreclr
$(CORECLR):
rm -rf $@
mkdir -p $@
cp -r $(CORECLR_ASSEMBLY_BASE)/* $@
run: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
prepare: $(APP_BASE) $(CORECLR)
run: $(RUN_TARGETS) prepare
# execute a cmdlet, this will auto-load the utility module and print a, b and c in 3 lines
$(APP_BASE)/runps-simple.sh '"a","b","c","a","a" | Select-Object -Unique'
shell: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
shell: $(RUN_TARGETS) prepare
$(APP_BASE)/runps.sh
run-interactive: shell
run-file: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
run-file: $(RUN_TARGETS) prepare
$(APP_BASE)/runps.sh --file $(PSSCRIPT)
# easy way to run individual PowerShell scripts, `make script.ps1` where the path is relative to monad-linux/scripts (with TEMP set for Pester)
%.ps1: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
TEMP=/tmp $(APP_BASE)/runps.sh --file ../../$@
%.ps1: $(RUN_TARGETS) prepare
TEMP=/tmp $(APP_BASE)/runps.sh --file $(MONAD)/scripts/$@
# compiles "Hello World" like executables using .NET Core
%.exe: %.cs prepare internal-prepare-clr
%.exe: %.cs $(CORECLR) buildtemp
$(CSC) -out:$@ $(CSCOPTS_BASE) -target:exe $(COREREF) $<
@echo run with monad-tty ./exec_env/coreclr/corerun ./$@
run-debugclr: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
PAL_DBG_CHANNELS="+LOADER.TRACE" $(APP_BASE)/runps-simple.sh get-location
@echo run with monad-tty ./$(CORECLR)/corerun ./$@
# xUnit tests for PowerShell - results in xunit-tests.xml
# see https://xunit.github.io/
TEST_FOLDER=../src/ps_test
TEST_FOLDER=$(MONAD)/src/ps_test
TEST_SRCS=$(addprefix $(TEST_FOLDER)/, test_*.cs)
TEST_TARGETS=System.Management.Automation.dll Microsoft.PowerShell.Commands.Management.dll $(ASSEMBLY_LOAD_CONTEXT_TARGET)
$(APP_BASE)/xunit%: $(MONAD_EXT)/xunit/xunit%
cp -f $^ $@
dotnetlibs/ps_test.dll: $(TEST_SRCS) $(addprefix dotnetlibs/, $(TEST_TARGETS)) buildtemp
$(CSC) $(CSCOPTS_LIB) -out:$@ $(addprefix -r:$(MONAD_EXT)/xunit/, xunit.core.dll xunit.assert.dll) $(addprefix -r:dotnetlibs/, $(TEST_TARGETS)) $(COREREF) $(TEST_SRCS)
$(APP_BASE)/ps_test.dll: prepare $(TEST_SRCS) $(addprefix $(APP_BASE)/, xunit.core.dll xunit.assert.dll) $(addprefix dotnetlibs/, System.Management.Automation.dll Microsoft.PowerShell.Commands.Management.dll $(ASSEMBLY_LOAD_CONTEXT_TARGET))
$(CSC) $(CSCOPTS_LIB) -out:$@ $(addprefix -r:$(APP_BASE)/, xunit.core.dll xunit.assert.dll) $(addprefix -r:dotnetlibs/, System.Management.Automation.dll $(ASSEMBLY_LOAD_CONTEXT_TARGET)) $(COREREF) $(TEST_SRCS)
xunit-tests: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr $(addprefix $(APP_BASE)/, ps_test.dll xunit.console.netcore.exe xunit.runner.utility.dll xunit.abstractions.dll xunit.execution.dll)
$(APP_BASE)/runps-test.sh ps_test.dll -xml ../../xunit-tests.xml
xunit-tests: dotnetlibs/ps_test.dll $(RUN_TARGETS) prepare
$(APP_BASE)/runps-test.sh ps_test.dll -xml $(MONAD)/scripts/xunit-tests.xml
# Pester tests for PowerShell - results in pester-tests.xml
# see https://github.com/pester/Pester
# requires $TEMP to be set
pester-tests: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
$(APP_BASE)/runps-simple.sh 'cd ../../../src/pester-tests; $$env:TEMP="/tmp"; invoke-pester -OutputFile ../../scripts/pester-tests.xml -OutputFormat NUnitXml'
pester-tests: $(RUN_TARGETS) prepare
$(APP_BASE)/runps-simple.sh 'cd $(MONAD)/src/pester-tests; $$env:TEMP="/tmp"; invoke-pester -OutputFile $(MONAD)/scripts/pester-tests.xml -OutputFormat NUnitXml'
hashbang-tests: all
# execute the 3rdparty/hashbang example
PATH=$(PATH):$(shell pwd)/$(APP_BASE) $(shell pwd)/3rdparty/hashbang/script.ps1
# 3rdparty "hashbang" example using runps-file
hashbang-tests: all prepare
PATH=$(PATH):$(MONAD)/scripts/$(APP_BASE) $(MONAD)/scripts/3rdparty/hashbang/script.ps1
test: native-tests xunit-tests pester-tests hashbang-tests
trace: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
# debug/trace targets
trace: $(RUN_TARGETS) prepare
$(APP_BASE)/runps-simple-trace.sh get-location
debug: $(RUN_TARGETS) internal-prepare-exec_env internal-prepare-clr
# quoting here is a bit special if strings are passed in, because lldb seems to forward arguments strangely
run-debugclr: $(RUN_TARGETS) prepare
PAL_DBG_CHANNELS="+LOADER.TRACE" $(APP_BASE)/runps-simple.sh get-location
# quoting here is a bit special if strings are passed in, because lldb
# seems to forward arguments strangely
debug: $(RUN_TARGETS) prepare
$(APP_BASE)/runps-simple-debug.sh get-location
# clean native library, libps
# Cleaning
.PHONY: clean-native clean cleanall
clean-native:
rm -rf buildtemp/libps-build
rm -rf $(LIBPS_BUILD)
clean:
rm -rf dotnetlibs exec_env powershell.inc
rm -rf dotnetlibs/* exec_env powershell.inc *-tests.xml
# clean built stuff + prepare step
cleanall: clean clean-native
rm -rf buildtemp *tests.xml
rm -rf buildtemp
# Shell-in-a-box Docker setup
docker-build:
docker build --no-cache=false -t image_ps .

1
scripts/dotnetlibs/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*

View file

@ -21,7 +21,7 @@ monad-docker-run()
--workdir /opt/scripts \
$CONSOLE \
andschwa/magrathea:latest \
bash -c "$(monad-impersonate) -- bash -c '$*'"
bash -c "$(monad-impersonate) bash -c '$*'"
}
# creates new user in container matching the local user so that
@ -38,5 +38,5 @@ monad-impersonate()
echo \
groupadd -g $CGID $CGROUP '&&' \
useradd -u $CUID -g $CGID -d /opt $CUSER '&&' \
sudo --set-home -u $CUSER -g $CGROUP
sudo --set-home -u $CUSER -g $CGROUP --
}