summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_inline_modinfo.x
blob: 582b7caf5a216af9a6865f028dbdf7ff9545918d (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
/* EINA - EFL data type library
 * Copyright (C) 2016 Amitesh Singh
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library;
 * if not, see <http://www.gnu.org/licenses/>.
 */

#ifndef EINA_INLINE_MODINFO_X_
#define EINA_INLINE_MODINFO_X_

#define __EINA_MODINFO_CONCAT(a, b) a##b
#define _EINA_MODINFO_CONCAT(a, b) __EINA_MODINFO_CONCAT(a, b)
#define __EINA_MODULE_UNIQUE_ID(id) _EINA_MODINFO_CONCAT(__EINA_MODULE_UNIQUE_ID_, id)

#define _EINA_MODINFO(name, info) \
  EAPI const char __EINA_MODULE_UNIQUE_ID(name)[] \
__attribute__((__used__)) __attribute__((unused, aligned(1))) = info;
#define EINA_MODINFO(tag, info) _EINA_MODINFO(tag, info)

/**
  * @defgroup Eina_Module_Group Module
  *  
  * These macros allow you to define module informations like author/description/version/license.
  * eina_modinfo - shows information about an eina module.
  * eina_modinfo pulls out information from the eina modules given on command line.
  *
  * $ eina_modinfo module.so
  * version: 0.1
  * description:   Entry test
  * license: GPLv2
  * author:  Enlightenment Community
  *
  */

/** 
  * @defgroup Eina_Module_Group Module
  *  
  * This macro is used for defining license.
  *
  */
#define EINA_MODULE_LICENSE(_license) EINA_MODINFO(license, _license)
/**
  * @defgroup Eina_Module_Group Module
  *  
  * This macro is used for defining author
  * Use "name <email>" or just "name"
  * for multiple authors, use multiple lines like below
  *        EINA_MODULE_AUTHOR("Author 1 <author1.email>\n
                              "Author 2 <author2.email>");
  */
#define EINA_MODULE_AUTHOR(_author) EINA_MODINFO(author, _author)
/**
  * @defgroup Eina_Module_Group Module
  *  
  * This macro is used for defining version.
  */
#define EINA_MODULE_VERSION(_ver) EINA_MODINFO(ver, _ver)
/**
  * @defgroup Eina_Module_Group Module
  *  
  * This macro is used for defining description.
  * Explain what your module does.
  */
#define EINA_MODULE_DESCRIPTION(_desc) EINA_MODINFO(desc, _desc)

#endif