From 057908faa216f3a4dffd6a0859b90ca9b5b8b2b5 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Wed, 11 Apr 2018 14:04:18 +0200 Subject: [PATCH 1/3] [src] Fix rebuilding pdb files. There was a problem with the logic to install pdb files, where they'd only be touched if they already existed instead of updated. This causes frequent problems when building locally, because symbols would be out of date (resulting in build warnings, broken debugging, etc). Since it only happens when assemblies are rebuilt, this was not a problem for packages built on wrench. --- src/Makefile | 75 +++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 39 deletions(-) diff --git a/src/Makefile b/src/Makefile index 247df6952a9e..3c505ae4e5db 100644 --- a/src/Makefile +++ b/src/Makefile @@ -204,17 +204,15 @@ endef $(eval $(call IOS_LIBS_template,reference,--ns=ObjCRuntime,Xamarin.iOS.dll,MonoTouch.Dialog-1.dll,MonoTouch.NUnitLite.dll,-define:XAMCORE_2_0 -define:__UNIFIED__)) -$(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll: $(IOS_BUILD_DIR)/native-64/Xamarin.iOS.dll - $(Q) mkdir -p $(dir $@) +$(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll: $(IOS_BUILD_DIR)/native-64/Xamarin.iOS.dll | $(IOS_BUILD_DIR)/reference @# Don't strip, btouch-native needs to execute code from Xamarin.iOS, @# and that'll break if we strip out the code from the reference assembly. @# Note that there is only btouch-native executable for both 32 and 64 bits. @#$(Q_GEN) mono-cil-strip $< $@ $(Q) cp $< $@ - $(Q) cp $(<:.dll=.pdb) $(@:.dll=.pdb) -$(IOS_BUILD_DIR)/reference/Xamarin.iOS.pdb: $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll - @touch $@ +$(IOS_BUILD_DIR)/reference/Xamarin.iOS.pdb: $(IOS_BUILD_DIR)/native-64/Xamarin.iOS.pdb | $(IOS_BUILD_DIR)/reference + $(Q) cp $< $@ $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1/% : $(MACIOS_BINARIES_PATH)/% | $(IOS_DESTDIR)$(MONOTOUCH_PREFIX)/lib/mono/2.1 $(Q) cp $< $@ @@ -269,15 +267,17 @@ IOS_EXTRA_SYSTEM_NET_HTTP_FILES = \ $(abspath $(TOP)/src/ObjCRuntime/RuntimeOptions.cs) \ # build (into custom LIBRARY_SUBDIR) -$(MONO_PATH)/mcs/class/lib/monotouch/reference/System.Net.Http.dll: $(IOS_EXTRA_SYSTEM_NET_HTTP_FILES) $(MONO_PATH)/mcs/class/lib/monotouch/System.Net.Http.dll $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll +$(MONO_PATH)/mcs/class/lib/monotouch/reference/System.Net.Http%dll $(MONO_PATH)/mcs/class/lib/monotouch/reference/System.Net.Http%pdb: $(IOS_EXTRA_SYSTEM_NET_HTTP_FILES) $(MONO_PATH)/mcs/class/lib/monotouch/System.Net.Http.dll $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll $(call Q_PROF_CSC,ios/unified) $(MAKE) $(if $(V),,-s) -C $(MONO_PATH)/mcs/class/System.Net.Http PROFILE=monotouch LIBRARY_SUBDIR=reference MONOTOUCH_MCS_FLAGS=$(IOS_CSC_FLAGS) EXTRA_LIB_MCS_FLAGS="-r:$(abspath $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll) $(IOS_EXTRA_SYSTEM_NET_HTTP_FILES) -D:XAMCORE_2_0 -D:XAMARIN_MODERN -D:SYSTEM_NET_HTTP -D:UNIFIED -D:__UNIFIED__" - $(Q) touch $@ - -$(MONO_PATH)/mcs/class/lib/monotouch/reference/System.Net.Http.pdb: $(MONO_PATH)/mcs/class/lib/monotouch/reference/System.Net.Http.dll - @touch $@ + @# If the make we executed didn't result in building the dll/pdb (because make determined it wasn't necessary to rebuild), + @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look + @# rebuilt to make. Unfortunately there's no special variable that means "all targets", $@ only means "target that triggered the rule", + @# which can be either the dll or the pdb. So add some weird logic to make sure we touch both the dll and the pdb in either case + @# (we'll touch one of them twice, but that shouldn't be a problem) + $(Q) touch $@ $(@:.dll=.pdb) $(@:.pdb=.dll) # sign dll (one target for both compat+reference) -$(IOS_BUILD_DIR)/%/System.Net.Http.dll: $(MONO_PATH)/mcs/class/lib/monotouch/%/System.Net.Http.dll +$(IOS_BUILD_DIR)/%/System.Net.Http.dll: $(MONO_PATH)/mcs/class/lib/monotouch/%/System.Net.Http.dll | $(IOS_BUILD_DIR)/compat $(IOS_BUILD_DIR)/reference $(Q) cp $< $@ $(call Q_PROF_SN,ios/$@) MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -R $@ $(PRODUCT_KEY_PATH) @@ -799,16 +799,13 @@ $(WATCH_BUILD_DIR)/watch/generated_sources: $(WATCH_GENERATOR) $(WATCHOS_APIS) $ $(WATCHOS_APIS) \ --target-framework=Xamarin.WatchOS,v1.0 \ -$(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS.dll: $(WATCHOS_SOURCES) $(WATCH_BUILD_DIR)/watch/generated_sources $(PRODUCT_KEY_PATH) | $(WATCH_BUILD_DIR)/watch-32 +$(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS%dll $(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS%pdb: $(WATCHOS_SOURCES) $(WATCH_BUILD_DIR)/watch/generated_sources $(PRODUCT_KEY_PATH) | $(WATCH_BUILD_DIR)/watch-32 $(call Q_PROF_CSC,watch) $(WATCH_CSC) -out:$@ -target:library -debug -unsafe -optimize \ -publicsign -keyfile:$(PRODUCT_KEY_PATH) $(WATCH_DEFINES) \ $(ARGS_32) \ -nowarn:219,618,114,414,1635,3021,$(IOS_WARNINGS_THAT_YOU_SHOULD_FIX) \ $(WATCHOS_SOURCES) @$(WATCH_BUILD_DIR)/watch/generated_sources -$(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS.pdb: $(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS.dll - @touch $@ - $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll: $(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS.dll | $(WATCH_BUILD_DIR)/reference @# Don't strip, bwatch needs to execute code from Xamarin.WatchOS (attributes), @# and that'll break if we strip out the code from the reference assembly. @@ -820,16 +817,13 @@ $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.pdb: $(WATCH_BUILD_DIR)/watch-32/Xa $(Q) cp $< $@ # MonoTouch.NUnitLite -$(WATCH_BUILD_DIR)/reference/MonoTouch.NUnitLite.dll: $(WATCHOS_TOUCHUNIT_SOURCES) $(PRODUCT_KEY_PATH) $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll +$(WATCH_BUILD_DIR)/reference/MonoTouch.NUnitLite%dll $(WATCH_BUILD_DIR)/reference/MonoTouch.NUnitLite%pdb: $(WATCHOS_TOUCHUNIT_SOURCES) $(PRODUCT_KEY_PATH) $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll $(call Q_PROF_CSC,watch) $(SYSTEM_CSC) -out:$@ -target:library -debug:portable -optimize -publicsign -noconfig -nostdlib \ -keyfile:$(PRODUCT_KEY_PATH) -r:$(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/mscorlib.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.Xml.dll \ -nowarn:3006,612,649,414,1635 \ -define:NUNITLITE,CLR_4_0,NET_4_5,__MOBILE__ $(WATCH_DEFINES) \ $(WATCHOS_TOUCHUNIT_SOURCES) -$(WATCH_BUILD_DIR)/reference/MonoTouch.NUnitLite.pdb: $(WATCH_BUILD_DIR)/reference/MonoTouch.NUnitLite.dll - @touch $@ - # System.Drawing.Primitives.dll is special $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference_Facades/System.Drawing.Primitives.dll: $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll @@ -856,19 +850,21 @@ WATCH_EXTRA_SYSTEM_NET_HTTP_FILES = \ $(abspath $(TOP)/src/ObjCRuntime/RuntimeOptions.cs) \ # build (into custom LIBRARY_SUBDIR) -$(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.dll: $(WATCH_EXTRA_SYSTEM_NET_HTTP_FILES) $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/System.Net.Http.dll $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll +$(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http%dll $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http%pdb: $(WATCH_EXTRA_SYSTEM_NET_HTTP_FILES) $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/System.Net.Http.dll $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll $(call Q_PROF_CSC,watch) $(MAKE) $(if $(V),,-s) -C $(WATCH_MONO_PATH)/mcs/class/System.Net.Http PROFILE=monotouch_watch LIBRARY_SUBDIR=reference MONOTOUCH_MCS_FLAGS=$(IOS_CSC_FLAGS) EXTRA_LIB_MCS_FLAGS="-r:$(abspath $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll) $(WATCH_EXTRA_SYSTEM_NET_HTTP_FILES) -D:XAMCORE_2_0 -D:XAMCORE_3_0 -D:XAMARIN_MODERN -D:SYSTEM_NET_HTTP -D:UNIFIED -D:__UNIFIED__" - $(Q) touch $@ - -$(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.pdb: $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.dll - @touch $@ + @# If the make we executed didn't result in building the dll/pdb (because make determined it wasn't necessary to rebuild), + @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look + @# rebuilt to make. Unfortunately there's no special variable that means "all targets", $@ only means "target that triggered the rule", + @# which can be either the dll or the pdb. So add some weird logic to make sure we touch both the dll and the pdb in either case + @# (we'll touch one of them twice, but that shouldn't be a problem) + $(Q) touch $@ $(@:.dll=.pdb) $(@:.pdb=.dll) # sign dll -$(WATCH_BUILD_DIR)/reference/System.Net.Http.dll: $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.dll +$(WATCH_BUILD_DIR)/reference/System.Net.Http.dll: $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.dll | $(WATCH_BUILD_DIR)/reference $(Q) cp $< $@ $(call Q_PROF_SN,watch) MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -R $@ $(PRODUCT_KEY_PATH) -$(WATCH_BUILD_DIR)/reference/System.Net.Http.pdb: $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.pdb +$(WATCH_BUILD_DIR)/reference/System.Net.Http.pdb: $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.pdb | $(WATCH_BUILD_DIR)/reference $(Q) cp $< $@ xamwatch.csproj: xamwatch.tmpl.csproj Makefile $(wildcard $(TOP)/*.sources) @@ -1019,7 +1015,7 @@ $(TVOS_BUILD_DIR)/tvos/generated_sources: $(TVOS_GENERATOR) $(TVOS_APIS) $(TVOS_ $(TVOS_APIS) \ --target-framework=Xamarin.TVOS,v1.0 \ -$(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS.dll: $(TVOS_SOURCES) $(TVOS_BUILD_DIR)/tvos/generated_sources $(PRODUCT_KEY_PATH) | $(TVOS_BUILD_DIR)/tvos-64 +$(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS%dll $(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS%pdb: $(TVOS_SOURCES) $(TVOS_BUILD_DIR)/tvos/generated_sources $(PRODUCT_KEY_PATH) | $(TVOS_BUILD_DIR)/tvos-64 $(call Q_PROF_CSC,tvos) $(TV_CSC) -out:$@ -target:library -debug -unsafe -optimize \ -publicsign -keyfile:$(PRODUCT_KEY_PATH) $(TVOS_DEFINES) \ -r:$(TVOS_LIBDIR)/Mono.Security.dll \ @@ -1027,9 +1023,6 @@ $(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS.dll: $(TVOS_SOURCES) $(TVOS_BUILD_DIR)/tv -nowarn:219,618,114,414,1635,3021,$(IOS_WARNINGS_THAT_YOU_SHOULD_FIX) \ $(TVOS_SOURCES) @$(TVOS_BUILD_DIR)/tvos/generated_sources -$(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS.pdb: $(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS.dll - @touch $@ - $(TVOS_BUILD_DIR)/reference/Xamarin.TVOS.dll: $(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS.dll | $(TVOS_BUILD_DIR)/reference @# Don't strip, btv needs to execute code from Xamarin.TVOS (attributes), @# and that'll break if we strip out the code from the reference assembly. @@ -1087,18 +1080,22 @@ TVOS_EXTRA_SYSTEM_NET_HTTP_FILES = \ $(abspath $(TOP)/src/ObjCRuntime/RuntimeOptions.cs) \ # build (into custom LIBRARY_SUBDIR) -$(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http.dll: $(TVOS_EXTRA_SYSTEM_NET_HTTP_FILES) $(MONO_PATH)/mcs/class/lib/monotouch_tv/System.Net.Http.dll $(TVOS_BUILD_DIR)/reference/Xamarin.TVOS.dll +$(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http%dll $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http%pdb: $(TVOS_EXTRA_SYSTEM_NET_HTTP_FILES) $(MONO_PATH)/mcs/class/lib/monotouch_tv/System.Net.Http.dll $(TVOS_BUILD_DIR)/reference/Xamarin.TVOS.dll $(call Q_PROF_CSC,tvos) $(MAKE) $(if $(V),,-s) -C $(MONO_PATH)/mcs/class/System.Net.Http PROFILE=monotouch_tv LIBRARY_SUBDIR=reference MONOTOUCH_MCS_FLAGS=$(IOS_CSC_FLAGS) EXTRA_LIB_MCS_FLAGS="-r:$(abspath $(TVOS_BUILD_DIR)/reference/Xamarin.TVOS.dll) $(TVOS_EXTRA_SYSTEM_NET_HTTP_FILES) -D:XAMCORE_2_0 -D:XAMCORE_3_0 -D:XAMARIN_MODERN -D:SYSTEM_NET_HTTP -D:UNIFIED -D:__UNIFIED__" - $(Q) touch $@ - -$(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http.pdb: $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http.dll - @touch $@ + @# If the make we executed didn't result in building the dll/pdb (because make determined it wasn't necessary to rebuild), + @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look + @# rebuilt to make. Unfortunately there's no special variable that means "all targets", $@ only means "target that triggered the rule", + @# which can be either the dll or the pdb. So add some weird logic to make sure we touch both the dll and the pdb in either case + @# (we'll touch one of them twice, but that shouldn't be a problem) + $(Q) touch $@ $(@:.dll=.pdb) $(@:.pdb=.dll) # sign dll -$(TVOS_BUILD_DIR)/reference/System.Net.Http%dll $(TVOS_BUILD_DIR)/reference/System.Net.Http%pdb: $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http.dll - $(Q) cp $< $(basename $@).dll - $(call Q_PROF_SN,tvos) MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -R $(basename $@).dll $(PRODUCT_KEY_PATH) - $(Q) cp $(basename $<).pdb $(basename $@).pdb +$(TVOS_BUILD_DIR)/reference/System.Net.Http.dll: $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http.dll | $(TVOS_BUILD_DIR)/reference + $(Q) cp $< $@ + $(call Q_PROF_SN,tvos) MONO_CFG_DIR=$(TOP) $(SYSTEM_SN) -q -R $@ $(PRODUCT_KEY_PATH) + +$(TVOS_BUILD_DIR)/reference/System.Net.Http.pdb: $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http.pdb | $(TVOS_BUILD_DIR)/reference + $(Q) cp $< $@ xamtvos.csproj: xamtvos.tmpl.csproj Makefile $(wildcard $(TOP)/*.sources) @sed -e 's**$(foreach file,$(TVOS_SOURCES),)*' -e 's**$(foreach file,$(TVOS_APIS),)*' $< | xmllint --format - > $@ From f346c6f3eeacb458f0c79da0ffe39b99352426bc Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 19 Apr 2018 22:01:24 +0200 Subject: [PATCH 2/3] Make sure to specify the right output file. --- src/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 3c505ae4e5db..fc328f272954 100644 --- a/src/Makefile +++ b/src/Makefile @@ -800,7 +800,7 @@ $(WATCH_BUILD_DIR)/watch/generated_sources: $(WATCH_GENERATOR) $(WATCHOS_APIS) $ --target-framework=Xamarin.WatchOS,v1.0 \ $(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS%dll $(WATCH_BUILD_DIR)/watch-32/Xamarin.WatchOS%pdb: $(WATCHOS_SOURCES) $(WATCH_BUILD_DIR)/watch/generated_sources $(PRODUCT_KEY_PATH) | $(WATCH_BUILD_DIR)/watch-32 - $(call Q_PROF_CSC,watch) $(WATCH_CSC) -out:$@ -target:library -debug -unsafe -optimize \ + $(call Q_PROF_CSC,watch) $(WATCH_CSC) -out:$(basename $@).dll -target:library -debug -unsafe -optimize \ -publicsign -keyfile:$(PRODUCT_KEY_PATH) $(WATCH_DEFINES) \ $(ARGS_32) \ -nowarn:219,618,114,414,1635,3021,$(IOS_WARNINGS_THAT_YOU_SHOULD_FIX) \ @@ -818,7 +818,7 @@ $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.pdb: $(WATCH_BUILD_DIR)/watch-32/Xa # MonoTouch.NUnitLite $(WATCH_BUILD_DIR)/reference/MonoTouch.NUnitLite%dll $(WATCH_BUILD_DIR)/reference/MonoTouch.NUnitLite%pdb: $(WATCHOS_TOUCHUNIT_SOURCES) $(PRODUCT_KEY_PATH) $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll - $(call Q_PROF_CSC,watch) $(SYSTEM_CSC) -out:$@ -target:library -debug:portable -optimize -publicsign -noconfig -nostdlib \ + $(call Q_PROF_CSC,watch) $(SYSTEM_CSC) -out:$(basename $@).dll -target:library -debug:portable -optimize -publicsign -noconfig -nostdlib \ -keyfile:$(PRODUCT_KEY_PATH) -r:$(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/mscorlib.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.dll -r:$(MONOTOUCH_WATCH_MONO_PATH)/System.Xml.dll \ -nowarn:3006,612,649,414,1635 \ -define:NUNITLITE,CLR_4_0,NET_4_5,__MOBILE__ $(WATCH_DEFINES) \ @@ -1016,7 +1016,7 @@ $(TVOS_BUILD_DIR)/tvos/generated_sources: $(TVOS_GENERATOR) $(TVOS_APIS) $(TVOS_ --target-framework=Xamarin.TVOS,v1.0 \ $(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS%dll $(TVOS_BUILD_DIR)/tvos-64/Xamarin.TVOS%pdb: $(TVOS_SOURCES) $(TVOS_BUILD_DIR)/tvos/generated_sources $(PRODUCT_KEY_PATH) | $(TVOS_BUILD_DIR)/tvos-64 - $(call Q_PROF_CSC,tvos) $(TV_CSC) -out:$@ -target:library -debug -unsafe -optimize \ + $(call Q_PROF_CSC,tvos) $(TV_CSC) -out:$(basename $@).dll -target:library -debug -unsafe -optimize \ -publicsign -keyfile:$(PRODUCT_KEY_PATH) $(TVOS_DEFINES) \ -r:$(TVOS_LIBDIR)/Mono.Security.dll \ $(ARGS_64) \ From 9191eaf47490b702498c945d76a08dd498bc11cc Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Thu, 19 Apr 2018 22:03:49 +0200 Subject: [PATCH 3/3] Simplify a bit. --- src/Makefile | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/src/Makefile b/src/Makefile index fc328f272954..f38eab982927 100644 --- a/src/Makefile +++ b/src/Makefile @@ -270,11 +270,8 @@ IOS_EXTRA_SYSTEM_NET_HTTP_FILES = \ $(MONO_PATH)/mcs/class/lib/monotouch/reference/System.Net.Http%dll $(MONO_PATH)/mcs/class/lib/monotouch/reference/System.Net.Http%pdb: $(IOS_EXTRA_SYSTEM_NET_HTTP_FILES) $(MONO_PATH)/mcs/class/lib/monotouch/System.Net.Http.dll $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll $(call Q_PROF_CSC,ios/unified) $(MAKE) $(if $(V),,-s) -C $(MONO_PATH)/mcs/class/System.Net.Http PROFILE=monotouch LIBRARY_SUBDIR=reference MONOTOUCH_MCS_FLAGS=$(IOS_CSC_FLAGS) EXTRA_LIB_MCS_FLAGS="-r:$(abspath $(IOS_BUILD_DIR)/reference/Xamarin.iOS.dll) $(IOS_EXTRA_SYSTEM_NET_HTTP_FILES) -D:XAMCORE_2_0 -D:XAMARIN_MODERN -D:SYSTEM_NET_HTTP -D:UNIFIED -D:__UNIFIED__" @# If the make we executed didn't result in building the dll/pdb (because make determined it wasn't necessary to rebuild), - @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look - @# rebuilt to make. Unfortunately there's no special variable that means "all targets", $@ only means "target that triggered the rule", - @# which can be either the dll or the pdb. So add some weird logic to make sure we touch both the dll and the pdb in either case - @# (we'll touch one of them twice, but that shouldn't be a problem) - $(Q) touch $@ $(@:.dll=.pdb) $(@:.pdb=.dll) + @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look rebuilt to make. + $(Q) touch $(basename $@).dll $(basename $@).pdb # sign dll (one target for both compat+reference) $(IOS_BUILD_DIR)/%/System.Net.Http.dll: $(MONO_PATH)/mcs/class/lib/monotouch/%/System.Net.Http.dll | $(IOS_BUILD_DIR)/compat $(IOS_BUILD_DIR)/reference @@ -853,11 +850,8 @@ WATCH_EXTRA_SYSTEM_NET_HTTP_FILES = \ $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http%dll $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http%pdb: $(WATCH_EXTRA_SYSTEM_NET_HTTP_FILES) $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/System.Net.Http.dll $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll $(call Q_PROF_CSC,watch) $(MAKE) $(if $(V),,-s) -C $(WATCH_MONO_PATH)/mcs/class/System.Net.Http PROFILE=monotouch_watch LIBRARY_SUBDIR=reference MONOTOUCH_MCS_FLAGS=$(IOS_CSC_FLAGS) EXTRA_LIB_MCS_FLAGS="-r:$(abspath $(WATCH_BUILD_DIR)/reference/Xamarin.WatchOS.dll) $(WATCH_EXTRA_SYSTEM_NET_HTTP_FILES) -D:XAMCORE_2_0 -D:XAMCORE_3_0 -D:XAMARIN_MODERN -D:SYSTEM_NET_HTTP -D:UNIFIED -D:__UNIFIED__" @# If the make we executed didn't result in building the dll/pdb (because make determined it wasn't necessary to rebuild), - @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look - @# rebuilt to make. Unfortunately there's no special variable that means "all targets", $@ only means "target that triggered the rule", - @# which can be either the dll or the pdb. So add some weird logic to make sure we touch both the dll and the pdb in either case - @# (we'll touch one of them twice, but that shouldn't be a problem) - $(Q) touch $@ $(@:.dll=.pdb) $(@:.pdb=.dll) + @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look rebuilt to make. + $(Q) touch $(basename $@).dll $(basename $@).pdb # sign dll $(WATCH_BUILD_DIR)/reference/System.Net.Http.dll: $(WATCH_MONO_PATH)/mcs/class/lib/monotouch_watch/reference/System.Net.Http.dll | $(WATCH_BUILD_DIR)/reference @@ -1083,11 +1077,8 @@ TVOS_EXTRA_SYSTEM_NET_HTTP_FILES = \ $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http%dll $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http%pdb: $(TVOS_EXTRA_SYSTEM_NET_HTTP_FILES) $(MONO_PATH)/mcs/class/lib/monotouch_tv/System.Net.Http.dll $(TVOS_BUILD_DIR)/reference/Xamarin.TVOS.dll $(call Q_PROF_CSC,tvos) $(MAKE) $(if $(V),,-s) -C $(MONO_PATH)/mcs/class/System.Net.Http PROFILE=monotouch_tv LIBRARY_SUBDIR=reference MONOTOUCH_MCS_FLAGS=$(IOS_CSC_FLAGS) EXTRA_LIB_MCS_FLAGS="-r:$(abspath $(TVOS_BUILD_DIR)/reference/Xamarin.TVOS.dll) $(TVOS_EXTRA_SYSTEM_NET_HTTP_FILES) -D:XAMCORE_2_0 -D:XAMCORE_3_0 -D:XAMARIN_MODERN -D:SYSTEM_NET_HTTP -D:UNIFIED -D:__UNIFIED__" @# If the make we executed didn't result in building the dll/pdb (because make determined it wasn't necessary to rebuild), - @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look - @# rebuilt to make. Unfortunately there's no special variable that means "all targets", $@ only means "target that triggered the rule", - @# which can be either the dll or the pdb. So add some weird logic to make sure we touch both the dll and the pdb in either case - @# (we'll touch one of them twice, but that shouldn't be a problem) - $(Q) touch $@ $(@:.dll=.pdb) $(@:.pdb=.dll) + @# then this make can end up confused and in an infinite loop. So touch the output files, to make sure they look rebuilt to make. + $(Q) touch $(basename $@).dll $(basename $@).pdb # sign dll $(TVOS_BUILD_DIR)/reference/System.Net.Http.dll: $(MONO_PATH)/mcs/class/lib/monotouch_tv/reference/System.Net.Http.dll | $(TVOS_BUILD_DIR)/reference