2020-05-13 16:23:29 +03:00
TOP = ..
i n c l u d e $( TOP ) / M a k e . c o n f i g
i n c l u d e $( TOP ) / m k / r u l e s . m k
2020-09-18 18:41:33 +03:00
DOTNET_MANIFESTS_PATH = $( DOTNET6_DIR) /sdk-manifests/$( DOTNET6_VERSION_BAND)
DOTNET_PACKS_PATH = $( DOTNET6_DIR) /packs
2020-10-15 12:45:36 +03:00
TMP_PKG_DIR = _pkg
2020-10-15 12:38:29 +03:00
2020-10-15 12:35:03 +03:00
# Create variables prefixed with the correctly cased platform name from the upper-cased platform name. This makes some of the next sections somewhat simpler.
$(foreach platform,$(DOTNET_PLATFORMS),$(eval $(platform)_NUGET_VERSION_NO_METADATA : =$( $ ( shell echo $ ( platform ) | tr a -z A -Z ) _NUGET_VERSION_NO_METADATA ) ))
2020-06-04 17:39:19 +03:00
d e f i n e D e f i n e T a r g e t s
$(1)_NUGET_TARGETS = \
2020-10-15 12:46:16 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/Sdk/AutoImport.props \
2020-11-05 12:06:45 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/Sdk/Sdk.props \
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Microsoft.$( 1) .Sdk.SupportedTargetPlatforms.props \
2020-06-04 17:39:19 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Microsoft.$( 1) .Sdk.DefaultItems.props \
2020-11-05 12:06:45 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Microsoft.$( 1) .Sdk.props \
2021-02-11 22:17:12 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Microsoft.$( 1) .Sdk.Versions.props \
2020-06-04 17:39:19 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Microsoft.$( 1) .Sdk.targets \
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Xamarin.Shared.Sdk.DefaultItems.targets \
2020-11-05 12:06:45 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Xamarin.Shared.Sdk.TargetFrameworkInference.props \
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Xamarin.Shared.Sdk.props \
2020-06-04 17:39:19 +03:00
$( DOTNET_DESTDIR) /Microsoft.$( 1) .Sdk/targets/Xamarin.Shared.Sdk.targets \
2021-02-11 22:17:12 +03:00
2020-06-04 17:39:19 +03:00
e n d e f
2020-06-15 18:47:18 +03:00
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call DefineTargets ,$ ( platform ) ) ) )
2020-05-13 16:23:29 +03:00
DIRECTORIES += \
$( DOTNET_NUPKG_DIR) \
2020-10-15 12:45:36 +03:00
$( DOTNET_PKG_DIR) \
2020-05-13 16:23:29 +03:00
$( DOTNET_FEED_DIR) \
2020-06-15 18:47:18 +03:00
$( foreach platform,$( DOTNET_PLATFORMS) ,$( DOTNET_DESTDIR) /Microsoft.$( platform) .Sdk/Sdk) \
$( foreach platform,$( DOTNET_PLATFORMS) ,$( DOTNET_DESTDIR) /Microsoft.$( platform) .Sdk/targets) \
2020-10-15 12:38:29 +03:00
$( DOTNET_MANIFESTS_PATH) \
2020-10-15 12:39:20 +03:00
$( DOTNET_PACKS_PATH) \
$( foreach platform,$( DOTNET_PLATFORMS) ,$( DOTNET_PACKS_PATH) /Microsoft.$( platform) .Sdk) \
$( foreach platform,$( DOTNET_PLATFORMS) ,$( DOTNET_PACKS_PATH) /Microsoft.$( platform) .Ref) \
2020-10-15 12:45:36 +03:00
$( TMP_PKG_DIR) \
2020-05-13 16:23:29 +03:00
$(DIRECTORIES) :
$( Q) mkdir -p $@
CURRENT_HASH_LONG := $( shell git log -1 --pretty= %H)
2020-06-15 18:47:18 +03:00
$(DOTNET_DESTDIR)/Microsoft.% : Microsoft .% | $( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( DOTNET_DESTDIR ) /Microsoft .$ ( platform ) .Sdk /Sdk $ ( DOTNET_DESTDIR ) /Microsoft .$ ( platform ) .Sdk /targets )
2020-05-25 16:22:29 +03:00
$( Q) $( CP) $< $@
2021-02-11 22:17:12 +03:00
d e f i n e C o p y T a r g e t s
$$ (DOTNET_DESTDIR)/Microsoft.$(1).Sdk/targets/% : targets /% | $$( DOTNET_DESTDIR ) /Microsoft .$( 1) .Sdk /targets
$$ ( Q) $$ ( CP) $$ < $$ @
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call CopyTargets ,$ ( platform ) ) ) )
2020-05-25 16:22:29 +03:00
2021-02-11 22:17:12 +03:00
d e f i n e V e r s i o n s T e m p l a t e
targets/Microsoft.$(1).Sdk.Versions.props : targets /Microsoft .Sdk .Versions .template .props Makefile $( TOP ) /Make .config .inc $( TOP ) /.git /HEAD $( TOP ) /.git /index
$$ ( Q_GEN) sed \
-e " s/@PLATFORM@/ $( 1) /g " \
-e " s/@NUGET_VERSION_NO_METADATA@/ $$ ( $( 2) _NUGET_VERSION_NO_METADATA)/g " \
-e " s/@NUGET_VERSION_FULL@/ $$ ( $( 2) _NUGET_VERSION_FULL)/g " \
-e " s/@DEFAULT_TARGET_PLATFORM_VERSION@/ $$ (DEFAULT_TARGET_PLATFORM_VERSION_ $( 2) )/g " \
-e " s/@CURRENT_BRANCH@/ $$ (CURRENT_BRANCH_SED_ESCAPED)/g " \
-e " s/@CURRENT_HASH_LONG@/ $$ (CURRENT_HASH_LONG)/g " \
$$ < > $$ @.tmp
$$ ( Q) mv $$ @.tmp $$ @
2020-05-25 16:22:29 +03:00
2021-02-11 22:17:12 +03:00
Microsoft.$1.Sdk/targets/Microsoft.$1.Sdk.Versions.props : targets /Microsoft .$1.Sdk .Versions .props
$$ ( Q) $$ ( CP) $$ < $$ @
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call VersionsTemplate ,$ ( platform ) ,$ ( shell echo $ ( platform ) | tr a -z A -Z ) ) ) )
2020-05-13 16:23:29 +03:00
2020-10-15 19:48:29 +03:00
d e f i n e D e f a u l t I t e m s
Microsoft.$1.Sdk/targets/Microsoft.$1.Sdk.DefaultItems.props : targets /Microsoft .Sdk .DefaultItems .template .props Makefile
$$ ( Q_GEN) sed \
-e " s/@PLATFORM@/ $1 /g " \
$$ < > $$ @
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call DefaultItems ,$ ( platform ) ) ) )
2020-08-31 10:27:19 +03:00
d e f i n e S u p p o r t e d T a r g e t P l a t f o r m s
2020-11-05 12:06:45 +03:00
Microsoft.$(1).Sdk/targets/Microsoft.$(1).Sdk.SupportedTargetPlatforms.props : $( TOP ) /Versions -ios .plist .in $( TOP ) /Versions -mac .plist .in Makefile ./generate -target -platforms .csharp Makefile
2020-08-31 10:27:19 +03:00
$( Q) rm -f $$ @.tmp
$( Q) ./generate-target-platforms.csharp $( 1) $$ @.tmp
$( Q) mv $$ @.tmp $$ @
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call SupportedTargetPlatforms ,$ ( platform ) ) ) )
2020-10-15 12:35:03 +03:00
d e f i n e W o r k l o a d T a r g e t s
Microsoft.NET.Workload.$(1)/WorkloadManifest.json : targets /WorkloadManifest .template .json Makefile $( TOP ) /Make .config .inc $( TOP ) /.git /HEAD $( TOP ) /.git /index
$$ ( Q) rm -f $$ @.tmp
$$ ( Q_GEN) sed \
-e " s/@VERSION@/ $3 /g " \
-e " s/@PLATFORM_LOWERCASE@/ $2 /g " \
-e " s/@PLATFORM@/ $1 /g " \
$$ < > $$ @.tmp
$$ ( Q) mv $$ @.tmp $$ @
2020-10-28 00:46:59 +03:00
Microsoft.NET.Workload.$(1)/LICENSE : $( TOP ) /LICENSE
$$ ( Q) $( CP) $$ < $$ @
2020-10-15 12:35:03 +03:00
WORKLOAD_TARGETS += Microsoft.NET.Workload.$( 1) /WorkloadManifest.json
2020-10-28 00:46:59 +03:00
WORKLOAD_TARGETS += Microsoft.NET.Workload.$( 1) /LICENSE
2020-10-15 12:35:03 +03:00
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call WorkloadTargets ,$ ( platform ) ,$ ( shell echo $ ( platform ) | tr A -Z a -z ) ,$ ( $ ( platform ) _NUGET_VERSION_NO_METADATA ) ) ) )
2020-05-13 16:23:29 +03:00
TEMPLATED_FILES = \
2021-02-11 22:17:12 +03:00
$( foreach platform,$( DOTNET_PLATFORMS) ,Microsoft.$( platform) .Sdk/targets/Microsoft.$( platform) .Sdk.Versions.props) \
2020-11-05 12:06:45 +03:00
$( foreach platform,$( DOTNET_PLATFORMS) ,Microsoft.$( platform) .Sdk/targets/Microsoft.$( platform) .Sdk.SupportedTargetPlatforms.props) \
2020-05-13 16:23:29 +03:00
2021-02-11 22:17:12 +03:00
d e f i n e N u p k g D e f i n i t i o n
nupkgs/$($(1)_NUGET).%.nupkg : CURRENT_VERSION_NO_METADATA =$( $ ( 1) _NUGET_VERSION_NO_METADATA )
nupkgs/$($(1)_NUGET).%.nupkg : CURRENT_VERSION_FULL =$( $ ( 1) _NUGET_VERSION_FULL )
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call NupkgDefinition ,$ ( platform ) ) ) )
2020-05-13 16:23:29 +03:00
# Create the nuget in a temporary directory (nupkgs/)
2020-06-04 17:39:19 +03:00
d e f i n e C r e a t e N u G e t T e m p l a t e
2020-07-01 18:08:46 +03:00
nupkgs/$(1).$(2)+$(NUGET_BUILD_METADATA).nupkg : $( TEMPLATED_FILES ) $( 3) package /$( 1) /package .csproj $( wildcard package /*.csproj ) $( wildcard $ ( DOTNET_DESTDIR ) /$ ( 1) /* $ ( DOTNET_DESTDIR ) /$ ( 1) /*/* $ ( DOTNET_DESTDIR ) /$ ( 1) /*/*/* $ ( DOTNET_DESTDIR ) /$ ( 1) /*/*/*/*) global .json
2020-06-04 17:39:19 +03:00
@# Delete any versions of the nuget we' re building
$$ ( Q) rm -f nupkgs/$( 1) .*.nupkg
2020-09-18 18:41:33 +03:00
$$ ( Q_PACK) $( DOTNET6) pack package/$( 1) /package.csproj --output " $$ (dir $$ @) " $( DOTNET_PACK_VERBOSITY)
2020-05-13 16:23:29 +03:00
@# Nuget pack doesn' t add the metadata to the filename, but we want that, so rename nuget to contain the full name
2020-06-04 17:39:19 +03:00
$$ ( Q) mv " nupkgs/ $( 1) . $( 2) .nupkg " " $$ @ "
@# Clean the local feed
$$ ( Q_NUGET_DEL) if test -d $( DOTNET_FEED_DIR) /$( shell echo $( 1) | tr A-Z a-z) /$( 2) ; then nuget delete $( 1) $( 2) -source $( abspath $( DOTNET_FEED_DIR) ) -NonInteractive $( NUGET_VERBOSITY) ; fi
2020-05-13 16:23:29 +03:00
@# Add the nupkg to our local feed
2020-06-04 17:39:19 +03:00
$$ ( Q_NUGET_ADD) nuget add " $$ @ " -source $( DOTNET_FEED_DIR) -NonInteractive $( NUGET_VERBOSITY)
e n d e f
# Create the NuGet packaging targets. It's amazing what make allows you to do...
2020-06-15 18:47:18 +03:00
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call CreateNuGetTemplate ,Microsoft .$ ( platform ) .Sdk ,$ ( $ ( platform ) _NUGET_VERSION_NO_METADATA ) ,$ ( $ ( platform ) _NUGET_TARGETS ) ) ) )
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call CreateNuGetTemplate ,Microsoft .$ ( platform ) .Ref ,$ ( $ ( platform ) _NUGET_VERSION_NO_METADATA ) ) ) )
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( foreach rid ,$ ( DOTNET_ $ ( platform ) _RUNTIME_IDENTIFIERS ) ,$ ( eval $ ( call CreateNuGetTemplate ,Microsoft .$ ( platform ) .Runtime .$ ( rid ) ,$ ( $ ( platform ) _NUGET_VERSION_NO_METADATA ) ) ) ) )
2020-05-13 16:23:29 +03:00
# Copy the nuget from the temporary directory into the final directory
$(DOTNET_NUPKG_DIR)/%.nupkg : nupkgs /%.nupkg | $( DOTNET_NUPKG_DIR )
2020-06-04 17:39:19 +03:00
$( Q) $( CP) $< $@
2020-05-13 16:23:29 +03:00
2021-02-11 22:17:12 +03:00
d e f i n e P a c k s D e f i n i t i o n s
RUNTIME_PACKS_$(1) = $$ ( foreach rid,$$ ( DOTNET_$( 1) _RUNTIME_IDENTIFIERS) ,$( DOTNET_NUPKG_DIR) /$( $( 1) _NUGET) .Runtime.$$ ( rid) .$( $( 1) _NUGET_VERSION_FULL) .nupkg)
RUNTIME_PACKS += $$ ( RUNTIME_PACKS_$( 1) )
REF_PACKS_$(1) = $( DOTNET_NUPKG_DIR) /$( $( 1) _NUGET) .Ref.$( $( 1) _NUGET_VERSION_FULL) .nupkg
REF_PACKS += $$ ( REF_PACKS_$( 1) )
SDK_PACKS_$(1) = $( DOTNET_NUPKG_DIR) /$( $( 1) _NUGET) .Sdk.$( $( 1) _NUGET_VERSION_FULL) .nupkg
SDK_PACKS += $$ ( SDK_PACKS_$( 1) )
pack-$(shell echo $(1) | tr A-Z a-z) : $$( RUNTIME_PACKS_ $ ( 1) ) $$( REF_PACKS_ $ ( 1) ) $$( SDK_PACKS_ $ ( 1) )
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS_UPPERCASE ) ,$ ( eval $ ( call PacksDefinitions ,$ ( platform ) ) ) )
2020-05-13 16:23:29 +03:00
TARGETS += $( RUNTIME_PACKS) $( REF_PACKS) $( SDK_PACKS)
2020-10-15 12:38:29 +03:00
d e f i n e I n s t a l l W o r k l o a d
$(DOTNET_MANIFESTS_PATH)/Microsoft.NET.Workload.$1 : | $( DOTNET_MANIFESTS_PATH )
$$ ( Q_LN) ln -Fhs $$ ( abspath Microsoft.NET.Workload.$1 ) $$ ( abspath $$ @)
2020-10-15 12:39:20 +03:00
$(DOTNET_PACKS_PATH)/Microsoft.$1.Sdk/$2 : | $( DOTNET_PACKS_PATH ) /Microsoft .$1.Sdk
$$ ( Q_LN) ln -Fhs $$ ( abspath $( DOTNET_DESTDIR) /Microsoft.$1 .Sdk) $$ ( abspath $$ @)
$(DOTNET_PACKS_PATH)/Microsoft.$1.Ref/$2 : | $( DOTNET_PACKS_PATH ) /Microsoft .$1.Ref
$$ ( Q_LN) ln -Fhs $$ ( abspath $( DOTNET_DESTDIR) /Microsoft.$1 .Ref) $$ ( abspath $$ @)
2020-10-15 12:38:29 +03:00
WORKLOAD_TARGETS += \
$( DOTNET_MANIFESTS_PATH) /Microsoft.NET.Workload.$1 \
2020-10-15 12:39:20 +03:00
$( DOTNET_PACKS_PATH) /Microsoft.$1 .Sdk/$2 \
$( DOTNET_PACKS_PATH) /Microsoft.$1 .Ref/$2
2020-10-15 12:38:29 +03:00
e n d e f
2020-10-15 12:45:36 +03:00
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call InstallWorkload ,$ ( platform ) ,$ ( $ ( platform ) _NUGET_VERSION_NO_METADATA ) ) ) )
# We create three packages: one for the workload, one for the sdk package, and one for the ref package,
# and then bundle them into a single pkg for distribution (named Microsoft.<platform>.Bundle.<version>.pkg).
2020-10-19 11:38:11 +03:00
# This way we can create and publish separate updates for each workload/sdk/ref package later if we want to.
2020-10-15 12:45:36 +03:00
d e f i n e C r e a t e P a c k a g e
# The workload package
$(TMP_PKG_DIR)/Microsoft.$1.Workload.$2.pkg : $( $ ( 1) _NUGET_TARGETS ) $( WORKLOAD_TARGETS ) Makefile | $( TMP_PKG_DIR )
$$ ( Q) rm -f $$ @
2021-02-08 09:35:32 +03:00
$$ ( Q) rm -rf tmpdir/Microsoft.$1 .Workload.$2 /
$$ ( Q) mkdir -p tmpdir/Microsoft.$1 .Workload.$2 /usr/local/share/dotnet/sdk-manifests/$( DOTNET6_VERSION_BAND) /
$$ ( Q) $$ ( CP) -r Microsoft.NET.Workload.$1 tmpdir/Microsoft.$1 .Workload.$2 /usr/local/share/dotnet/sdk-manifests/$( DOTNET6_VERSION_BAND) /
$$ ( Q_GEN) pkgbuild --quiet --version '$2' --root tmpdir/Microsoft.$1 .Workload.$2 --component-plist PackageInfo.plist --install-location / --identifier com.microsoft.net.$3 .workload.pkg $$ @.tmp
2020-10-15 12:45:36 +03:00
$$ ( Q) mv $$ @.tmp $$ @
# The sdk package
$(TMP_PKG_DIR)/Microsoft.$1.Sdk.$2.pkg : $( REF_PACK_ $ ( 4) ) | $( TMP_PKG_DIR )
$$ ( Q) rm -f $$ @
2021-02-08 09:35:32 +03:00
$$ ( Q) rm -rf tmpdir/Microsoft.$1 .Sdk.$2 /
$$ ( Q) mkdir -p tmpdir/Microsoft.$1 .Sdk.$2 /usr/local/share/dotnet/packs/Microsoft.$1 .Sdk/$2 /
$$ ( Q) $$ ( CP) -r $( DOTNET_DESTDIR) /Microsoft.$1 .Sdk/ tmpdir/Microsoft.$1 .Sdk.$2 /usr/local/share/dotnet/packs/Microsoft.$1 .Sdk/$2 /
$$ ( Q_GEN) pkgbuild --quiet --version '$2' --root tmpdir/Microsoft.$1 .Sdk.$2 --component-plist PackageInfo.plist --install-location / --identifier com.microsoft.net.$3 .sdk.pkg $$ @.tmp
2020-10-15 12:45:36 +03:00
$$ ( Q) mv $$ @.tmp $$ @
# The ref package
$(TMP_PKG_DIR)/Microsoft.$1.Ref.$2.pkg : $( SDK_PACK_ $ ( 4) ) | $( TMP_PKG_DIR )
$$ ( Q) rm -f $$ @
2021-02-08 09:35:32 +03:00
$$ ( Q) rm -rf tmpdir/Microsoft.$1 .Ref.$2 /
$$ ( Q) mkdir -p tmpdir/Microsoft.$1 .Ref.$2 /usr/local/share/dotnet/packs/Microsoft.$1 .Ref/$2 /
$$ ( Q) $$ ( CP) -r $( DOTNET_DESTDIR) /Microsoft.$1 .Ref/ tmpdir/Microsoft.$1 .Ref.$2 /usr/local/share/dotnet/packs/Microsoft.$1 .Ref/$2 /
$$ ( Q_GEN) pkgbuild --quiet --version '$2' --root tmpdir/Microsoft.$1 .Ref.$2 --component-plist PackageInfo.plist --install-location / --identifier com.microsoft.net.$3 .ref.pkg $$ @.tmp
2020-10-15 12:45:36 +03:00
$$ ( Q) mv $$ @.tmp $$ @
# The final bundle package for distribution
$(TMP_PKG_DIR)/Microsoft.$1.Bundle.$2.pkg : $( TMP_PKG_DIR ) /Microsoft .$1.Workload .$2.pkg $( TMP_PKG_DIR ) /Microsoft .$1.Sdk .$2.pkg $( TMP_PKG_DIR ) /Microsoft .$1.Ref .$2.pkg
$$ ( Q) rm -f $$ @
$$ ( Q_GEN) productbuild \
--quiet \
--identifier com.microsoft.net.$3 .pkg \
--version '$2' \
--package $( TMP_PKG_DIR) /Microsoft.$1 .Workload.$2 .pkg \
--package $( TMP_PKG_DIR) /Microsoft.$1 .Sdk.$2 .pkg \
--package $( TMP_PKG_DIR) /Microsoft.$1 .Ref.$2 .pkg \
$$ @.tmp
$$ ( Q) mv $$ @.tmp $$ @
# Copy the bundle package from our temporary directory to the target directory
2020-10-28 13:09:55 +03:00
$(DOTNET_PKG_DIR)/% : $( TMP_PKG_DIR ) /% | $( DOTNET_PKG_DIR )
2020-10-15 12:45:36 +03:00
$$ ( Q) $( CP) $$ < $$ @
PACKAGE_TARGETS += $( DOTNET_PKG_DIR) /Microsoft.$1 .Bundle.$2 .pkg
2020-10-28 13:09:55 +03:00
$(TMP_PKG_DIR)/Microsoft.$1.Bundle.$2.zip : $( $ ( 1) _NUGET_TARGETS ) $( WORKLOAD_TARGETS ) Makefile $( REF_PACK_ $ ( 4) ) $( SDK_PACK_ $ ( 4) ) | $( TMP_PKG_DIR )
$$ ( Q) rm -rf $$ @ $$ @.tmpdir $$ @.tmp
2020-09-18 18:41:33 +03:00
$$ ( Q) mkdir -p $$ @.tmpdir/dotnet/sdk-manifests/$( DOTNET6_VERSION_BAND) /
2020-10-28 13:09:55 +03:00
$$ ( Q) mkdir -p $$ @.tmpdir/dotnet/packs/Microsoft.$1 .Sdk
$$ ( Q) mkdir -p $$ @.tmpdir/dotnet/packs/Microsoft.$1 .Ref
2020-09-18 18:41:33 +03:00
$$ ( Q) $( CP) -r Microsoft.NET.Workload.$1 $$ @.tmpdir/dotnet/sdk-manifests/$( DOTNET6_VERSION_BAND) /
2020-10-28 13:09:55 +03:00
$$ ( Q) $( CP) -r $( DOTNET_DESTDIR) /Microsoft.$1 .Sdk $$ @.tmpdir/dotnet/packs/Microsoft.$1 .Sdk/$2
$$ ( Q) $( CP) -r $( DOTNET_DESTDIR) /Microsoft.$1 .Ref $$ @.tmpdir/dotnet/packs/Microsoft.$1 .Ref/$2
$$ ( Q_GEN) cd $$ @.tmpdir && zip -9rq $$ ( abspath $$ @.tmp) .
$$ ( Q) mv $$ @.tmp $$ @
$$ ( Q) echo Created $$ @
PACKAGE_TARGETS += $( DOTNET_PKG_DIR) /Microsoft.$1 .Bundle.$2 .zip
2020-10-15 12:45:36 +03:00
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call CreatePackage ,$ ( platform ) ,$ ( $ ( platform ) _NUGET_VERSION_NO_METADATA ) ,$ ( shell echo $ ( platform ) | tr A -Z a -z ) ,$ ( shell echo $ ( platform ) | tr a -z A -Z ) ) ) )
2020-10-15 12:38:29 +03:00
2020-10-28 13:09:55 +03:00
d e f i n e C r e a t e M s i
$(TMP_PKG_DIR)/Microsoft.NET.Workload.$1.$2.wsx : ./generate -wix .csharp Makefile $( TMP_PKG_DIR ) /Microsoft .$1.Bundle .$2.zip
$$ ( Q_GEN) ./generate-wix.csharp " $1 " " $$ @ " " $( TMP_PKG_DIR) /Microsoft. $1 .Bundle. $2 .zip.tmpdir/dotnet " " $2 "
$(TMP_PKG_DIR)/Microsoft.NET.Workload.$1.$2.msi : $( TMP_PKG_DIR ) /Microsoft .NET .Workload .$1.$2.wsx .stamp -check -wixl
$$ ( Q_GEN) wixl -o " $$ @ " " $$ < " -a x64
MSI_TARGETS += $( DOTNET_PKG_DIR) /Microsoft.NET.Workload.$1 .$2 .msi
e n d e f
$( foreach platform ,$ ( DOTNET_PLATFORMS ) ,$ ( eval $ ( call CreateMsi ,$ ( platform ) ,$ ( $ ( platform ) _NUGET_VERSION_NO_METADATA ) ) ) )
.stamp-check-wixl :
$( Q) if ! type wixl; then \
echo "Installing msitools to get wixl..." ; \
if ! brew install msitools; then \
if ! type wixl; then \
echo "Failed to install wixl" ; \
exit 1; \
fi ; \
fi ; \
echo "Installed msitools" ; \
fi
$( Q) touch $@
2020-10-15 12:38:29 +03:00
TARGETS += $( WORKLOAD_TARGETS)
2020-10-28 13:09:55 +03:00
msi : $( MSI_TARGETS )
package : $( PACKAGE_TARGETS ) $( MSI_TARGETS )
2020-10-15 12:45:36 +03:00
2020-05-20 10:26:27 +03:00
i f d e f E N A B L E _ D O T N E T
2021-02-11 22:17:12 +03:00
all-local :: $( TARGETS )
2020-05-20 10:26:27 +03:00
e n d i f
2020-05-13 16:23:29 +03:00
2020-07-01 18:08:46 +03:00
# This tells NuGet to use the exact same dotnet version we've configured in Make.config
2020-09-18 18:41:33 +03:00
global.json : $( TOP ) /global 6.json
2020-09-21 14:22:44 +03:00
$( CP) $< $@
2020-07-01 18:08:46 +03:00
2020-05-13 16:23:29 +03:00
clean-local ::
2020-06-03 10:00:19 +03:00
$( Q) rm -Rf $( DOTNET_NUPKG_DIR) $( DOTNET_FEED_DIR)
2020-05-13 16:23:29 +03:00
$( Q) git clean -xfdq
.SECONDARY :