summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2011-09-17 19:30:02 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2011-09-17 19:30:02 +0200
commitbd2f41ee73b6c681b1c16d9aeb15bb5a67ad4e73 (patch)
tree66893e4ca13ecb5804bd1390144f3e99a5ed2705 /tools
parent0170f2dff9200d6d9371f355c5eee956ccab2782 (diff)
fix depmakes, similar bug as in pkgrebuild
Diffstat (limited to 'tools')
-rw-r--r--tools/adk/depmaker.c42
1 files changed, 37 insertions, 5 deletions
diff --git a/tools/adk/depmaker.c b/tools/adk/depmaker.c
index 1f11f1724..603a59739 100644
--- a/tools/adk/depmaker.c
+++ b/tools/adk/depmaker.c
@@ -1,7 +1,7 @@
/*
* depmaker - create package/Depends.mk for OpenADK buildsystem
*
- * Copyright (C) 2010 Waldemar Brodkorb <wbx@openadk.org>
+ * Copyright (C) 2010,2011 Waldemar Brodkorb <wbx@openadk.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -130,7 +130,7 @@ int main() {
FILE *pkg;
char buf[MAXLINE];
char path[MAXPATH];
- char *string, *pkgvar, *pkgdeps, *tmp;
+ char *string, *pkgvar, *pkgdeps, *tmp, *fpkg, *cpkg, *spkg, *key, *check;
int i;
/* read Makefile's for all packages */
@@ -200,23 +200,55 @@ int main() {
strncat(pkgdeps, tmp, strlen(tmp));
}
+ // WE need to find the subpackage name here
+ string = strstr(buf, "PKG_FLAVOURS_");
+ if (string != NULL) {
+ check = strstr(buf, ":=");
+ if (check != NULL) {
+ string[strlen(string)-1] = '\0';
+ key = strtok(string, ":=");
+ fpkg = strdup(key+13);
+ }
+ }
+
string = strstr(buf, "PKGFB_");
if (string != NULL) {
- tmp = parse_line(pkgdirp->d_name, pkgvar, string, 1, 0);
+ tmp = parse_line(pkgdirp->d_name, fpkg, string, 1, 0);
if (tmp != NULL)
strncat(pkgdeps, tmp, strlen(tmp));
}
+ // WE need to find the subpackage name here
+ string = strstr(buf, "PKG_CHOICES_");
+ if (string != NULL) {
+ check = strstr(buf, ":=");
+ if (check != NULL) {
+ string[strlen(string)-1] = '\0';
+ key = strtok(string, ":=");
+ cpkg = strdup(key+12);
+ }
+ }
string = strstr(buf, "PKGCB_");
if (string != NULL) {
- tmp = parse_line(pkgdirp->d_name, pkgvar, string, 1, 0);
+ tmp = parse_line(pkgdirp->d_name, cpkg, string, 1, 0);
if (tmp != NULL)
strncat(pkgdeps, tmp, strlen(tmp));
}
+ // WE need to find the subpackage name here
+ string = strstr(buf, "PKG_SUBPKGS_");
+ if (string != NULL) {
+ check = strstr(buf, ":=");
+ if (check != NULL) {
+ string[strlen(string)-1] = '\0';
+ key = strtok(string, ":=");
+ spkg = strdup(key+12);
+ }
+ }
+
string = strstr(buf, "PKGSB_");
if (string != NULL) {
- tmp = parse_line(pkgdirp->d_name, pkgvar, string, 1, 1);
+ tmp = parse_line(pkgdirp->d_name, spkg, string, 1, 1);
if (tmp != NULL) {
strncat(pkgdeps, tmp, strlen(tmp));
}