SetType rule: add optional type parameter

If not specified the executable MIME type is used as before.
This commit is contained in:
Ingo Weinhold
2013-06-29 14:58:52 +02:00
parent 1c29b26e7c
commit dbd97804ea
+9 -5
View File
@@ -149,18 +149,22 @@ actions SetVersion1
$(2[1]) "$(1)" -system $(HAIKU_BUILD_VERSION) -short "$(HAIKU_BUILD_DESCRIPTION)" ; $(2[1]) "$(1)" -system $(HAIKU_BUILD_VERSION) -short "$(HAIKU_BUILD_DESCRIPTION)" ;
} }
rule SetType rule SetType target : type
{ {
# SetType <target> # SetType <target> [ : <type> ]
# Sets the MIME type on the target. If none is given, the executable MIME
# type is used.
Depends $(1) : <build>settype ; TARGET_MIME_TYPE on $(target) = $(type:E=$(TARGET_EXECUTABLE_MIME_TYPE)) ;
SetType1 $(1) : <build>settype ;
Depends $(target) : <build>settype ;
SetType1 $(target) : <build>settype ;
} }
actions SetType1 actions SetType1
{ {
$(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR) $(HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR)
$(2[1]) -t $(TARGET_EXECUTABLE_MIME_TYPE) "$(1)" ; $(2[1]) -t $(TARGET_MIME_TYPE) "$(1)" ;
} }
rule MimeSet target rule MimeSet target