Problem 35 - Generated dependency files fail
Summary: Generated dependency files fail
Status: CLOSED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: config (show other problems)
Version: 0.1
Hardware: PC Linux
: P2 major
Assignee: Gabriele Cosmo
URL:
: 250 (view as problem list)
Depends on:
Blocks:
 
Reported: 1999-11-18 19:51 CET by wolf
Modified: 2001-04-20 12:07 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description wolf 1999-11-18 19:51:04 CET
NOTE: I also installed p01 for 4.0.1

gmake bails out of some .d files with a 'missing separator' error.

Reason: The first line in each .d has a (spurios?) 'c' after the continuation
backslash. This seems to be wrong.

Fix: I removed the 'c' from the 'echo' command in config/common.gmk
and the code is now compiling. Here is the new code snipplet:

-----------
# Make the .d file(s) and include it(them).
# g++ -MM is good at this, except it forgets the subdirectory
# (hence the use of $G4TMP/).

ifdef G4ODBMS
$(G4TMPDIR)/%.d: src/%.cc $(schema_hh)
else
$(G4TMPDIR)/%.d: src/%.cc
endif
	@if [ ! -d $(G4TMP)/$(G4SYSTEM) ] ; then mkdir $(G4TMP)/$(G4SYSTEM) ;fi
	@if [ ! -d $(G4TMPDIR) ] ; then mkdir $(G4TMPDIR) ;fi
	@echo Making dependency for file $< ...
	@($(ECHO) "$(G4TMPDIR)/ \\" ; \
	g++ -MM $(RWINCGPP) $(CPPFLAGS) $< ) | sed 's!$(G4TMPDIR)/$*.o!& $@!' >$@
-----------
Comment 1 Gabriele Cosmo 1999-11-19 02:01:59 CET
The problem is affecting some version of 'echo' on Linux systems.
\c option is required in order to avoid appending a new line to the
command which may cause the mechanism to fail on most systems.
Please, try adding option -e to ECHO in architecture.gmk for
Linux-g++ setup and leave the original rule as it is. This fix is
already included in the tags for the next release. Thanks.
Comment 2 Gabriele Cosmo 2001-04-20 12:07:59 CEST
*** Bug 250 has been marked as a duplicate of this bug. ***
*** 'Gabriele.Cosmo@cern.ch' will be responsible for bug 250. ***