Radix cross Linux Build System

Cross-platform build system is designed to build distributions of different operating systems for a set of target devices

39 Commits   2 Branches   2 Tags
Index: build_packages_list
===================================================================
--- build_packages_list	(revision 16)
+++ build_packages_list	(revision 17)
@@ -16,10 +16,11 @@
 # Generate $(HARDWARE).pkglist file for current directory
 #
 # usage:
-#   $0 topdir toolchain hardware
+#   $0 topdir pkgarch toolchain hardware
 #
 # where:
 #      'topdir' - is a absolute path to the top directory of checked out branch
+#     'pkgarch' - is a ARCHITECTURE name
 #   'toolchain' - is a TOOLCHAIN name
 #    'hardware' - is a HARDWARE variant
 #
@@ -26,7 +27,7 @@
 
 # global variables
 my ($build_system);
-my ($topdir, $toolchain, $hardware, $flavour);
+my ($topdir, $pkgarch, $toolchain, $hardware, $flavour);
 my ($target_build_dir, $requires_file);
 my ($pkglist_file);
 my ($system_version, $distro_name, $distro_version, $url);
@@ -43,6 +44,7 @@
 Usage: $0 topdir toolchain hardware
 Where:
           topdir - is a absolute path to the top of checked out branch;
+         pkgarch - is a ARCHITECTURE name;
        toolchain - is a TOOLCHAIN name;
         hardware - is a HARDWARE variant.
 
@@ -378,7 +380,7 @@
 #   version           => $(PKG_VERSION)    from Makefile
 #   group             => $(PKG_GROUP)      from Makefile {app,base,dev,libs,net,...}
 #
-#   arch              => $toolchain        from comandline args
+#   arch              => $pkgarch          from comandline args
 #   hardware          => $hardware         from comandline args
 #   flavour           => $flavour          from comandline args for ROOT pkg, from REQUIRES for dependencies
 #   tarball           => "$name-$version-$arch-$distro_name-$distro_version.$tarball_suffix"
@@ -415,7 +417,7 @@
   }
 
   $pkg{'version'}           = pkg_version( $makefile );
-  $pkg{'arch'}              = $toolchain;
+  $pkg{'arch'}              = $pkgarch;
   $pkg{'hardware'}          = $hardware;
   $pkg{'flavour'}           = $flavour;
   $pkg{'group'}             = pkg_group( $makefile );
@@ -443,6 +445,7 @@
 
 # Get the rest arguments of the command line
 $topdir    = shift;
+$pkgarch   = shift;
 $toolchain = shift;
 $hardware  = shift;
 $flavour   = shift;
@@ -450,6 +453,7 @@
 my $makefile = "Makefile";
 
 if( ! defined $topdir    or $topdir eq "" )    { usage; }
+if( ! defined $pkgarch   or $pkgarch eq "" )   { usage; }
 if( ! defined $toolchain or $toolchain eq "" ) { usage; }
 if( ! defined $hardware  or $hardware eq "" )  { usage; }
 if( ! defined $flavour   or $flavour eq "" )   { $flavour = ""; }
Index: build_requires_tree
===================================================================
--- build_requires_tree	(revision 16)
+++ build_requires_tree	(revision 17)
@@ -22,6 +22,7 @@
 #
 # where:
 #      'topdir' - is a absolute path to the top directory of checked out branch
+#     'pkgarch' - is a ARCHITECTURE name
 #   'toolchain' - is a TOOLCHAIN name
 #    'hardware' - is a HARDWARE variant
 #
@@ -28,7 +29,7 @@
 
 # global variables
 my ($build_system);
-my ($topdir, $toolchain, $hardware, $flavour);
+my ($topdir, $pkgarch, $toolchain, $hardware, $flavour);
 my ($target_build_dir, $requires_file);
 my ($html_tree_file, $js_tree_file, $js_min_tree_file, $js_pkgs_file, $js_min_pkgs_file);
 my ($system_version, $distro_name, $distro_version, $url);
@@ -45,6 +46,7 @@
 Usage: $0 topdir toolchain hardware
 Where:
           topdir - is a absolute path to the top of checked out branch;
+         pkgarch - is a ARCHITECTURE name;
        toolchain - is a TOOLCHAIN name;
         hardware - is a HARDWARE variant.
 
@@ -441,7 +443,7 @@
 #   version           => $(PKG_VERSION)    from Makefile
 #   group             => $(PKG_GROUP)      from Makefile {app,base,dev,libs,net,...}
 #
-#   arch              => $toolchain        from comandline args
+#   arch              => $pkgarch          from comandline args
 #   hardware          => $hardware         from comandline args
 #   flavour           => $flavour          from comandline args for ROOT pkg, from REQUIRES for dependencies
 #   tarball           => "$name-$version-$arch-$distro_name-$distro_version.$tarball_suffix"
@@ -478,7 +480,7 @@
   }
 
   $pkg{'version'}           = pkg_version( $makefile );
-  $pkg{'arch'}              = $toolchain;
+  $pkg{'arch'}              = $pkgarch;
   $pkg{'hardware'}          = $hardware;
   $pkg{'flavour'}           = $flavour;
   $pkg{'group'}             = pkg_group( $makefile );
@@ -629,6 +631,7 @@
 
 # Get the rest arguments of the command line
 $topdir    = shift;
+$pkgarch   = shift;
 $toolchain = shift;
 $hardware  = shift;
 $flavour   = shift;
@@ -636,6 +639,7 @@
 my $makefile = "Makefile";
 
 if( ! defined $topdir    or $topdir eq "" )    { usage; }
