You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2000/11/15 13:01:45 UTC

[BeOS patch] change the way dependencies are built in APR makefiles

These changes are pretty simple...  David, I'll go ahead and commit if
you want but the changes are not tested.

Index: dso/beos/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/beos/Makefile.in,v
retrieving revision 1.6
diff -u -r1.6 Makefile.in
--- dso/beos/Makefile.in	2000/11/09 06:08:35	1.6
+++ dso/beos/Makefile.in	2000/11/15 11:59:38
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 CFLAGS=@CFLAGS@ @OPTIM@
@@ -10,6 +5,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../helpers/mkdep.sh
 
 LIB=libdso.a
 
@@ -32,28 +28,7 @@
 	$(AR) cr $@ $(OBJS)
 	$(RANLIB) $@
 
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-getopt.o: getopt.c misc.h ../../include/apr_private.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_pools.h \
- ../../include/apr_lib.h ../../include/apr_file_io.h \
- ../../include/apr_getopt.h
-start.o: start.c misc.h ../../include/apr_private.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_pools.h \
- ../../include/apr_lib.h ../../include/apr_file_io.h \
- ../../include/apr_getopt.h
Index: locks/beos/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/beos/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- locks/beos/Makefile.in	2000/11/09 06:25:28	1.8
+++ locks/beos/Makefile.in	2000/11/15 11:59:39
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 CFLAGS=@CFLAGS@ @OPTIM@
@@ -10,6 +5,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../helpers/mkdep.sh
 
 LIB=liblock.a
 
@@ -34,29 +30,7 @@
 	$(AR) cr $@ $(OBJS)
 	$(RANLIB) $@
 
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-crossproc.o: crossproc.c ../../include/apr_lock.h \
- ../../include/apr_general.h ../../include/apr_private.h \
- ../../include/apr_errno.h ../../include/apr_lib.h \
- ../../include/apr_file_io.h locks.h
-intraproc.o: intraproc.c ../../include/apr_lock.h \
- ../../include/apr_general.h ../../include/apr_private.h \
- ../../include/apr_errno.h locks.h ../../include/apr_file_io.h \
- ../../include/apr_lib.h
-locks.o: locks.c ../../include/apr_lock.h ../../include/apr_general.h \
- ../../include/apr_private.h ../../include/apr_errno.h locks.h \
- ../../include/apr_file_io.h
Index: network_io/beos/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/beos/Makefile.in,v
retrieving revision 1.12
diff -u -r1.12 Makefile.in
--- network_io/beos/Makefile.in	2000/05/30 18:43:06	1.12
+++ network_io/beos/Makefile.in	2000/11/15 11:59:39
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 CFLAGS=@CFLAGS@ @OPTIM@
@@ -10,6 +5,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include -I../../file_io/unix
 INCLUDES=-I$(INCDIR) -I.
+MKDEP=../../helpers/mkdep.sh
 
 LIB=libnetwork.a
 
@@ -37,60 +33,7 @@
 	$(AR) cr $@ $(OBJS)
 	$(RANLIB) $@
 
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-inet_aton.o: inet_aton.c networkio.h ../../include/apr_network_io.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_file_io.h \
- ../../include/apr_time.h ../../include/apr_portable.h \
- ../../include/apr_thread_proc.h ../../include/apr_lock.h \
- ../../include/apr_lib.h ../../file_io/unix/fileio.h \
- ../../include/apr_private.h
-poll.o: poll.c networkio.h ../../include/apr_network_io.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_file_io.h \
- ../../include/apr_time.h ../../include/apr_portable.h \
- ../../include/apr_thread_proc.h ../../include/apr_lock.h \
- ../../include/apr_lib.h ../../file_io/unix/fileio.h \
- ../../include/apr_private.h
-sendrecv.o: sendrecv.c networkio.h ../../include/apr_network_io.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_file_io.h \
- ../../include/apr_time.h ../../include/apr_portable.h \
- ../../include/apr_thread_proc.h ../../include/apr_lock.h \
- ../../include/apr_lib.h ../../file_io/unix/fileio.h \
- ../../include/apr_private.h
-sockaddr.o: sockaddr.c networkio.h ../../include/apr_network_io.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_file_io.h \
- ../../include/apr_time.h ../../include/apr_portable.h \
- ../../include/apr_thread_proc.h ../../include/apr_lock.h \
- ../../include/apr_lib.h ../../file_io/unix/fileio.h \
- ../../include/apr_private.h
-sockets.o: sockets.c networkio.h ../../include/apr_network_io.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_file_io.h \
- ../../include/apr_time.h ../../include/apr_portable.h \
- ../../include/apr_thread_proc.h ../../include/apr_lock.h \
- ../../include/apr_lib.h ../../file_io/unix/fileio.h \
- ../../include/apr_private.h
-sockopt.o: sockopt.c networkio.h ../../include/apr_network_io.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_file_io.h \
- ../../include/apr_time.h ../../include/apr_portable.h \
- ../../include/apr_thread_proc.h ../../include/apr_lock.h \
- ../../include/apr_lib.h ../../file_io/unix/fileio.h \
- ../../include/apr_private.h
Index: threadproc/beos/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/beos/Makefile.in,v
retrieving revision 1.14
diff -u -r1.14 Makefile.in
--- threadproc/beos/Makefile.in	2000/11/09 06:47:52	1.14
+++ threadproc/beos/Makefile.in	2000/11/15 11:59:41
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 CFLAGS=@CFLAGS@ @OPTIM@
@@ -10,6 +5,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../helpers/mkdep.sh
 
 LIB=libthreadproc.a
 
