diff options
author | Lluis Sanchez <slluis.devel@gmail.com> | 2014-06-04 12:02:58 +0400 |
---|---|---|
committer | Lluis Sanchez <lluis@xamarin.com> | 2014-06-04 14:16:27 +0400 |
commit | 877282d1ef48c2dd306e3c94216546181ee5d12c (patch) | |
tree | e3da373811c7f4e83c7aa2e67ae9f0bd012bbb15 | |
parent | 020e82cff9a8114b5186091f574b143f8230c4a2 (diff) |
Merge pull request #565 from tpokorra/TarballVersionConfigIssues
make dist generates a broken tarball: buildgen fails, and version.config is not found
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | main/Makefile.am | 4 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Core/BuildVariables.gen.cs | 8 |
3 files changed, 13 insertions, 2 deletions
@@ -77,6 +77,9 @@ dist: update_submodules remove-stale-tarballs dist-recursive @rm -rf tarballs/external @echo Decompressing monodevelop-$(PACKAGE_VERSION).tar.bz2 @cd tarballs && tar xvjf monodevelop-$(PACKAGE_VERSION).tar.bz2 + @cp version.config tarballs/monodevelop-$(PACKAGE_VERSION) + @cd main && make buildinfo + @cp main/build/bin/buildinfo tarballs/monodevelop-$(PACKAGE_VERSION)/ @echo Generating merged tarball @cd tarballs && tar -cjf monodevelop-$(PACKAGE_VERSION).tar.bz2 monodevelop-$(PACKAGE_VERSION) @cd tarballs && rm -rf monodevelop-$(PACKAGE_VERSION) diff --git a/main/Makefile.am b/main/Makefile.am index 25f753a494..5f36eb9c41 100644 --- a/main/Makefile.am +++ b/main/Makefile.am @@ -24,7 +24,9 @@ vcrevision: $(buildinfo): @mkdir -p "$(top_builddir)/build/bin" - @$(MD_CONFIGURE) gen-buildinfo "$(top_builddir)/build/bin" +# in a tarball, there is a generated buildinfo, which needs to be copied to the right place +# otherwise, the file buildinfo will be generated based on git revision etc. + @if test -f "$(top_srcdir)/buildinfo"; then cp "$(top_srcdir)/buildinfo" "$(top_builddir)/build/bin/buildinfo"; else $(MD_CONFIGURE) gen-buildinfo "$(top_builddir)/build/bin"; fi @echo "Updated build information" @cat $(buildinfo) diff --git a/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs b/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs index 4dc0f82825..15f8d980bc 100644 --- a/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs +++ b/main/src/core/MonoDevelop.Core/BuildVariables.gen.cs @@ -9,7 +9,13 @@ namespace Application public static void Main (string[] args) { var dir = args [0]; - var lines = File.ReadAllLines (Path.Combine (dir, "..", "..", "..", "..", "version.config")); + var pathVersionConfig = Path.Combine (dir, "..", "..", "..", "..", "version.config"); + if (!File.Exists(pathVersionConfig)) + { + // in a tarball, we have less depth in the directory hierarchy + pathVersionConfig = Path.Combine (dir, "..", "..", "..", "version.config"); + } + var lines = File.ReadAllLines (pathVersionConfig); var txt = File.ReadAllText (Path.Combine (dir, "BuildVariables.cs.in")); txt = txt.Replace ("@PACKAGE_VERSION@", GetValue (lines, "Version")); txt = txt.Replace ("@PACKAGE_VERSION_LABEL@", GetValue (lines, "Label")); |