瀏覽代碼

enable support for kernel dependencies in subpackages

Waldemar Brodkorb 7 年之前
父節點
當前提交
0b263c8970
共有 1 個文件被更改,包括 17 次插入1 次删除
  1. 17 1
      adk/tools/pkgmaker.c

+ 17 - 1
adk/tools/pkgmaker.c

@@ -1,7 +1,7 @@
 /*
  * pkgmaker - create package meta-data for OpenADK buildsystem
  *
- * Copyright (C) 2010-2015 Waldemar Brodkorb <wbx@openadk.org>
+ * Copyright (C) 2010-2016 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
@@ -603,6 +603,8 @@ int main() {
 						continue;
 					if ((parse_var_hash(buf, "PKGSC_", pkgmap)) == 0)
 						continue;
+					if ((parse_var_hash(buf, "PKGSK_", pkgmap)) == 0)
+						continue;
 					if ((parse_var_hash(buf, "PKGSN_", pkgmap)) == 0)
 						continue;
 				}
@@ -803,6 +805,20 @@ int main() {
 				}
 				memset(hkey, 0, MAXVAR);
 
+				/* add sub package kernel selections */
+				strncat(hkey, "PKGSK_", 6);
+				strncat(hkey, toupperstr(token), strlen(token));
+				memset(hvalue, 0, MAXVALUE);
+				result = strmap_get(pkgmap, hkey, hvalue, sizeof(hvalue));
+				if (result == 1) {
+					val = strtok_r(hvalue, " ", &saveptr);
+					while (val != NULL) { 
+						fprintf(cfg, "\tselect ADK_KERNEL_%s\n", toupperstr(val));
+						val = strtok_r(NULL, " ", &saveptr);
+					}
+				}
+				memset(hkey, 0, MAXVAR);
+
 				/* create package target system dependency information */
 				if (pkg_system_depends != NULL) {
 					pkg_helper = strdup(pkg_system_depends);