branch: externals/csharp-mode commit 78293bd12afcadc5d337bc6e5e46c83005915291 Author: Jostein Kjønigsen <jost...@kjonigsen.net> Commit: Jostein Kjønigsen <jost...@kjonigsen.net>
Add proper makefile for creating and publishing packages. Based on template in elmarmelade-repo: https://github.com/nicferrier/elmarmalade/tree/master/demo-multifile Partly solves issue: https://github.com/josteink/csharp-mode/issues/6 --- csharp-mode-package-template.el | 4 +++ makefile | 60 +++++++++++++---------------------------- 2 files changed, 22 insertions(+), 42 deletions(-) diff --git a/csharp-mode-package-template.el b/csharp-mode-package-template.el new file mode 100644 index 0000000..9a7d092 --- /dev/null +++ b/csharp-mode-package-template.el @@ -0,0 +1,4 @@ +(define-package + "demo-multifile" + "VERSION" + "a demo multifile package.") diff --git a/makefile b/makefile index 64512e8..f2bf437 100644 --- a/makefile +++ b/makefile @@ -1,42 +1,18 @@ -_NETHOME=c:\.net3.5 -_NETSDK20=c:\netsdk2.0\bin -_NETSDK=c:\netsdk3.5\bin - -_CS_DBG_FLAGS=/debug:full /optimize- -_CS_DLL_FLAGS=/t:library $(_CS_DBG_FLAGS) -_CS_EXE_FLAGS=/t:exe $(_CS_DBG_FLAGS) - -_CSC=$(_NETHOME)\csc.exe - -!IFNDEF CONFIG -CONFIG=Release -!ENDIF - - -!IF "$(CONFIG)" == "Debug" -ADDL_DBG_DLLS=Ionic.CopyData.dll -ADDL_DBG_REFS=/R:ICSharpCode.NRefactory.dll /R:Ionic.CopyData.dll -ADDL_CSC_OPTIONS=/d:UseCopyData /d:CscompTrace -!Endif - - -default: CscompUtilities.dll - - -# debug: CscompUtilities.cs Ionic.CopyData.dll makefile -# $(_CSC) /d:UseCopyData /d:CscompTrace /t:library /debug:full /optimize- /R:Ionic.CopyData.dll /out:CscompUtilities.dll CscompUtilities.cs - - -CscompUtilities.dll: makefile CscompUtilities.cs ICSharpCode.NRefactory.dll \ - $(ADDL_DBG_DLLS) - $(_CSC) /noconfig $(ADDL_CSC_OPTIONS) /t:library /debug:full /optimize- \ - /platform:anycpu \ - /R:System.Core.dll /R:System.dll /R:System.Windows.Forms.dll \ - $(ADDL_DBG_REFS) \ - /R:ICSharpCode.NRefactory.dll /out:$@ CscompUtilities.cs - - -TestDll.exe: makefile TestDll.cs CscompUtilities.dll - $(_CSC) $(ADDL_CSC_OPTIONS) /t:exe /debug:full /optimize- \ - /R:CscompUtilities.dll /out:$@ TestDll.cs - +VERSION:=0.8.7 +PACKAGE_SHORTNAME=csharp-mode +PACKAGE_NAME:=$(PACKAGE_SHORTNAME)-$(VERSION) +PACKAGE_DIR:=/tmp/$(PACKAGE_NAME) + +package: $(PACKAGE_DIR) + tar cvf ../$(PACKAGE_NAME).tar --exclude="*#" --exclude="*~" -C $(PACKAGE_DIR)/.. $(PACKAGE_NAME) + +$(PACKAGE_DIR): + mkdir $@ + cp -r ../$(PACKAGE_SHORTNAME)/* $@ + sed -re "s/VERSION/$(VERSION)/" $@/$(PACKAGE_NAME)-package-template.el > $@/$(PACKAGE_NAME)-pkg.el + +clean: + rm -f ../$(PACKAGE_NAME).tar + rm -rf $(PACKAGE_DIR) + +# end