You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Liviu Nicoara <ni...@roguewave.com> on 2005/12/16 02:26:37 UTC

[PATCH] build process fails in TOPDIR if target (lib, etc.) specified (was Re: makefile patch)

Addressing:

http://issues.apache.org/jira/browse/STDCXX-85

ChangeLog entry:

2005-12-15  Liviu Nicoara  <ni...@roguewave.com>

	* GNUMakefile: removed useless rules: all, builddir, added
	  rule lib, added variable INCDIR
	* etc/config/GNUmakefile.lib: invoked make config when
	  $(INCDIR)/config.h is missing at top of makedep macro


Re: [PATCH] build process fails in TOPDIR if target (lib, etc.) specified (was Re: makefile patch)

Posted by Liviu Nicoara <ni...@roguewave.com>.
>>Index: etc/config/makefile.rules
>>===================================================================
>>--- etc/config/makefile.rules	(revision 357098)
>>+++ etc/config/makefile.rules	(working copy)
>>@@ -157,7 +157,10 @@
>> # move IBM xlC generated .u files to the respective .d files
>> 
>> define makedep
>>-    -@(if [ ! -f $@ ] ; then                                                 \
>>+    -@(if [ ! -f $(INCDIR)/config.h ] ; then                                 \
>>+           $(MAKE) -C$(INCDIR);                                              \
>>+       fi;                                                                   \
>>+       if [ ! -f $@ ] ; then                                                 \
> 
> 
> Would it be possible to make this a dependency of the $(DEPENDDIR)/%.d
> target below instead? I.e., have the .d files depend on config.h...

Yes, it is possible (actually this is the first I tried) but it means
changes to three deps rules  and the addition of a special rule for that
config.h file. If you add more branches to the conditionals governing
the creation of the .d files then you have to add the same dependency to
them too.

This one is the simplest change going to the point where all the deps
rules converge.

Liviu

Re: [PATCH] build process fails in TOPDIR if target (lib, etc.) specified (was Re: makefile patch)

Posted by Martin Sebor <se...@roguewave.com>.
Liviu Nicoara wrote:
> Addressing:
> 
> http://issues.apache.org/jira/browse/STDCXX-85
> 
> ChangeLog entry:
> 
> 2005-12-15  Liviu Nicoara  <ni...@roguewave.com>
> 
         STDCXX-85
         ^^^^^^^^^
This needs to be up here for the Jira Subversion plugin to be able
to associate the change with the issue.

> 	* GNUMakefile: removed useless rules: all, builddir, added
> 	  rule lib, added variable INCDIR
> 	* etc/config/GNUmakefile.lib: invoked make config when
> 	  $(INCDIR)/config.h is missing at top of makedep macro
[...]
> Index: etc/config/makefile.rules
> ===================================================================
> --- etc/config/makefile.rules	(revision 357098)
> +++ etc/config/makefile.rules	(working copy)
> @@ -157,7 +157,10 @@
>  # move IBM xlC generated .u files to the respective .d files
>  
>  define makedep
> -    -@(if [ ! -f $@ ] ; then                                                 \
> +    -@(if [ ! -f $(INCDIR)/config.h ] ; then                                 \
> +           $(MAKE) -C$(INCDIR);                                              \
> +       fi;                                                                   \
> +       if [ ! -f $@ ] ; then                                                 \

Would it be possible to make this a dependency of the $(DEPENDDIR)/%.d
target below instead? I.e., have the .d files depend on config.h...

>             if [ ! -d $(DEPENDDIR) ]; then                                    \
>                 mkdir -p $(DEPENDDIR);                                        \
>             fi;                                                               \
> @@ -196,14 +199,12 @@
>  $(DEPENDDIR)/%.d: %$(AS_EXT)
>  	$(makedep)

...like so:

+  $(DEPENDDIR)/%.d: %$(AS_EXT) $(INCDIR)/config.h
+  	$(makedep)

Martin