new: add nogen key to the target
This commit is contained in:
parent
9e8f57c175
commit
dbaf581335
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-05-02 23:20+0300\n"
|
||||
"POT-Creation-Date: 2024-05-04 20:25+0300\n"
|
||||
"PO-Revision-Date: 2024-05-01 13:34+0300\n"
|
||||
"Last-Translator: <ngn@ngn.tf>\n"
|
||||
"Language-Team: Turkish <gnome-turk@gnome.org>\n"
|
||||
@ -33,32 +33,32 @@ msgstr ""
|
||||
msgid "Configuration contains multiple targets with the same name"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:116
|
||||
#: src/config.c:119
|
||||
#, c-format
|
||||
msgid "Key %s is unknown"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:146
|
||||
#: src/config.c:149
|
||||
msgid "Configuration file not found"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:161
|
||||
#: src/config.c:164
|
||||
msgid "Failed to parse configuration file"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:177
|
||||
#: src/config.c:180
|
||||
msgid "Configuration details:\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:178 src/target.c:119
|
||||
#: src/config.c:181 src/target.c:122
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:179
|
||||
#: src/config.c:182
|
||||
msgid "Author"
|
||||
msgstr ""
|
||||
|
||||
#: src/config.c:181
|
||||
#: src/config.c:184
|
||||
msgid "Keywords"
|
||||
msgstr ""
|
||||
|
||||
@ -224,16 +224,16 @@ msgstr ""
|
||||
msgid "Failed to open the directory: %s"
|
||||
msgstr ""
|
||||
|
||||
#: src/target.c:81
|
||||
#: src/target.c:84
|
||||
#, c-format
|
||||
msgid "Source directory \"%s\" does not exist"
|
||||
msgstr ""
|
||||
|
||||
#: src/target.c:118
|
||||
#: src/target.c:121
|
||||
msgid "Target details:\n"
|
||||
msgstr ""
|
||||
|
||||
#: src/target.c:120
|
||||
#: src/target.c:123
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
|
@ -107,8 +107,11 @@ int config_handler(void *data, const char *section, const char *key, const char
|
||||
} else if (MATCHKEY("src")) {
|
||||
config->t_last->src = strdup(value);
|
||||
return 1;
|
||||
} else if (MATCHKEY("requires")) {
|
||||
clist_from_str(&config->t_last->requires, strdup(value));
|
||||
} else if (MATCHKEY("require")) {
|
||||
clist_from_str(&config->t_last->require, strdup(value));
|
||||
return 1;
|
||||
} else if (MATCHKEY("nogen")) {
|
||||
config->t_last->nogen = eq((char *)value, "true");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,9 @@ bool target_copy(target_t *t, bool fromdst) {
|
||||
char *src = t->src, *dst = t->dst;
|
||||
bool ret = false;
|
||||
|
||||
if (fromdst && t->nogen)
|
||||
return true;
|
||||
|
||||
if (fromdst) {
|
||||
src = t->dst;
|
||||
dst = t->src;
|
||||
@ -98,7 +101,7 @@ bool target_copy(target_t *t, bool fromdst) {
|
||||
}
|
||||
|
||||
void target_init(target_t *t) {
|
||||
clist_init(&t->requires);
|
||||
clist_init(&t->require);
|
||||
t->next = NULL;
|
||||
t->name = NULL;
|
||||
t->desc = NULL;
|
||||
@ -111,7 +114,7 @@ void target_free(target_t *t) {
|
||||
free(t->desc);
|
||||
free(t->dst);
|
||||
free(t->src);
|
||||
clist_free(&t->requires);
|
||||
clist_free(&t->require);
|
||||
}
|
||||
|
||||
void target_print(target_t *t) {
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
typedef struct target {
|
||||
struct target *next;
|
||||
clist_t
|
||||
requires;
|
||||
clist_t require;
|
||||
bool nogen;
|
||||
char *name;
|
||||
char *desc;
|
||||
char *src;
|
||||
|
Loading…
Reference in New Issue
Block a user