Cannot compile man pages outside source directory

William Poetra Yoga H williampoetra at yahoo.com
Fri May 6 02:43:33 CDT 2005


I've modified the c2man.pl script, now 'make manpages' doesn't exit with an
error, but no file is written to documentation/man3w. What's wrong? The diff is
attached.


William Poetra Yoga Hadisoeseno


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 
-------------- next part --------------
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	6 May 2005 07:35:03 -0000
@@ -61,7 +61,7 @@ $(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)
+	$(C2MAN) -o $(TOPOBJDIR)/documentation/man$(api_manext) -R$(TOPOBJDIR) -D$(SRCDIR) -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)
Index: tools/c2man.pl
===================================================================
RCS file: /home/wine/wine/tools/c2man.pl,v
retrieving revision 1.21
diff -u -p -r1.21 c2man.pl
--- tools/c2man.pl	7 Jan 2005 17:17:23 -0000	1.21
+++ tools/c2man.pl	6 May 2005 07:35:06 -0000
@@ -42,6 +42,7 @@ my $FLAG_64PAIR     = 64; # The 64 bit v
 # Options
 my $opt_output_directory = "man3w"; # All default options are for nroff (man pages)
 my $opt_manual_section = "3w";
+my $opt_source_dir = "";
 my $opt_wine_root_dir = "";
 my $opt_output_format = "";         # '' = nroff, 'h' = html, 's' = sgml
 my $opt_output_empty = 0;           # Non-zero = Create 'empty' comments (for every implemented function)
@@ -236,7 +237,7 @@ sub process_source_file($)
   {
     print "Processing ".$source_file."\n";
   }
-  open(SOURCE_FILE,"<$source_file") || die "couldn't open ".$source_file."\n";
+  open(SOURCE_FILE,"<$source_file") || open(SOURCE_FILE,"<$opt_source_dir$source_file") || die "couldn't open ".$source_file."\n";
 
   # Add this source file to the list of source files
   $source_files{$source_file} = [$source_details];
@@ -2154,6 +2155,10 @@ while(defined($_ = shift @ARGV))
                        my $have_headers = `ls $include >/dev/null 2>&1`;
                        if ($? >> 8 == 0) { @opt_header_file_list = (@opt_header_file_list, $include); }
                      }
+                     last;
+                   };
+      s/^D// && do {
+                     if ($_ ne "") { $opt_source_dir = $_."/"; }
                      last;
                    };
       s/^R// && do { if ($_ =~ /^\//) { $opt_wine_root_dir = $_; }


More information about the wine-devel mailing list