+if( ! defined $pkgarch   or $pkgarch eq "" )   { usage; }
 if( ! defined $toolchain or $toolchain eq "" ) { usage; }
 if( ! defined $hardware  or $hardware eq "" )  { usage; }
 if( ! defined $flavour   or $flavour eq "" )   { $flavour = ""; }
@@ -926,12 +930,12 @@
                            "sed 's/\@TARBALL_SUFFIX\@/%s/g' | " .
                            "sed 's/\@BUG_URL\@/%s/g' | "        .
                            "sed 's/\@COPYING\@/%s/g' | "        .
-                           "sed 's/\@YEAR\@/%s/g' | "           .
-                           "sed 's/\@MONTH\@/%s/g' | "          .
-                           "sed 's/\@DAY\@/%s/g' | "            .
-                           "sed 's/\@HOUR\@/%s/g' | "           .
-                           "sed 's/\@MINUTE\@/%s/g' | "         .
-                           "sed 's/\@SECOND\@/%s/g' | "         .
+                           "sed 's/\@YEAR\@/%.4d/g' | "           .
+                           "sed 's/\@MONTH\@/%.2d/g' | "          .
+                           "sed 's/\@DAY\@/%.2d/g' | "            .
+                           "sed 's/\@HOUR\@/%.2d/g' | "           .
+                           "sed 's/\@MINUTE\@/%.2d/g' | "         .
+                           "sed 's/\@SECOND\@/%.2d/g' | "         .
                            "sed 's/\@SVG_WIDTH\@/%d/g' | "      .
                            "sed 's/\@SVG_HEIGHT\@/%d/g' | "     .
                            "sed 's/\@JSON_PKGS_FILE\@/%s/g' | " .
Index: core.mk
===================================================================
--- core.mk	(revision 16)
+++ core.mk	(revision 17)
@@ -1357,11 +1357,9 @@
 #######
 
 #
-# Create $(HARDWARE).tree.html if current Makefile defines packages collection
-# or $(GROUP)/$(PKG_NAME)-$(PKG_VERSION).tree.html if current Makefile defines
-# single package:
+# $(HARDWARE).tree.html - is a main target of `make requires-tree' procedure:
 #
-requires-tree: $(TARGET_BUILD_DIR)/.$(HARDWARE).srctree
+requires-tree: $(TARGET_BUILD_DIR)/.$(HARDWARE).tree.html
 
 #
 # Requires Tree perform only if goal 'all' is done and all packages installed
@@ -1372,7 +1370,7 @@
 #   during Makefile works. For normal work all tested files should be
 #   created before the Makefile starting my make command.
 #
-$(TARGET_BUILD_DIR)/.$(HARDWARE).srctree:
+$(TARGET_BUILD_DIR)/.$(HARDWARE).tree.html:
 ifneq ($(shell pwd),$(BUILDSYSTEM))
 ifeq ($(shell pwd | grep $(TOP_BUILD_DIR_ABS)/$(SRC_PACKAGE_DIR))$(shell pwd | grep $(BUILDSYSTEM)/3pp/sources),)
 ifeq ($(shell pwd),$(TOP_BUILD_DIR_ABS))
@@ -1390,7 +1388,7 @@
 	@echo -e "#######"
 	@echo -e "####### Start of building Requires Tree in '`echo $(CURDIR) | sed 's,$(TOP_BUILD_DIR_ABS)/,,'`' directory..."
 	@echo -e "#######"
-	@$(BUILDSYSTEM)/build-pkglist tree $(TOP_BUILD_DIR_ABS) $(TOOLCHAIN) $(HARDWARE) $(FLAVOUR)
+	@JSMIN=$(JSMIN) $(BUILDSYSTEM)/build_requires_tree $(TOP_BUILD_DIR_ABS) $(PKGARCH) $(TOOLCHAIN) $(HARDWARE) $(FLAVOUR)
 	@echo -e "#######"
 	@echo -e "####### End of building Requires Tree in '`echo $(CURDIR) | sed 's,$(TOP_BUILD_DIR_ABS)/,,'`' directory."
 	@echo -e "#######"
@@ -1412,16 +1410,8 @@
 #######
 
 #
-# Create $(HARDWARE).pkglist if current Makefile defines packages collection
-# or $(GROUP)/$(PKG_NAME)-$(PKG_VERSION).pkglist if current Makefile defines
-# single package.
+# $(HARDWARE).pkglist - is a main target of `make packages-list' procedure:
 #
-
-#
-# Both .$(HARDWARE).srclist and $(HARDWARE).pkglist files
-# created by `make packages-list' procedure. But the $(HARDWARE).pkglist
-# is a main target of `make packages-list' procedure:
-#
 packages-list: $(TARGET_BUILD_DIR)/$(HARDWARE).pkglist
 
 #
@@ -1451,7 +1441,7 @@
 	@echo -e "#######"
 	@echo -e "####### Start of building Packages List in '`echo $(CURDIR) | sed 's,$(TOP_BUILD_DIR_ABS)/,,'`' directory..."
 	@echo -e "#######"
-	@$(BUILDSYSTEM)/build-pkglist list $(TOP_BUILD_DIR_ABS) $(TOOLCHAIN) $(HARDWARE) $(FLAVOUR)
+	@$(BUILDSYSTEM)/build_packages_list $(TOP_BUILD_DIR_ABS) $(PKGARCH) $(TOOLCHAIN) $(HARDWARE) $(FLAVOUR)
 	@echo -e "#######"
 	@echo -e "####### End of building Packages List in '`echo $(CURDIR) | sed 's,$(TOP_BUILD_DIR_ABS)/,,'`' directory."
 	@echo -e "#######"