Bug 56239 - make tests rules improvment
make tests rules improvment
Status: CLOSED CURRENTRELEASE
Product: eCos
Classification: Retired
Component: Patches and contributions (Show other bugs)
1.5.2
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jonathan Larmour
Jonathan Larmour
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-14 09:49 EST by Andrew Lunn
Modified: 2007-04-18 12:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-12-07 09:49:36 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrew Lunn 2001-11-14 09:49:18 EST
Description of Problem:

I am using CDL to build the list of test programs. This can result in
trailing space in the TESTS line in the Makefile.  This then causes a
problem when building the tests. It tries to cat .d which does not exist. 

A simple fix...

Index: pkgconf/rules.mak
===================================================================
RCS file: /data/cvs/plc1g/sa1110/ecos/packages/pkgconf/rules.mak,v
retrieving revision 1.1.1.1
diff -u -c -r1.1.1.1 rules.mak
cvs diff: conflicting specifications of output style
*** pkgconf/rules.mak   2001/09/07 08:41:09     1.1.1.1
--- pkgconf/rules.mak   2001/11/14 14:41:29
***************
*** 137,143 ****
  TESTS := $(TESTS:.S=)
  tests.stamp: $(foreach target,$(TESTS),$(target).d
$(PREFIX)/tests/$(PACKAGE)/$(target)$(EXEEXT))
  ifneq ($(strip $(TESTS)),)
!       @cat $(TESTS:=.d) > $(@:.stamp=.deps)
  endif
        @touch $@
  
--- 137,143 ----
  TESTS := $(TESTS:.S=)
  tests.stamp: $(foreach target,$(TESTS),$(target).d
$(PREFIX)/tests/$(PACKAGE)/$(target)$(EXEEXT))
  ifneq ($(strip $(TESTS)),)
!       @cat $(TESTS:%=%.d) > $(@:.stamp=.deps)
  endif
        @touch $@
Comment 1 Jonathan Larmour 2001-11-21 13:00:16 EST
I've made the fix suggested; thanks for that.

But I do wonder about what has caused this. I think the "correct" fix is to make
sure that trailing
spaces cannot be generated at all.

Bart, looking at the get_tests() function in
host/tools/configtool/common/common/build.cxx should the get_value() method of a
CdlValuable strip trailing space? Or should libcdl always leave the value
absolutely intact and rely on the caller (i.e. get_tests() here) to do that?
Comment 2 Bart Veer 2001-12-07 09:49:30 EST
libcdl's get_value() should definitely not strip trailing spaces. It has no
way of knowing when spaces are significant or not, e.g. there might be a
CYGDAT_ option of some sort containing a message to be displayed to the
user. It is only higher-level code such as the makefile generator or
the make rules themselves that can take such decisions.

In this case I would probably have fixed it slightly differently by e.g.
adding a line
    TESTS := $(strip $(TESTS))
to rules.mak before any other transformations, but the existing fix is
fine.


Note You need to log in before you can comment on or make changes to this bug.