summaryrefslogtreecommitdiff
path: root/build-0.3/meta/vcsln.m4
blob: 2299bac10aa20e53f8e10af50f6eb527f4f8753b (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
m4_divert(-1)
# file      : build/meta/vcsln.m4
# copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC
# license   : GNU GPL v2; see accompanying LICENSE file

m4_changequote([, ])

m4_include(__meta_base__[/common.m4])
m4_include(__meta_base__[/windows-common.m4])

# solution_configuration
#
m4_define([__solution_configuration_entry_impl__], [		[$1] = [$1]])

m4_define([__solution_configurations_impl__],
  [m4_foreach([__c],
    [__value_impl__([configurations])],
    [__solution_configuration_entry_impl__(m4_patsubst(__c, ["], []))
])])

m4_define([__solution_configurations__],
  [m4_equote()__solution_configurations_impl__()[]m4_dquote()])

# project_configuration
#
m4_define([__project_configuration_entry_item_impl__],
[		{[$1]}.[$2].ActiveCfg = [$2]
		{[$1]}.[$2].Build.0 = [$2]])

m4_define([__project_configuration_entry_impl__],
  [m4_foreach(
    [__c],
    [__value_impl__([configurations])],
    [__project_configuration_entry_item_impl__([$1], m4_patsubst(__c, ["], []))
])])

m4_define([__project_configurations_impl__],
  [m4_foreach_w(
    [__u],
    [__value_impl__([project_uuids])],
    [__project_configuration_entry_impl__(__u)])])

m4_define([__project_configurations__],
  [m4_equote()__project_configurations_impl__()[]m4_dquote()])

# project_entry(name, file, uuid)
#
m4_define([__project_entry_impl__],
[Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "[$1]", "[$2]", "{[$3]}"
EndProject])

m4_define([__project_entry__],
  [m4_equote()__project_entry_impl__([$1], [$2], [$3])[]m4_dquote()])

# projects
#
m4_define([__project_step_impl__],
[__project_entry_impl__(
  m4_substr([$1], 0, m4_ifelse(m4_index([$1], [ ]), [-1], [m4_len([$1])], [m4_index([$1], [ ])])),
  m4_substr([$2], 0, m4_ifelse(m4_index([$2], [ ]), [-1], [m4_len([$2])], [m4_index([$2], [ ])])),
  m4_substr([$3], 0, m4_ifelse(m4_index([$3], [ ]), [-1], [m4_len([$3])], [m4_index([$3], [ ])])))[]m4_dnl
m4_ifelse(m4_index([$1], [ ]), [-1],, [
__project_step_impl__(
  m4_substr([$1], m4_incr(m4_index([$1], [ ]))),
  m4_substr([$2], m4_incr(m4_index([$2], [ ]))),
  m4_substr([$3], m4_incr(m4_index([$3], [ ]))))])])

m4_define([__projects_impl__],
[__project_step_impl__(
  __value_impl__([project_names]),
  __path_impl__([project_files]),
  __value_impl__([project_uuids]))])

m4_define([__projects__],
  [m4_equote()__projects_impl__()[]m4_dquote()])

# Disable comments and quoting.
#
m4_changecom([])
m4_changequote([])

m4_divert(0)m4_dnl