-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintersect.mak
46 lines (41 loc) · 2.26 KB
/
intersect.mak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
###############################################################################
# #
# File name intersect.mak #
# #
# Description Intersect two lists #
# #
# Notes Usage: #
# INTERSECT_ARGS=LIST1 LIST2 OUTVARNAME #
# !INCLUDE <intersect.mak> #
# #
# Ex: #
# INTERSECT_ARGS="WIN32 WIN64" "DOS WIN32" OS #
# !INCLUDE <intersect.mak> #
# # Result: OS=WIN32 #
# #
# History #
# 2024-01-02 JFL [email protected] created this file. #
# #
# (C) Copyright 2024 Jean-Francois Larvoire #
# Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 #
###############################################################################
# Invoke intersect.bat for doing the conversion
INTERSECT_MAK=$(TMP)\intersect.$(PID).mak
INTERSECT_CMD="$(NMINCLUDE)\intersect.bat" $(INTERSECT_ARGS) >"$(INTERSECT_MAK)"
# Log the command executed
# !IF DEFINED(MESSAGES)
# ! MESSAGE $(INTERSECT_CMD)
# !ENDIF
# If the intersection succeeds, load the output make file
!IF [$(INTERSECT_CMD)] == 0
! INCLUDE "$(INTERSECT_MAK)"
!ELSE
! ERROR intersect.mak : Failed with INTERSECT_ARGS=$(INTERSECT_ARGS)
!ENDIF
# Log the result generated
!IF DEFINED(MESSAGES)
! MESSAGE $(INTERSECT_MSG)
!ENDIF
# Cleanup
!UNDEF INTERSECT_MAK
!UNDEF INTERSECT_MSG