From 0b263c8970d9f03f18ce946adaf2d3a023a8ad99 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Mon, 19 Sep 2016 14:15:06 +0200 Subject: enable support for kernel dependencies in subpackages --- adk/tools/pkgmaker.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'adk/tools') diff --git a/adk/tools/pkgmaker.c b/adk/tools/pkgmaker.c index 81d33d13d..ae73ee848 100644 --- a/adk/tools/pkgmaker.c +++ b/adk/tools/pkgmaker.c @@ -1,7 +1,7 @@ /* * pkgmaker - create package meta-data for OpenADK buildsystem * - * Copyright (C) 2010-2015 Waldemar Brodkorb + * Copyright (C) 2010-2016 Waldemar Brodkorb * * 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); -- cgit v1.2.3