I realized today that we can't compile man pages outside the source directory, c2man complains about being unable to find .c files.
I modified a line in dlls/Makedll.in:
$(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
so that it becomes:
cd $(SRCDIR) && $(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
Then, because documentation/man3w should be in the build directory, we have to modify TOPSRCDIR and TOPOBJDIR for the makefiles. I modified them to:
TOPSRCDIR = @abs_top_srcdir@ TOPOBJDIR = @abs_top_builddir@
Is this correct? I'm testing it (my machine's slow) to see if it breaks anything.
I've just done
for i in `find -name Makefile.in` do cat $i | sed \ -e s/TOPSRCDIR = .*/TOPSRCDIR = @abs_top_srcdir@/ \ -e s/TOPOBJDIR = .*/TOPOBJDIR = @abs_top_builddir@/ \
$i.new
cat $i.new > $i rm $i.new done
and the patch is quite large, about 130k, so maybe I won't post it here (straight to wine-patches if it's ok). Just the first 2:
Index: Makefile.in =================================================================== RCS file: /home/wine/wine/Makefile.in,v retrieving revision 1.161 diff -u -p -r1.161 Makefile.in --- Makefile.in 2 Mar 2005 12:18:55 -0000 1.161 +++ Makefile.in 4 May 2005 10:19:18 -0000 @@ -17,8 +17,8 @@
# Directories
-TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = . +TOPSRCDIR = @abs_top_srcdir@ +TOPOBJDIR = @abs_top_builddir@ SRCDIR = @srcdir@ VPATH = @srcdir@ LIBEXT = @LIBEXT@ Index: dlls/Makedll.rules.in =================================================================== RCS file: /home/wine/wine/dlls/Makedll.rules.in,v retrieving revision 1.71 diff -u -p -r1.71 Makedll.rules.in --- dlls/Makedll.rules.in 8 Mar 2005 16:55:26 -0000 1.71 +++ dlls/Makedll.rules.in 4 May 2005 10:19:18 -0000 @@ -61,13 +61,13 @@ $(MAINSPEC).c: $(MAINSPEC) $(RC_SRCS:.rc # Rules for auto documentation
man: $(C_SRCS) - $(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) + cd $(SRCDIR) && $(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -S$(api_manext) $(INCLUDES) $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
doc-html: $(C_SRCS) - $(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPSRCDIR) $(INCLUDES) -Th $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) + cd $(SRCDIR) && $(C2MAN) -o $(TOPOBJDIR)/documentation/html -R$(TOPSRCDIR) $(INCLUDES) -Th $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
doc-sgml: $(C_SRCS) - $(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPSRCDIR) $(INCLUDES) -Ts $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16) + cd $(SRCDIR) && $(C2MAN) -o $(TOPOBJDIR)/documentation/api-guide -R$(TOPSRCDIR) $(INCLUDES) -Ts $(MAINSPEC:%=-w %) $(SPEC_SRCS16:%=-w %) $(C_SRCS) $(C_SRCS16)
.PHONY: man doc-html doc-sgml
William Poetra Yoga Hadisoeseno
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com