Re: minimizing forks (was Re: commit -- removed unused directory in expat)


Subject: Re: minimizing forks (was Re: commit -- removed unused directory in expat)
From: Sam TH (sam@uchicago.edu)
Date: Mon Feb 05 2001 - 13:44:21 CST


On Mon, Feb 05, 2001 at 02:38:36PM -0500, Thomas Briggs wrote:
>
> > Have you tried the expat build system with MSVC? What errors does it
> > give? I'd like to try to fix them, rather than have you create a new
> > build system.
> >
> > And you didn't really mean preprocesser, right?
>
> Yes I've tried it, and yes I meant preprocessor. There are flags
> hardcoded into the Makefile.in (and not just in expat - the same stuff can
> be found in the Makefile.in in wv, and pretty much everywhere else I looked)
> which cause the MSVC compiler to choke.
> The offending stuff is in the rule for building .c files - it hardcodes
> "-Wp,....(.defs)" or something like that into the Makefile.
> autoconf/configure/whatever the proper term is weren't made to work with
> the MSVC compiler. Any attempt to make them work with the MSVC compiler is
> futile - if anyone else were trying to do it there would be support for it
> already.

Ok, you did mean preprocessor, just not cpp (which is what I think of
when I hear preprocessor).

As to the problem, it's actually really easy to fix. Try passing the
option --include-deps to configure. Or try this patch:

Index: lib/Makefile.in
===================================================================
RCS file: /cvsroot/expat/expat/lib/Makefile.in,v
retrieving revision 1.10
diff -u -r1.10 Makefile.in
--- lib/Makefile.in 2001/01/24 19:41:12 1.10
+++ lib/Makefile.in 2001/02/03 08:00:36
@@ -107,24 +107,10 @@
 .PHONY: all clean distclean maintainer-clean
 
 .c.o:
- @echo '$(COMPILE) -c $<'; \
- $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-cp .deps/$(*F).pp .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm .deps/$(*F).pp
+ $(COMPILE) -c $<
 
 .c.lo:
- @echo '$(LTCOMPILE) -c $<'; \
- test -d .deps || mkdir .deps ; \
- $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
- @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
- < .deps/$(*F).pp > .deps/$(*F).P; \
- tr ' ' '\012' < .deps/$(*F).pp \
- | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
- >> .deps/$(*F).P; \
- rm -f .deps/$(*F).pp
+ $(LTCOMPILE) -c $<
 
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        cd $(top_builddir) \

           
        sam th
        sam@uchicago.edu
        http://www.abisource.com/~sam/
        GnuPG Key:
        http://www.abisource.com/~sam/key




This archive was generated by hypermail 2b25 : Mon Feb 05 2001 - 13:43:42 CST