httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject Re: architecture-specific directories
Date Tue, 14 Nov 2000 20:11:21 GMT
> 
> > This is a dependancy issue.  Just change the dependancy to be
> > unix/networkio.h or run make depend in that directory.  The problem is
> > happening because the dependancies were created on a unix box, where OSDIR
> > == DEFAULT_OSDIR.  If you re-run the dependancies on a 390 box and commit
> > the changes this will go away and things will still work on Unix.
>
> Maybe the dependencies should be generated by this code, where I
> reversed the order of checking for DEFOSDIR vs OSDIR so that DEFOSDIR
> is preferred:
> 
>  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: $(DEFOSDIR)/: $$(DEFOSDIR)/:g' \
>                    -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' \
>                    -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' Makefile.new
>             \
>                 > Makefile.in \
>             && rm Makefile.new
> 
> But this, like hand-editing I believe, assumes that the default OS dir
> is unix for any platform that uses this code.

It's worse than that.  I originally thought this would solve the problem
too, but let's say we generate dependancies on unix for sake of
argument.  On Unix, everything would end up in DEFOSDIR, but that is
incorrect on OS390 or BeOS, because those have files in the OSDIR
directory.

It gets even worse when you generate the dependancies on BeOS or 390 (I
know this doesn't actually work), because then you get files in OSDIR for
some platforms that should be in DEFOSDIR for other platforms.

In fact, we can't even hand-generate this, because which platform do you
generate for?  On OS390, I want locks.h to come from DEFOSDIR, but on
BeOS, I want locks.h to come from OSDIR.

> I really appreciate your help!  I'm just a bit tired of staring at
> makefiles :)

The only solutions I keep coming back to is to either remove dependancies
or go back to having the C files define which header they really mean.  I
personally prefer having the C files define it.

Ryan

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



Mime
View raw message