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
Can we make a link to the src dir? Like this:
Index: dlls/shell32/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/shell32/Makefile.in,v retrieving revision 1.89 diff -u -p -r1.89 Makefile.in --- dlls/shell32/Makefile.in 11 Apr 2005 13:04:41 -0000 1.89 +++ dlls/shell32/Makefile.in 4 May 2005 12:51:47 -0000 @@ -1,6 +1,6 @@ EXTRADEFS = -D_SHELL32_ -DCOM_NO_WINDOWS_H -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. +TOPSRCDIR = @abs_top_srcdir@ +TOPOBJDIR = @abs_top_builddir@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = shell32.dll @@ -85,10 +85,11 @@ authors.c: $(TOPSRCDIR)/AUTHORS (LC_ALL=C; export LC_ALL; echo 'const char * const SHELL_Authors[] = {' && \ sed -e '1,2d' -e 's/(.*)/ "\1",/' $(TOPSRCDIR)/AUTHORS && \ echo ' 0 };') >$@ || ($(RM) $@ && false) + ln -sf $(TOPOBJDIR)/dlls/shell32/authors.c $(SRCDIR)/authors.c
depend: authors.c
clean:: - $(RM) authors.c + $(RM) authors.c $(SRCDIR)/authors.c
### Dependencies:
And for the files in windows/:
Index: dlls/user/Makefile.in =================================================================== RCS file: /home/wine/wine/dlls/user/Makefile.in,v retrieving revision 1.93 diff -u -p -r1.93 Makefile.in --- dlls/user/Makefile.in 27 Apr 2005 08:18:20 -0000 1.93 +++ dlls/user/Makefile.in 4 May 2005 12:51:47 -0000 @@ -1,6 +1,6 @@ EXTRADEFS = -D_USER32_ -D_WINABLE_ -TOPSRCDIR = @top_srcdir@ -TOPOBJDIR = ../.. +TOPSRCDIR = @abs_top_srcdir@ +TOPOBJDIR = @abs_top_builddir@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = user32.dll @@ -15,10 +15,10 @@ SPEC_SRCS16 = \ user.exe.spec
C_SRCS = \ - $(TOPOBJDIR)/windows/driver.c \ - $(TOPOBJDIR)/windows/multimon.c \ - $(TOPOBJDIR)/windows/syscolor.c \ - $(TOPOBJDIR)/windows/user.c \ + $(TOPSRCDIR)/windows/driver.c \ + $(TOPSRCDIR)/windows/multimon.c \ + $(TOPSRCDIR)/windows/syscolor.c \ + $(TOPSRCDIR)/windows/user.c \ button.c \ caret.c \ class.c \
I think these patches are good enough. Any suggestions?
William Poetra Yoga Hadisoeseno
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Well, I'm sorry I have to reply myself twice, but I think this thread is somewhat unusually quiet...
Anyway, here's the full patch, gzipped (~10KB). Should I submit it to wine-patches in a plaintext format (~130KB) or a gzipped format?
William Poetra Yoga Hadisoeseno
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
William Poetra Yoga H williampoetra@yahoo.com writes:
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.
No, you don't want to put absolute paths in makefiles. c2man should be fixed to load files from the source directory if they are not found in the build directory.