You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2001/01/19 22:47:44 UTC

cvs commit: httpd-2.0/build rules.mk

rbb         01/01/19 13:47:44

  Modified:    .        CHANGES
               build    rules.mk
  Log:
  Fix make depend for the whole server
  
  Revision  Changes    Path
  1.46      +4 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- CHANGES	2001/01/19 19:31:00	1.45
  +++ CHANGES	2001/01/19 21:47:43	1.46
  @@ -1,5 +1,9 @@
   Changes with Apache 2.0b1
   
  +  *) Do not try to run make depend if there are no .c files in the
  +     current directory, doing so makes `make depend` fail.
  +     [Ryan Bloom]
  +
      *) Update highperformance.conf to work with either prefork or
         pthreads mpms.  [Greg Ames] 
   
  
  
  
  1.38      +4 -2      httpd-2.0/build/rules.mk
  
  Index: rules.mk
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/build/rules.mk,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- rules.mk	2001/01/12 00:24:40	1.37
  +++ rules.mk	2001/01/19 21:47:44	1.38
  @@ -176,8 +176,10 @@
   distclean-p depend-p clean-p:
   
   depend: depend-recursive
  -	gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true
  -#	test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
  +	if test "`find . -name "*.c" -maxdepth 1 -print`" != ""; then \
  +	    gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true;           \
  +	fi
  +#	    test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
   
   clean: clean-recursive clean-x
   
  
  
  

Re: cvs commit: httpd-2.0/build rules.mk

Posted by rb...@covalent.net.
> >    depend: depend-recursive
> >   -	gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true
> >   -#	test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
> >   +	if test "`find . -name "*.c" -maxdepth 1 -print`" != ""; then \
> >   +	    gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true;           \
> >   +	fi
> >   +#	    test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
> 
> Jeff pointed out to me a while back that maxdepth isn't portable (I tried to
> use it, too :-)
> 
> I got a fix for this...

I have 2 things to say to you...

Damn! and Cool!   :-)

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: httpd-2.0/build rules.mk

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Jan 19, 2001 at 09:47:44PM -0000, rbb@apache.org wrote:
>...
>   --- rules.mk	2001/01/12 00:24:40	1.37
>   +++ rules.mk	2001/01/19 21:47:44	1.38
>   @@ -176,8 +176,10 @@
>    distclean-p depend-p clean-p:
>    
>    depend: depend-recursive
>   -	gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true
>   -#	test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps
>   +	if test "`find . -name "*.c" -maxdepth 1 -print`" != ""; then \
>   +	    gcc -MM $(INCLUDES) $(EXTRA_INCLUDES) $(DEFS) $(CPPFLAGS) $(srcdir)/*.c | sed 's/\.o:/.lo:/' > $(builddir)/.deps || true;           \
>   +	fi
>   +#	    test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps

Jeff pointed out to me a while back that maxdepth isn't portable (I tried to
use it, too :-)

I got a fix for this...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: cvs commit: httpd-2.0/build rules.mk

Posted by rb...@covalent.net.
> >   +	if test "`find . -name "*.c" -maxdepth 1 -print`" != ""; then \
> 
>     That is overkill.  A faster solution is just a few lines
>     away:
> 
> >   +#	    test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps

I actually tried that, and it didn't work for me.  I assumed it was
commented out for a reason when I couldn't make it work, so I hacked
something else together.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: httpd-2.0/build rules.mk

Posted by Sascha Schumann <sa...@schumann.cx>.
>   +	if test "`find . -name "*.c" -maxdepth 1 -print`" != ""; then \

    That is overkill.  A faster solution is just a few lines
    away:

>   +#	    test "`echo *.c`" = '*.c' || perl $(top_srcdir)/build/mkdep.perl $(CPP) $(INCLUDES) $(EXTRA_INCLUDES) *.c > .deps

    - Sascha