You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2001/03/21 19:58:49 UTC

[Bug 1069] New - The Makefiles fail to locate .cpp -> .o dependency and rebuild .o all the time

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1069

*** shadow/1069	Wed Mar 21 10:58:49 2001
--- shadow/1069.tmp.20507	Wed Mar 21 10:58:49 2001
***************
*** 0 ****
--- 1,47 ----
+ +============================================================================+
+ | The Makefiles fail to locate .cpp -> .o dependency and rebuild .o all the  |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 1069                        Product: Xerces-C                |
+ |       Status: NEW                         Version: 1.4                     |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Minor                    OS/Version: Linux                   |
+ |     Priority: Low                       Component: Build                   |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xerces-c-dev@xml.apache.org                                  |
+ |  Reported By: roman_sulzhyk@yahoo.com                                      |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ Guys:
+ 
+ Because your object files are stored in a different directory and you use suffix
+ rules to build the object files make (gmake) fails to find the target and figure
+ out that it has been built and is up to date, hence rebuilding it every time you
+ do make.
+ 
+ Here's a patch that uses 'vpath' to fix this common problem with GNU make, the
+ file patched is src/Makefile.incl and it should work on all (Unix) platforms.
+ 
+ === Begin patch
+ *** src/Makefile.incl	Wed Mar 21 13:43:12 2001
+ --- src/Makefile.incl.patched	Wed Mar 21 13:53:24 2001
+ ***************
+ *** 394,399 ****
+ --- 394,402 ----
+   .SUFFIXES:
+   .SUFFIXES: .cpp .c .$(TO)
+   
+ + # Tell make where the object files are for proper resolution of suffix rules
+ + vpath %.$(TO) $(XML_OBJ_DIR)
+ + 
+   .cpp.$(TO):
+   	$(CC1) -c $(XML_BUILD_OPTIONS) $(XML_DEF) $(XML_INCL)
+ $(EXTRA_COMPILE_OPTIONS) -o $(XML_OBJ_DIR)/$(@) $(<)
+   
+ === End patch
+ 
+ Thanks!
+ 
+ Roman Sulzhyk, JP Morgan high performance computing group

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: [Bug 1069] New - The Makefiles fail to locate .cpp -> .o dependency and rebuild .o all the time

Posted by "Jason E. Stewart" <ja...@openinformatics.com>.
The patch worked great. much appreciated.

jas.

bugzilla@apache.org writes:

> + file patched is src/Makefile.incl and it should work on all (Unix) platforms.
> + 
> + === Begin patch
> + *** src/Makefile.incl	Wed Mar 21 13:43:12 2001
> + --- src/Makefile.incl.patched	Wed Mar 21 13:53:24 2001
> + ***************
> + *** 394,399 ****
> + --- 394,402 ----
> +   .SUFFIXES:
> +   .SUFFIXES: .cpp .c .$(TO)
> +   
> + + # Tell make where the object files are for proper resolution of suffix rules
> + + vpath %.$(TO) $(XML_OBJ_DIR)
> + + 
> +   .cpp.$(TO):
> +   	$(CC1) -c $(XML_BUILD_OPTIONS) $(XML_DEF) $(XML_INCL)
> + $(EXTRA_COMPILE_OPTIONS) -o $(XML_OBJ_DIR)/$(@) $(<)
> +   
> + === End patch

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org