Setup Hooks: make Location a separate data type
[cabal.git] / templates / cabal_macros.template.h
blobf50323d9668b7945f684181391b5cf378c0fc6ea
1 /* DO NOT EDIT: This file is automatically generated by Cabal */
3 {% for pkg in packages %}
4 /* package {{ pkg.name }}-{{ pkg.version }} */
5 #ifndef VERSION_{{ manglePkgName pkg.name }}
6 #define VERSION_{{ manglePkgName pkg.name }} "{{ pkg.version }}"
7 #endif /* VERSION_{{ manglePkgName pkg.name }} */
8 #ifndef MIN_VERSION_{{ manglePkgName pkg.name }}
9 #define MIN_VERSION_{{ manglePkgName pkg.name }}(major1,major2,minor) (\
10 (major1) < {{ pkg.x }} || \
11 (major1) == {{ pkg.x }} && (major2) < {{ pkg.y }} || \
12 (major1) == {{ pkg.x }} && (major2) == {{ pkg.y }} && (minor) <= {{ pkg.z }})
13 #endif /* MIN_VERSION_{{ manglePkgName pkg.name }} */
14 {% endfor %}
16 {% for tool in tools %}
17 /* tool {{ tool.name }}-{{ tool.version }} */
18 #ifndef TOOL_VERSION_{{ mangleStr tool.name }}
19 #define TOOL_VERSION_{{ mangleStr tool.name }} "{{ tool.version }}"
20 #endif /* TOOL_VERSION_{{ mangleStr tool.name }} */
21 #ifndef MIN_TOOL_VERSION_{{ mangleStr tool.name }}
22 #define MIN_TOOL_VERSION_{{ mangleStr tool.name }}(major1,major2,minor) (\
23 (major1) < {{ tool.x }} || \
24 (major1) == {{ tool.x }} && (major2) < {{ tool.y }} || \
25 (major1) == {{ tool.x }} && (major2) == {{ tool.y }} && (minor) <= {{ tool.z }})
26 #endif /* MIN_TOOL_VERSION_{{ mangleStr tool.name }} */
27 {% endfor %}
29 {% if notNull packageKey %}
30 #ifndef CURRENT_PACKAGE_KEY
31 #define CURRENT_PACKAGE_KEY "{{ packageKey }}"
32 #endif /* CURRENT_packageKey */
33 {% endif %}
34 {% if notNull componentId %}
35 #ifndef CURRENT_COMPONENT_ID
36 #define CURRENT_COMPONENT_ID "{{ componentId }}"
37 #endif /* CURRENT_COMPONENT_ID */
38 {% endif %}
39 #ifndef CURRENT_PACKAGE_VERSION
40 #define CURRENT_PACKAGE_VERSION "{{ packageVersion }}"
41 #endif /* CURRENT_PACKAGE_VERSION */