2017-04-12 19:41:52 +03:00
|
|
|
all: bin/Debug/objcgen.exe shellcheck
|
2017-04-07 21:05:25 +03:00
|
|
|
|
2017-05-04 02:04:16 +03:00
|
|
|
-include Make.config.inc
|
|
|
|
|
2018-04-06 17:54:04 +03:00
|
|
|
PACKAGE_VERSION := $(shell grep "var version" ../build/Packaging.cake | cut -d \" -f 4)
|
2017-05-04 02:04:16 +03:00
|
|
|
PACKAGE_FULLVERSION=$(PACKAGE_VERSION).$(COMMIT_DISTANCE)
|
|
|
|
|
|
|
|
Make.config.inc: Makefile
|
|
|
|
@rm -f $@
|
|
|
|
@printf "COMMIT_DISTANCE:=$(shell LANG=C; export LANG && git log `git blame Makefile HEAD | grep PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
|
|
|
|
@printf "VERSION:=$(PACKAGE_VERSION).$(shell LANG=C; export LANG && git log `git blame Makefile HEAD | grep PACKAGE_VERSION= | sed 's/ .*//' `..HEAD --oneline | wc -l | sed 's/ //g')\n" >> $@
|
|
|
|
|
2017-04-07 21:05:25 +03:00
|
|
|
OBJCGEN_FILES := \
|
|
|
|
$(shell grep "Compile Include" *.csproj | grep -v Version.generated.cs | sed 's/.*Include="\(.*\)".*/\1/' | sed 's_\\_/_'g) \
|
|
|
|
$(shell grep "EmbeddedResource Include" *.csproj | sed 's/.*Include="\(.*\)".*/\1/' | sed 's_\\_/_'g) \
|
|
|
|
|
|
|
|
bin/Debug/objcgen.exe: $(OBJCGEN_FILES)
|
2017-11-15 19:51:01 +03:00
|
|
|
nuget restore ../Embeddinator-4000.sln
|
2017-04-12 15:49:38 +03:00
|
|
|
msbuild objcgen.csproj
|
2017-04-12 19:41:52 +03:00
|
|
|
|
|
|
|
SHELLCHECK:=$(shell which shellcheck)
|
|
|
|
shellcheck: thin-framework.sh
|
|
|
|
ifeq ($(SHELLCHECK),)
|
|
|
|
@echo No shellcheck tool found
|
|
|
|
else
|
|
|
|
$(SHELLCHECK) $^
|
|
|
|
endif
|
2017-05-04 02:04:16 +03:00
|
|
|
|
2017-05-08 21:41:16 +03:00
|
|
|
E4K_FRAMEWORK_DIR = /Library/Frameworks/Xamarin.Embeddinator-4000.framework
|
2018-04-06 17:54:04 +03:00
|
|
|
NUGET_DIR = _build/
|
|
|
|
|
|
|
|
nuget-prep:: bin/Debug/objcgen.exe Make.config.inc
|
|
|
|
mkdir -p $(NUGET_DIR)
|
|
|
|
cp bin/Debug/objcgen.{exe,pdb} $(NUGET_DIR)
|
|
|
|
cp bin/Debug/Mono.Options.dll $(NUGET_DIR)
|
|
|
|
cp bin/Debug/IKVM.Reflection.dll $(NUGET_DIR)
|
|
|
|
cp script/objcgen $(NUGET_DIR)
|
|
|
|
chmod +x $(NUGET_DIR)objcgen
|
|
|
|
|
|
|
|
nuget::
|
|
|
|
cd .. && ./build.sh -t Create-Package
|
|
|
|
|
|
|
|
nuget-install:: nuget
|
|
|
|
cp ../build/Embeddinator-4000.$(PACKAGE_VERSION).nupkg ~/nuget
|
|
|
|
|
|
|
|
clean-nuget::
|
2017-05-04 02:04:16 +03:00
|
|
|
rm -rf _build/
|
|
|
|
rm Make.config.inc
|
|
|
|
|
2018-04-06 17:54:04 +03:00
|
|
|
clean:: clean-nuget
|
|
|
|
msbuild objcgen.csproj /t:clean
|
|
|
|
rm -rf ./bin
|
|
|
|
rm -rf ./obj
|