From b60ecf2fe5ddfe506e02093286b3931873187e91 Mon Sep 17 00:00:00 2001 From: StevenWdV Date: Fri, 4 Feb 2022 01:18:12 +0100 Subject: More Makefile cleanup, support building in folder with spaces --- wrappers/csharp/Makefile | 11 ++++------- wrappers/csharp/README.md | 4 ++-- 2 files changed, 6 insertions(+), 9 deletions(-) (limited to 'wrappers/csharp') diff --git a/wrappers/csharp/Makefile b/wrappers/csharp/Makefile index 29f9682..e120c7a 100644 --- a/wrappers/csharp/Makefile +++ b/wrappers/csharp/Makefile @@ -1,8 +1,10 @@ .PHONY: build pack test clean EXPORTS_PATH ?= ../../exports +include $(EXPORTS_PATH)/common.mk + # Export, see EduVpnCommon.props -export EXPORTS_LIB_PATH ?= $(EXPORTS_PATH)/lib +export EXPORTS_LIB_PATH build: dotnet publish EduVpnCommon.csproj --configuration Release @@ -10,12 +12,7 @@ build: pack: dotnet pack EduVpnCommon.csproj --configuration Release -test: -ifneq ($(EXPORTS_PATH),) -ifneq ($(wildcard $(EXPORTS_PATH)/Makefile),) - $(MAKE) -C "$(EXPORTS_PATH)" -endif -endif +test: .try_build_lib dotnet test clean: diff --git a/wrappers/csharp/README.md b/wrappers/csharp/README.md index 32d2330..553b123 100644 --- a/wrappers/csharp/README.md +++ b/wrappers/csharp/README.md @@ -22,8 +22,8 @@ Build as nupkg, including shared Go library for all platforms built in `exports/ make pack ``` -If you do not build this as part of the full repository, specify `EXPORTS_PATH="" EXPORTS_LIB_PATH="path/to/lib-folder"` -when calling make. +If you do not build this as part of the full repository, specify `EXPORTS_PATH="path/to/exports-folder"` +when calling make. This folder must contain `common.mk` and the `lib/` folder with built libraries. The wrapper targets .NET Standard 2.0, which means that it can be referenced by projects using either .NET Framework 4.6.1+, .NET Core 2.0+, or .NET 5+. -- cgit v1.2.3