evms make depend problems

Christian Wiese <[email protected]>
Newsgroups gmane.linux.evms.devel
Message-ID <[email protected]>
Hello,

while packaging evms for the Open System Development Environment
(http://opensde.org) I ran into the problem, that the CPP call of
the make depend target bailed out with 'cpp: too many input files'

Testenvironment:
----------------
System: IBM xSeries 236, 226
Platform: Linux (2.6.18.3)
Target Architecture: x86-64
Target Optimization: EM64T
Compiler: gcc-4.1.1
LibC: glibc-2.5

I solved that issue by changing the way the depend files are created.
Instead of a single CPP call that includes the $(SOURCES) list I loop
over the list and call CPP -MM for each list item.

Attached is the patch of the mentioned change.

Cheers,
--Chris

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Evms-devel mailing list
[email protected]
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel
evms-2.5.5-make-depend.patch (text/x-patch, 867 B)
Submitted by: Christian Wiese (morfoh at opensde.org)
Date: 2006-11-26
Initial Package Version: 2.5.5
Upstream Status: submitted 
Origin: package/filesystem/evms/evms-2.5.5-make-depend.patch by Christian Wiese
Open System Development Environment (http://opensde.org)
Description: Fixes the way evms generates .depend files
While generating the .depend files CPP bails out with: cpp: too many input files

--- evms-2.5.5/make.rules.in.orig	2006-11-26 16:02:13.000000000 +0200
+++ evms-2.5.5/make.rules.in		2006-11-26 16:03:26.000000000 +0200
@@ -137,7 +137,10 @@
 
 # Generating dependencies
 .depend:
-	$(CPP) -M $(EVMS_CPPFLAGS) $(CPPFLAGS) $(EVMS_DEFS) $(SOURCES) > .depend
+	rm -f .depend
+	for i in $(SOURCES); do \
+		$(CPP) -MM $(EVMS_CPPFLAGS) $(CPPFLAGS) $(EVMS_DEFS) $$i >> .depend; \
+	done
 
 # Generating linker version-scripts for the plugins.
 .export:
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.