build: Fix references to AssemblyInfo.cs in makefiles on Windows
On Windows with MinGW, csc.exe is confused by paths like "../AssemblyInfo.cs", so we need some trickery to have something that works on both Linux and Windows. This isn't pretty, but it's the best solution I could find right now. The other approach would have been to go back to copying AssemblyInfo.cs around, but that has it's own set of issues.
This commit is contained in:
parent
398dc4aaf7
commit
8885fa98af
4 changed files with 9 additions and 6 deletions
|
@ -49,12 +49,12 @@ policy.%.config: $(top_builddir)/policy.config
|
|||
$(POLICY_ASSEMBLIES) : policy.%.$(ASSEMBLY): policy.%.config $(SNK)
|
||||
$(AL) -link:policy.$*.config -out:$@ -keyfile:$(SNK)
|
||||
|
||||
build_sources = $(addprefix $(srcdir)/, $(sources)) $(top_builddir)/AssemblyInfo.cs
|
||||
build_sources = $(addprefix $(srcdir)/, $(sources))
|
||||
build_references = $(addprefix -r:, $(references)) $(MONO_CAIRO_LIBS)
|
||||
|
||||
$(ASSEMBLY): generated-stamp $(SNK) $(build_sources) $(references)
|
||||
@rm -f $(ASSEMBLY).mdb
|
||||
$(CSC) $(CSFLAGS) -keyfile:$(SNK) -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(build_references) $(GENERATED_SOURCES) $(build_sources)
|
||||
$(CSC) $(CSFLAGS) -keyfile:$(SNK) -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(build_references) $(GENERATED_SOURCES) $(build_sources) $(top_builddir)$(ASSEMBLYINFO)
|
||||
|
||||
install-data-local:
|
||||
@if test -n '$(pkg)'; then \
|
||||
|
|
|
@ -111,6 +111,7 @@ fi
|
|||
if test "x$has_mono" = "xtrue"; then
|
||||
GACUTIL_FLAGS='/package $(PACKAGE_VERSION) /gacdir $(DESTDIR)$(prefix)/lib'
|
||||
GENERATED_SOURCES=generated/*.cs
|
||||
ASSEMBLYINFO=/AssemblyInfo.cs
|
||||
AC_PATH_PROG(RUNTIME, mono, no)
|
||||
|
||||
# libmono and glib required for gui-thread-check profiler module
|
||||
|
@ -143,6 +144,7 @@ AC_PATH_PROG(CSC, csc.exe, no)
|
|||
CSFLAGS="-nologo -platform:x86"
|
||||
GACUTIL_FLAGS=
|
||||
GENERATED_SOURCES=generated\\\\*.cs
|
||||
ASSEMBLYINFO=\\\\AssemblyInfo.cs
|
||||
AM_CONDITIONAL(ENABLE_THREADCHECK, false)
|
||||
enable_dotnet=yes
|
||||
|
||||
|
@ -163,6 +165,7 @@ AC_SUBST(GACUTIL_FLAGS)
|
|||
AC_SUBST(LIB_PREFIX)
|
||||
AC_SUBST(LIB_SUFFIX)
|
||||
AC_SUBST(GENERATED_SOURCES)
|
||||
AC_SUBST(ASSEMBLYINFO)
|
||||
|
||||
GTK_REQUIRED_VERSION=3.0.0
|
||||
GLIB_REQUIRED_VERSION=2.28.0
|
||||
|
|
|
@ -94,7 +94,7 @@ sources = \
|
|||
Variant.cs \
|
||||
VariantType.cs
|
||||
|
||||
build_sources = $(addprefix $(srcdir)/, $(sources)) $(top_builddir)/AssemblyInfo.cs
|
||||
build_sources = $(addprefix $(srcdir)/, $(sources))
|
||||
dist_sources = $(sources)
|
||||
|
||||
EXTRA_DIST = \
|
||||
|
@ -105,7 +105,7 @@ EXTRA_DIST = \
|
|||
|
||||
$(ASSEMBLY): $(build_sources) $(SNK)
|
||||
@rm -f $(ASSEMBLY).mdb
|
||||
$(CSC) $(CSFLAGS) -keyfile:$(SNK) -unsafe -out:$(ASSEMBLY) -target:library $(references) $(build_sources)
|
||||
$(CSC) $(CSFLAGS) -keyfile:$(SNK) -unsafe -out:$(ASSEMBLY) -target:library $(references) $(build_sources) $(top_builddir)$(ASSEMBLYINFO)
|
||||
|
||||
policy.%.config: $(top_builddir)/policy.config
|
||||
sed -e "s/@ASSEMBLY_NAME@/$(ASSEMBLY_NAME)/" -e "s/@POLICY@/$*/" $(top_builddir)/policy.config > $@
|
||||
|
|
|
@ -24,7 +24,7 @@ sources = \
|
|||
Graphics.cs \
|
||||
StyleContextExtensions.cs
|
||||
|
||||
build_sources = $(addprefix $(srcdir)/, $(sources)) $(top_builddir)/AssemblyInfo.cs
|
||||
build_sources = $(addprefix $(srcdir)/, $(sources))
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(sources) \
|
||||
|
@ -33,7 +33,7 @@ EXTRA_DIST = \
|
|||
|
||||
$(ASSEMBLY): $(build_sources) $(references) $(SNK)
|
||||
@rm -f $(ASSEMBLY).mdb
|
||||
$(CSC) $(CSFLAGS) -keyfile:$(SNK) -nowarn:0169,0612,0618 -out:$(ASSEMBLY) -target:library $(build_references) $(build_sources)
|
||||
$(CSC) $(CSFLAGS) -keyfile:$(SNK) -nowarn:0169,0612,0618 -out:$(ASSEMBLY) -target:library $(build_references) $(build_sources) $(top_builddir)$(ASSEMBLYINFO)
|
||||
|
||||
policy.%.config: $(top_builddir)/policy.config
|
||||
sed -e "s/@ASSEMBLY_NAME@/$(ASSEMBLY_NAME)/" -e "s/@POLICY@/$*/" $(top_builddir)/policy.config > $@
|
||||
|
|
Loading…
Reference in a new issue