diff options
author | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-01-14 16:33:03 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <awg@embtoolkit.org> | 2012-01-14 16:33:03 +0100 |
commit | 7a101d238e55184291a169234ee704f95594d1d9 (patch) | |
tree | 983115abed389d0593ce59fe516bec1668896cd5 /mk | |
parent | 26b659e9b2f81cd0de36515d174329d32c7693bf (diff) | |
download | embtoolkit-7a101d238e55184291a169234ee704f95594d1d9.tar.gz embtoolkit-7a101d238e55184291a169234ee704f95594d1d9.tar.bz2 embtoolkit-7a101d238e55184291a169234ee704f95594d1d9.tar.xz |
Build system: tweak a little startbuild target and move successful_build target to help makefile
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildsystem.mk | 63 | ||||
-rw-r--r-- | mk/help.mk | 48 | ||||
-rw-r--r-- | mk/macros.mk | 2 |
3 files changed, 59 insertions, 54 deletions
diff --git a/mk/buildsystem.mk b/mk/buildsystem.mk index 18191b3..cb25c41 100644 --- a/mk/buildsystem.mk +++ b/mk/buildsystem.mk @@ -74,51 +74,26 @@ distclean: clean $(Q)rm -rf dl/* src/*.git src/*.svn .config.old $(Q)rm -rf $(EMBTK_GENERATED) -startbuild: - @if [ -e $(GCC3_BUILD_DIR)/.installed ]; then \ - echo "#################### Embtoolkit Warning ######################"; \ - echo "# Warning trying to restart all the build while it is already"; \ - echo "# done. Please use the correct make target !!!"; \ - echo "##############################################################"; \ - echo; \ - make -s help; \ - else \ - echo "################## Embtoolkit build start ####################"; \ - echo "# Starting build of selected features.."; \ - echo "##############################################################"; \ - echo; \ - $(MAKE) buildtoolchain host_packages_build rootfs_build successful_build; \ - fi +define __embtk_mk_pwarning_restartbuild + $(call embtk_pwarning,"Wrong make target - Use correct make target") + $(call embtk_echo_yellow,"You are trying to restart all the build while it is already") + $(call embtk_echo_yellow,"done. Please use the correct make target!!!") + echo + $(MAKE) help +endef -# Successful build of EmbToolkit message -successful_build: - $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~ ") - $(call embtk_echo_blue,"| Toolchain build log |") - $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~ ") - $(call embtk_echo_blue,"You successfully build your toolchain for $(GNU_TARGET)") - $(call embtk_echo_blue,"Tools built (GCC compiler, Binutils, etc.) are located in:") - $(call embtk_echo_blue," $(TOOLS)/bin") - @echo - $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") - $(call embtk_echo_blue,"| Root file system build log |") - $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") -ifeq ($(CONFIG_EMBTK_HAVE_ROOTFS),y) - $(call embtk_echo_blue,"You also successfully build root filesystem(s) located in the") - $(call embtk_echo_blue,"'generated' sub-directory of EmbToolkit.") -else - $(call embtk_echo_green,"Build of root filesystem not selected.") -endif - @echo - $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") - $(call embtk_echo_blue,"| Embedded systems Toolkit |") - $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") - $(call embtk_echo_blue,"Hope that EmbToolkit will be useful for your project !!!") - $(call embtk_echo_blue,"Please report any bugs/suggestion at:") - $(call embtk_echo_blue," http://www.embtoolkit.org/issues/projects/show/embtoolkit") - $(call embtk_echo_blue,"You can also visit the wiki at:") - $(call embtk_echo_blue," http://www.embtoolkit.org") - @echo - $(call embtk_echo_blue,$(__embtk_msg_h)) +define __embtk_mk_print_selectedfeatures + $(call embtk_pinfo,"Starting build of selected features...") +endef + +define __embtk_mk_startbuild + $(__embtk_mk_print_selectedfeatures) + $(MAKE) buildtoolchain host_packages_build rootfs_build successful_build +endef + +startbuild: + $(if $(call __embtk_mk_pathexist,$(GCC3_BUILD_DIR)/.installed), \ + $(__embtk_mk_pwarning_restartbuild),$(__embtk_mk_startbuild)) define __embtk_mk_initsysrootdirs mkdir -p $(SYSROOT) @@ -25,10 +25,10 @@ help: $(call embtk_pinfo,"Embedded systems Toolkit help. Please \ - visit - http://embtoolkit.org - for more details") - @echo " ---------------------------" + visit - http://www.embtoolkit.org - for more details") + @echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~ " @echo "| Building and configuring: |" - @echo " ---------------------------" + @echo " ~~~~~~~~~~~~~~~~~~~~~~~~~~~ " @echo "make xconfig: Show EmbToolkit configure GUI and let you to" @echo " configure your toolchain and your root" @echo " filesystem (if selected)." @@ -39,29 +39,59 @@ help: @echo " filesystem (if selected) or start xconfig if" @echo " you did not configure before." @echo - @echo " -----------" + @echo " ~~~~~~~~~~~ " @echo "| Cleaning: |" - @echo " -----------" + @echo " ~~~~~~~~~~~ " @echo "make clean: Remove all built files, but keep downloaded" @echo " packages." @echo @echo "make distclean: WARNING: like clean, but remove all downloaded" @echo " packages and .config.old files." @echo - @echo " -----------------" + @echo " ~~~~~~~~~~~~~~~~~ " @echo "| Root filesystem |" - @echo " -----------------" + @echo " ~~~~~~~~~~~~~~~~~ " @echo "make rootfs_build:" @echo " if after a first build of your toolchain and" @echo " your root filesystem, you change the contents" @echo " of the root filesystem, use this target to" @echo " rebuild it." @echo - @echo " ---------------" + @echo " ~~~~~~~~~~~~~~~ " @echo "| miscellaneous |" - @echo " ---------------" + @echo " ~~~~~~~~~~~~~~~ " @echo "make packages_fetch:" @echo " This will download all needed packages tarball." @echo " This should be used after configuration and if" @echo " you want to do an offline build." @echo + +# Successful build of EmbToolkit message +successful_build: + $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~ ") + $(call embtk_echo_blue,"| Toolchain build log |") + $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~ ") + $(call embtk_echo_blue,"You successfully build your toolchain for $(GNU_TARGET)") + $(call embtk_echo_blue,"Tools built (GCC compiler, Binutils, etc.) are located in:") + $(call embtk_echo_blue," $(TOOLS)/bin") + @echo + $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") + $(call embtk_echo_blue,"| Root file system build log |") + $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") +ifeq ($(CONFIG_EMBTK_HAVE_ROOTFS),y) + $(call embtk_echo_blue,"You also successfully build root filesystem(s) located in the") + $(call embtk_echo_blue,"'generated' sub-directory of EmbToolkit.") +else + $(call embtk_echo_green,"Build of root filesystem not selected.") +endif + @echo + $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") + $(call embtk_echo_blue,"| Embedded systems Toolkit |") + $(call embtk_echo_blue," ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ") + $(call embtk_echo_blue,"Hope that EmbToolkit will be useful for your project !!!") + $(call embtk_echo_blue,"Please report any bugs/suggestion at:") + $(call embtk_echo_blue," http://www.embtoolkit.org/issues/projects/show/embtoolkit") + $(call embtk_echo_blue,"You can also visit the wiki at:") + $(call embtk_echo_blue," http://www.embtoolkit.org") + @echo + $(call embtk_echo_blue,$(__embtk_msg_h)) diff --git a/mk/macros.mk b/mk/macros.mk index 50f3b50..0a5cbe3 100644 --- a/mk/macros.mk +++ b/mk/macros.mk @@ -26,7 +26,7 @@ # Embtoolkit colors __embtk_color_red = "\E[1;31m" __embtk_color_green = "\E[1;32m" -__embtk_color_yellow = "\E[1;33m" +__embtk_color_yellow = "\E[0;33m" __embtk_color_blue = "\E[1;34m" __embtk_no_color = "\E[0m" |