mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 04:36:39 +00:00
Start build refactor with top-level Makefile
- Recursively calls make in monad-linux and monad-build - Eventually will deprecate scripts dir - Makes monad-docker.sh shareable
This commit is contained in:
1 parent
0da23d5b5c
commit
16a2ae2fa8
5 files changed
+51
-12
No files matched your search
+6
-9
@@ -1,10 +1,7 @@
|
|||||||
.idea
|
/.config
|
||||||
CMakeCache.txt
|
/.nuget\\packages\\/
|
||||||
CMakeFiles/
|
|
||||||
cmake_install.cmake
|
|
||||||
Makefile
|
|
||||||
!/scripts/Makefile
|
|
||||||
/.bash_history
|
/.bash_history
|
||||||
/.local/
|
/bin/
|
||||||
/.config/
|
/lib/
|
||||||
/indicationlog
|
/tools/
|
||||||
|
*-tests.xml
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
# the monad-linux superproject
|
||||||
|
export MONAD=$(realpath $(CURDIR))
|
||||||
|
|
||||||
|
all: powershell-native powershell-managed
|
||||||
|
|
||||||
|
# managed code
|
||||||
|
|
||||||
|
powershell-managed:
|
||||||
|
$(MAKE) -j -C src/monad-build all test
|
||||||
|
|
||||||
|
# native code
|
||||||
|
|
||||||
|
powershell-native: src/monad-native/Makefile
|
||||||
|
$(MAKE) -j -C src/monad-native
|
||||||
|
|
||||||
|
src/monad-native/Makefile:
|
||||||
|
cd src/monad-native && cmake .
|
||||||
|
|
||||||
|
# one-time setup
|
||||||
|
|
||||||
|
tools/nuget.exe:
|
||||||
|
wget 'https://dist.nuget.org/win-x86-commandline/latest/nuget.exe'
|
||||||
|
|
||||||
|
bootstrap: tools/nuget.exe
|
||||||
|
mono $< restore -PackagesDirectory tools
|
||||||
|
|
||||||
|
# run targets
|
||||||
|
export POWERSHELL=env LD_LIBRARY_PATH=$(MONAD)/lib CORE_ROOT=$(MONAD)/src/monad-ext/coreclr/Runtime PWRSH_ROOT=$(MONAD)/lib PSMODULEPATH=$(MONAD)/lib/Modules $(MONAD)/bin/powershell
|
||||||
|
|
||||||
|
demo:
|
||||||
|
$(POWERSHELL) lib/powershell-simple.exe '"a","b","c","a","a" | Select-Object -Unique'
|
||||||
|
|
||||||
|
shell:
|
||||||
|
$(POWERSHELL) lib/powershell-run.exe
|
||||||
|
|
||||||
|
clean-monad:
|
||||||
|
$(MAKE) -C src/monad-build clean
|
||||||
|
|
||||||
|
clean-native:
|
||||||
|
$(MAKE) -C src/monad-native clean
|
||||||
|
|
||||||
|
clean: clean-monad
|
||||||
@@ -11,14 +11,14 @@ monad-tty()
|
|||||||
}
|
}
|
||||||
|
|
||||||
# runs ephemeral andschwa/magrathea docker container with local
|
# runs ephemeral andschwa/magrathea docker container with local
|
||||||
# directory mounted to /opt and workdir set to /opt/scripts
|
# directory mounted and workdir set to /opt
|
||||||
monad-docker-run()
|
monad-docker-run()
|
||||||
{
|
{
|
||||||
local CONSOLE=$1
|
local CONSOLE=$1
|
||||||
shift 1
|
shift 1
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
--volume $(dirname $(pwd))/:/opt \
|
--volume $(pwd)/:/opt \
|
||||||
--workdir /opt/scripts \
|
--workdir /opt \
|
||||||
$CONSOLE \
|
$CONSOLE \
|
||||||
andschwa/magrathea:latest \
|
andschwa/magrathea:latest \
|
||||||
bash -c "$(monad-impersonate) bash -c '$*'"
|
bash -c "$(monad-impersonate) bash -c '$*'"
|
||||||
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user