@@ -40,54 +36,7 @@
 	$(AR) cr $@ $(OBJS)
 	$(RANLIB) $@
 
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-apr_proc_stub.o: apr_proc_stub.c
-proc.o: proc.c threadproc.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h ../../file_io/unix/fileio.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h
-procsup.o: procsup.c threadproc.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h ../../file_io/unix/fileio.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h
-signals.o: signals.c threadproc.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h ../../file_io/unix/fileio.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h
-thread.o: thread.c threadproc.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h ../../file_io/unix/fileio.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h
-threadpriv.o: threadpriv.c threadproc.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- ../../file_io/unix/fileio.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_portable.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_lock.h

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: [BeOS patch] change the way dependencies are built in APR makefiles

Posted by Sascha Schumann <sa...@schumann.cx>.
> >     No. So, what is the point of defining the same stupid thing
> >     over and over?
>
> To keep Greg and Ryan happy, mostly :)  I'm happy with the other
> changes they proposed, but that one seemed a little short sighted.
> But getting back to reality, it is pretty minor to fix later, and it
> is reasonable to wait until we have real breakage to solve.
>
> Sure, I think we'll end up with rules.mk or similar, but for now we
> have forward progress and no quibbling about a detail that can be
> fixed in half an hour once it becomes important.

    Well, remember that the longer you continue this road, the
    more time it will take you to make the switch. "Half an hour"
    is quite an optimistic figure in this regard. ;-)

    - Sascha


Re: [BeOS patch] change the way dependencies are built in APR makefiles

Posted by Jeff Trawick <tr...@bellsouth.net>.
Sascha Schumann <sa...@schumann.cx> writes:

> On Wed, 15 Nov 2000, Jeff Trawick wrote:
> 
> > These changes are pretty simple...  David, I'll go ahead and commit if
> > you want but the changes are not tested.
> 
>     I *really* dislike defining MKDEP in every single Makefile.
> 
>     Does it make maintenance easier?
> 
>     Does it help you to understand the overall system?
> 
>     Is it less error prone?
> 
>     No. So, what is the point of defining the same stupid thing
>     over and over?

To keep Greg and Ryan happy, mostly :)  I'm happy with the other
changes they proposed, but that one seemed a little short sighted.
But getting back to reality, it is pretty minor to fix later, and it
is reasonable to wait until we have real breakage to solve.  

Sure, I think we'll end up with rules.mk or similar, but for now we
have forward progress and no quibbling about a detail that can be
fixed in half an hour once it becomes important.

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: [BeOS patch] change the way dependencies are built in APR makefiles

Posted by Sascha Schumann <sa...@schumann.cx>.
On Wed, 15 Nov 2000, Jeff Trawick wrote:

> These changes are pretty simple...  David, I'll go ahead and commit if
> you want but the changes are not tested.

    I *really* dislike defining MKDEP in every single Makefile.

    Does it make maintenance easier?

    Does it help you to understand the overall system?

    Is it less error prone?

    No. So, what is the point of defining the same stupid thing
    over and over?

    - Sascha