From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27897 invoked by alias); 13 Aug 2011 13:17:19 -0000 Received: (qmail 27889 invoked by uid 22791); 13 Aug 2011 13:17:18 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f49.google.com (HELO mail-fx0-f49.google.com) (209.85.161.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 13 Aug 2011 13:17:02 +0000 Received: by fxd20 with SMTP id 20so3623687fxd.36 for ; Sat, 13 Aug 2011 06:17:00 -0700 (PDT) Received: by 10.223.20.154 with SMTP id f26mr2775304fab.104.1313241420604; Sat, 13 Aug 2011 06:17:00 -0700 (PDT) Received: from vostro ([178.123.252.91]) by mx.google.com with ESMTPS id s14sm1470220fah.5.2011.08.13.06.16.57 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 13 Aug 2011 06:16:58 -0700 (PDT) Date: Sat, 13 Aug 2011 13:17:00 -0000 From: Sergei Gavrikov To: eCos Developers Subject: Verbose modes for eCos makefiles Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1867477030-1313241418=:17695" X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2011-08/txt/msg00003.txt.bz2 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1867477030-1313241418=:17695 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Content-length: 3511 Hi I've written a few small patches to add a bit of sugar for eCos build process when ``ecosconfig`` and ``make`` are used from command line. Example: % ecosconfig new pid % ecosconfig tree % make GEN mlt_arm_pid_ram.ldi GEN mlt_arm_pid_rom.ldi GEN mlt_arm_pid_ram.h GEN mlt_arm_pid_rom.h headers finished GEN ecos.mak GEN arm.inc GEN heapgeninc.tcl GEN heaps.cxx CC hal_misc.c ... CXX errno.cxx AR libtarget.a CC vectors.S GEN target.ld build finished It was added a few checks for "V" variable (a verbose level) in eCos ``rules.mak`` file and the level of the verbosity is set in a top most eCos ``makefile`` (which is auto-generated). The level of verbosity can be set from a command line as ``make V=x`` where "x" can be set to 0, 1, or 2) V=0 - silent build (it is equal to a call ``make --silent``) V=1 - "semi-silence", when ``make`` outputs a kind of work is doing now V=2 - full output (it is equal to "old" call of ``make``) Default level is 1 (semi-silence). IMHO, it is right value and it is no need to type ``make V=1`` every time. Pros (V=1): - He/she will be know what is running. - He/she will be know/learn an order the build process. - He/she will see any warnings and possible they will sent us the patches to fix it :-) % make tests ... CC strtoul.c LINK strtoul CC memchr.c /home/sg/repo/ecos-hg/packages/language/c/libc/string/current/tests/memchr.c: In function ‘main’: /home/sg/repo/ecos-hg/packages/language/c/libc/string/current/tests/memchr.c:107: warning: assignment discards qualifiers from pointer target type LINK memchr ... Cons: - It is needed to re-built ``ecosconfig`` to get it working. NOTE: Only a few lines were added to only one source host/tools/configtool/common/common/build.cxx - Very few people work with command-line and they need to know about V=x (V=2). - eCos ConfigTool (may be "semi-silence" is odd for it, not tested). - ? About ``make`` and ``make_objects`` rules in eCos config files (CDL). Fortunately, it is not required to fix the lines which call any compiler or generator. I did not use a function to wrap the calls and only added 1 "echo-line" by a condition per a "generator", e.g.: --- a/packages/hal/synth/arch/current/cdl/hal_synth.cdl +++ b/packages/hal/synth/arch/current/cdl/hal_synth.cdl @@ -65,6 +65,7 @@ cdl_package CYGPKG_HAL_SYNTH { make { /lib/target.ld: /src/synth.ld + $(if $(filter 1,$(V)),@echo " GEN $(notdir $@)") $(CC) -E -P -Wp,-MD,target.tmp -DEXTRAS=1 -xc $(INCLUDE_PATH) $(ACTUAL_CFLAGS) -o $@ $< @echo $@ ": \\" > $(notdir $@).deps @tail -n +2 target.tmp >> $(notdir $@).deps NOTE: May be you offer/know a better 1-liner. I've "invented" it, because it was not possible to use make's "ifeq/ifneq" there. Thus, it seems to me we will not break eCos build process when we will fix the eCos config files. FYI: I already have the patches for arm/synth/i386/memalloc eCos config files. Also a check for V-variable was added to eCos examples/Makefile. Well, if you do not see any pitfalls in such a modernism I can send the patches to eCos Bugzilla, otherwise, please forget it. I'm sorry for this long post (in a fact, I could write, I would add a few checks for "V" variable to eCos makefiles. Do you agree with it? Sergei --8323329-1867477030-1313241418=:17695--