You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 1998/02/12 13:22:29 UTC

Re: cvs commit: apache-1.3/src/regex Makefile.tmpl

I'm all for correct dependencies, but I *really* dislike
ditching the simplicity of "$(INCDIR)/foo.h" for explicit
relative paths.  I'm also slightly concerned about the
portability of the sed script (but only slightly, since
we're not expecting any non-experts to do this, and if
they do it's on their own heads) - I'm not a sed expert,
but ISTR that we've had some problems in the past.  And
I'm also a little bit concerned about the automatic
makedepend on "*.c".  But those are minor - the
explicit paths thing is more significant.  And if it's
gcc-specific, I'd rather make that obvious than beg the
question and have PRs about why it won't work with other
compilers.

How about changing

depend:
    sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
	&& $(CC) -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
	&& mv Makefile.tmpl Makefile.tmpl.bak \
	&& mv Makefile.new Makefile.tmpl

to

depend:
    cp Makefile.tmpl Makefile.tmpl.bak \
	&& sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl > Makefile.new \
        && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
	&& sed -e '1,s: $(INCDIR)/: \$(INCDIR)/:g' Makefile.new > Makefile.tmpl \
        && rm Makefile.new

(untested)?

#ken	P-)}

Re: cvs commit: apache-1.3/src/regex Makefile.tmpl

Posted by Dean Gaudet <dg...@arctic.org>.
But why would you be reading the dependencies?  They're the same as the
much more readable #include statements in the C code.  They're intended
for the consumption of make...

in fact if we could assume that people had half-decent make I would just
"include Makefile.depend" and then we could actually get away with "make
depend" not requiring a ./Configure (which is sooo slow). 

Dean

On Thu, 12 Feb 1998, Rodent of Unusual Size wrote:

> Dean Gaudet wrote:
> > 
> > If you're going to go to this effort, which I think is a waste of time by
> > the way, then you should also search and replace the os/unix stuff.
> 
> Noted.  As you point out, it's my time I'm wasting - if it's a waste,
> which is where my opinion differs.
> 
> > $(INCDIR) doesn't buy us *anything*.  If we change the code so much that
> > there's a change to the incdir then the makefile needs to be whacked
> > seriously and it's trivial at that time to do another "make depend".
> 
> Technically it doesn't accomplish anything, but I think it makes the
> dependencies much more readable.  Too many "../../" sequences and
> I start thinking in Morse code.  With "$(INCDIR)" instead, it is
> very clear at a glance when there are dependencies on things in
> other locations.
> 
> Don't get me wrong - I think the "make depend" fixup is excellent.  I
> just don't think it went quite far enough down the road to ease-of-use,
> and the timing just stank.  No mortal errors.
> 
> #ken	P-)}
> 


Re: cvs commit: apache-1.3/src/regex Makefile.tmpl

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Dean Gaudet wrote:
> 
> If you're going to go to this effort, which I think is a waste of time by
> the way, then you should also search and replace the os/unix stuff.

Noted.  As you point out, it's my time I'm wasting - if it's a waste,
which is where my opinion differs.

> $(INCDIR) doesn't buy us *anything*.  If we change the code so much that
> there's a change to the incdir then the makefile needs to be whacked
> seriously and it's trivial at that time to do another "make depend".

Technically it doesn't accomplish anything, but I think it makes the
dependencies much more readable.  Too many "../../" sequences and
I start thinking in Morse code.  With "$(INCDIR)" instead, it is
very clear at a glance when there are dependencies on things in
other locations.

Don't get me wrong - I think the "make depend" fixup is excellent.  I
just don't think it went quite far enough down the road to ease-of-use,
and the timing just stank.  No mortal errors.

#ken	P-)}

Re: cvs commit: apache-1.3/src/regex Makefile.tmpl

Posted by Dean Gaudet <dg...@arctic.org>.
If you're going to go to this effort, which I think is a waste of time by
the way, then you should also search and replace the os/unix stuff. 

Remember: only developers need dependencies.  Users don't generally need
them.  As long as the files exist, and they all do, then users won't have
a problem no matter what the dependencies are.  Users typically compile
apache once and then they're done with it. 

$(INCDIR) doesn't buy us *anything*.  If we change the code so much that
there's a change to the incdir then the makefile needs to be whacked
seriously and it's trivial at that time to do another "make depend".

Dean

On Thu, 12 Feb 1998, Rodent of Unusual Size wrote:

> I submit this patch for consideration for inclusion after we
> do 1.3b5.  It forces the "make depend" stuff to use gcc by name
> rather than inference, and changes all the explicit relative paths
> to use $(INCDIR) (and maintain that on subsequent "make depend"
> runs).
> 
> #ken	P-)}

Re: cvs commit: apache-1.3/src/regex Makefile.tmpl

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
I submit this patch for consideration for inclusion after we
do 1.3b5.  It forces the "make depend" stuff to use gcc by name
rather than inference, and changes all the explicit relative paths
to use $(INCDIR) (and maintain that on subsequent "make depend"
runs).

#ken	P-)}

Re: cvs commit: apache-1.3/src/regex Makefile.tmpl

Posted by Dean Gaudet <dg...@arctic.org>.
Without the *.c I couldn't have generated dependencies for every single
file... in the past this was an issue because, for example, I couldn't
compile mod_auth_msql on my systems.  But these days since I can compile
everything I suppose it couuld be changed.

This code was in the server until Paul's Makefile rearrangement.  It was
just never cleaned up after the Makefile rearrangement. 

Dean

On Thu, 12 Feb 1998, Rodent of Unusual Size wrote:

> Rodent of Unusual Size wrote:
> > 
> > I'm also a little bit concerned about the automatic
> > makedepend on "*.c".
> 
> Indeed, I found that this varfs on my Digital UNIX system when
> it tries to process mod_auth_db - because DU doesn't have a
> db.h file in the include tree.  Who knows what else will cause
> indigestion on other systems.. but make depend shouldn't be
> run often, and hardly at all except by us.
> 
> #ken	P-)}
> 


Re: cvs commit: apache-1.3/src/regex Makefile.tmpl

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rodent of Unusual Size wrote:
> 
> I'm also a little bit concerned about the automatic
> makedepend on "*.c".

Indeed, I found that this varfs on my Digital UNIX system when
it tries to process mod_auth_db - because DU doesn't have a
db.h file in the include tree.  Who knows what else will cause
indigestion on other systems.. but make depend shouldn't be
run often, and hardly at all except by us.

#ken	P-)}