OT: Wine build system tech info

Vassilis Virvilis vasvir at yahoo.gr
Wed Feb 13 03:47:36 CST 2002


Halo wine-devel people,

Although I understand you probably "enjoy" one of the
best or worst  f^H
debates of all times (who said wine devel is immune to
flamewars after all?
:-) I would like to pose a somewhat off topic question
but still quite
technical.

As part of a private investigation I noticed that both
WINE and LINUX kernel
build systems have a mkdep utility which generates in
clude file
dependencies. What I am looking for is to understand
the reasons behind this
decision for the two very popular projects instead the
recipe
suggested by GNU make documentation.

Here is what GNU MAKE suggests as the preferred way to
handle dependencies.

#---------Makefile Start
TARGET=a
SOURCES=a.c b.c
CFLAGS=-ansi -pedantic -Wall

OBJECTS=$(SOURCES:.c=.o)
DEPS=$(SOURCES:.c=.d)

%.d:    %.c
        set -e; $(CC) -MM $(CPPFLAGS) $< \
                | sed 's/\($*\)\.o[ :]*/\1.o $@ : /g'
> $@; \
                [ -s $@ ] || rm -f $@;

$(TARGET): $(OBJECTS)

include $(DEPS)
#---------Makefile End

This method has the several disadvantages:

i) It is GNU specific (unportable):
        a) Needs accumulative dependencies. That means
        a.o:    a.c
        a.o:    a.h
        does not override the first entry but it means
        a.o:    a.c a.h

        b) It requires the include statement

        c) It requires that MAKE will reload the
Makefile as soon as it
        realizes that the Makefile or any of included
file has been changed.

        d) It uses compiler specific features.

ii) Speed.
        a) Files has to be parsed twice during
compilation.

        b) Slight changes to config.h may result in
unnecessary,
        uncontrolled compilations.


---------------

I would like to know if there are any other reasons
that is not listed here
and or if any of the reasons listed above is more
significant than
the others.

Thank you for your time.

        .Bill




__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com




More information about the wine-devel mailing list