summaryrefslogtreecommitdiff
blob: 7007129f74b0854421c8048008375e514e20340c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
From 8e86f59ef3bbe828f6c6b2cb34890b94ffc7453f Mon Sep 17 00:00:00 2001
From: Peter Alfredsen <loki_val@gentoo.org>
Date: Thu, 22 Jan 2009 18:40:28 +0100
Subject: [PATCH 07/10] Add enable-docs option and the associated infrastructure

---
 GNUmakefile             |    4 +-
 common.mk               |   15 +++++-
 config.mk.in            |    9 ++++
 configure.in            |    8 +++
 doc/Makefile            |   34 +++++++++++++
 lib/abyss/HISTORY       |  122 -----------------------------------------------
 lib/abyss/HISTORY-ABYSS |  122 +++++++++++++++++++++++++++++++++++++++++++++++
 lib/abyss/Makefile      |    8 +++-
 lib/abyss/README        |   23 ---------
 lib/abyss/README-ABYSS  |   23 +++++++++
 lib/expat/Makefile      |    8 +++-
 tools/xmlrpc/Makefile   |    4 ++
 12 files changed, 229 insertions(+), 151 deletions(-)
 create mode 100644 stable/doc/Makefile
 delete mode 100644 stable/lib/abyss/HISTORY
 create mode 100644 stable/lib/abyss/HISTORY-ABYSS
 delete mode 100644 stable/lib/abyss/README
 create mode 100644 stable/lib/abyss/README-ABYSS

diff --git a/GNUmakefile b/GNUmakefile
index afa4d72..5f63567 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -8,7 +8,7 @@ export BLDDIR
 
 include $(BLDDIR)/config.mk
 
-SUBDIRS = include lib src tools examples
+SUBDIRS = include lib src tools examples doc
 
 # The reason we don't build tools and examples by default is that they
 # contain executables, which require significantly more from the
@@ -21,7 +21,7 @@ SUBDIRS = include lib src tools examples
 # As with any subdirectory, to build 'tools' or 'examples', cd to the
 # subdirectory and make there.
 
-DEFAULT_SUBDIRS = include lib src
+DEFAULT_SUBDIRS = include lib src doc
 
 ifeq ($(BUILD_TOOLS),yes)
   DEFAULT_SUBDIRS += tools
diff --git a/common.mk b/common.mk
index 30b72e8..63e03ca 100644
--- a/common.mk
+++ b/common.mk
@@ -487,10 +487,10 @@ $(SUBDIRS:%=$(CURDIR)/%):
 
 MKINSTALLDIRS = $(SHELL) $(SRCDIR)/mkinstalldirs
 
-.PHONY: install-common install-headers install-bin install-man
+.PHONY: install-common install-headers install-bin install-man install-doc
 install-common: \
   install-static-libraries install-shared-libraries \
-  install-headers install-bin install-man
+  install-headers install-bin install-man install-doc
 
 INSTALL_LIB_CMD = $(INSTALL_DATA) $$p $(DESTDIR)$(LIBINST_DIR)/$$p
 RANLIB_CMD = $(RANLIB) $(DESTDIR)$(LIBINST_DIR)/$$p
@@ -547,6 +547,17 @@ install-man: $(MAN_FILES_TO_INSTALL)
 	   $(INSTALL_MAN_CMD); \
 	 done
 
+DOCDESTDIR = $(DESTDIR)$(DOCINST_DIR)
+INSTALL_DOC_CMD = $(INSTALL_DATA) $$p $(DOCDESTDIR)/$$p
+
+install-doc: $(DOC_FILES_TO_INSTALL)
+	$(MKINSTALLDIRS) $(DOCDESTDIR)
+	@list='$(DOC_FILES_TO_INSTALL)'; \
+         for p in $$list; do \
+	   echo "$(DOC_FILES_TO_INSTALL)"; \
+	   $(INSTALL_DOC_CMD); \
+	 done
+
 ##############################################################################
 #                           MISCELLANEOUS RULES                              #
 ##############################################################################
diff --git a/config.mk.in b/config.mk.in
index a5c38c9..6a3ae4b 100644
--- a/config.mk.in
+++ b/config.mk.in
@@ -18,6 +18,8 @@
 
 # Here are the options the user chose on 'configure':
 
+include $(SRCDIR)/version.mk
+
 ENABLE_ABYSS_SERVER    = @ENABLE_ABYSS_SERVER@
 ENABLE_ABYSS_THREADS   = @ENABLE_ABYSS_THREADS@
 ENABLE_CPLUSPLUS       = @ENABLE_CPLUSPLUS@
@@ -27,6 +29,7 @@ ENABLE_LIBXML2_BACKEND = @ENABLE_LIBXML2_BACKEND@
 MUST_BUILD_WININET_CLIENT = @MUST_BUILD_WININET_CLIENT@
 MUST_BUILD_CURL_CLIENT    = @MUST_BUILD_CURL_CLIENT@
 MUST_BUILD_LIBWWW_CLIENT  = @MUST_BUILD_LIBWWW_CLIENT@
+INSTALL_DOCS  = @enable_docs@
 BUILD_TOOLS  = @BUILD_TOOLS@
 BUILD_XMLRPC_PSTREAM  = @BUILD_XMLRPC_PSTREAM@
 LSOCKET = @LSOCKET@
@@ -319,10 +322,16 @@ INSTALL_SCRIPT = $(INSTALL) -c -m 755
 # PREFIX is designed to be overridden at make time if the user decides
 # he doesn't like the default specified at 'configure' time.
 
+#datarootdir is the new Autoconf(2.60) name for datadir, which is still
+#accepted, but a warning is issued if datarootdir is not also used.
+
+DATAROOT_DIR = @datarootdir@
+DATAINST_DIR = @datadir@
 LIBINST_DIR = @libdir@
 HEADERINST_DIR = @includedir@
 PROGRAMINST_DIR = @bindir@
 MANINST_DIR = @mandir@/man1
+DOCINST_DIR = $(DATAINST_DIR)/doc/xmlrpc-c-$(XMLRPC_MAJOR_RELEASE).$(XMLRPC_MINOR_RELEASE).$(XMLRPC_POINT_RELEASE)/
 
 # DESTDIR is designed to be overridden at make time in order to relocate
 # the entire install into a subdirectory.
diff --git a/configure.in b/configure.in
index e1e19d2..e857418 100644
--- a/configure.in
+++ b/configure.in
@@ -115,6 +115,14 @@ if test $BUILD_TOOLS = yes; then
 fi
 
 
+AC_ARG_ENABLE(docs,
+  [  --enable-docs  Install the xmlrpc docs], , 
+[enable_docs=no])
+
+AC_MSG_CHECKING(whether to install xmlrpc docs)
+AC_MSG_RESULT($enable_docs)
+AC_SUBST(enable_docs)
+
 dnl Set up the appropriate Makefile substitutions.
 
 CLIENTTEST=clienttest
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644
index 0000000..9deefb1
--- /dev/null
+++ b/doc/Makefile
@@ -0,0 +1,34 @@
+ifeq ($(SRCDIR),)
+  updir = $(shell echo $(dir $(1)) | sed 's/.$$//')
+  SRCDIR := $(call updir,$(CURDIR))
+  BLDDIR := $(SRCDIR)
+endif
+SUBDIR := doc
+
+include $(BLDDIR)/config.mk
+
+DOC_FILES_TO_INSTALL := 
+
+ifeq ($(INSTALL_DOCS),yes)
+  DOC_FILES_TO_INSTALL += COPYING CREDITS DEVELOPING HISTORY INSTALL SECURITY TESTING TODO
+endif
+
+include $(SRCDIR)/common.mk
+
+.PHONY: all
+all:
+
+.PHONY: default
+default:
+
+.PHONY: clean
+clean:
+
+.PHONY: distclean
+distclean:
+
+.PHONY: dep
+dep: dep-common
+
+.PHONY: install
+install: install-common
diff --git a/lib/abyss/HISTORY b/lib/abyss/HISTORY
deleted file mode 100644
index c7774dc..0000000
--- a/lib/abyss/HISTORY
+++ /dev/null
@@ -1,122 +0,0 @@
-Here is some stuff from the README file of the original Abyss source
-package in 2000.  Abyss used to be an independent package and was included
-in Xmlrpc-c for convenience when Xmlrpc-c was created.  Since then, the
-code has been greatly modified and extended for Xmlrpc-c.
-
-The original Abyss project was a product of Moez Mahfoudh mmoez@bigfoot.com.
-
-
-                              ABYSS Web Server
-                             ------------------
-
-
-About:
-------
-
-ABYSS aims to be a fully HTTP/1.1 compliant web server. Its main design
-goals are speed, low resource usage and portability. ABYSS works on most
-UNIX based systems and on Win32 systems (Win95/98/2000/NT).
-
-Copyright:
-----------
-
-Copyright (C) 2000 Moez Mahfoudh. All rights reserved.
-
-Status:
--------
-
-ABYSS is still in development stage. Actual version is 0.3. Many features
-are not implemented yet but the server core works well and seems to be
-stable. It is fully reliable for serving static files on medium load sites.
-In fact, primary benchmarks show that ABYSS is 70% as fast as Apache when
-using the fork system. This rate jumps to 130% when using threads.
-On UNIX platforms, some problems occurred because of the use of the Pthreads
-library. This will be corrected in the future versions. That's why only the
-fork system is usable under UNIX. This lowers performances but guarantees
-stability.
-CGI/1.1 support is still absent from the current version but will be
-included in the near future.
-
-Change Log:
------------
-
-   * Version 0.3 (March 23,2000):
-        o Handles conditional GET requests (by date)
-        o Conforms to all the MUSTs of the RFC2616 (newer version of the
-          HTTP/1.1 protocol draft)
-        o New configuration options (such as pidfile for UNIX systems...)
-        o Handles HEAD and OPTIONS methods
-        o Many bug fixes
-        o Tested on Sun-OS 5.7
-        o Second public release
-
-   * Version 0.2 beta (February 7,2000):
-        o Handles GET on static files
-        o Handles correctly range requests
-        o Conforms to 80% of the MUSTs of the RFC2068 (HTTP/1.1 protocol
-          draft)
-        o Improved code portability (Win32 and UNIX platforms)
-        o Tested on Linux 2.2 and Win95/98
-        o First public release
-
-   * Version 0.1 (January 2000):
-        o Completely rewritten in C
-        o Speed improvement
-        o New memory allocation scheme (using pools)
-        o Never released
-
-   * Version 0.0 (January 2000):
-        o Initial version
-        o Written in C++
-        o Never released
-
-Downloading:
-------------
-
-   * Version 0.3 (current version):
-        o UNIX package (source) abyss-0.3.tar.gz.
-        o Win32 package is not available but you can extract source files
-          from the UNIX package and compile them on Windows without any
-          modification. (Sorry for this inconvenience: I have no Windows
-          machine now to compile the program and to test it. If someone can
-          do that, please email me the zipped package and I'll add it here).
-
-   * Version 0.2 beta:
-        o UNIX package (source) abyss-0.2b.tar.gz.
-        o Win32 package (source+binary) abyss-0.2b.zip.
-
-Installation:
--------------
-
-   * For UNIX systems:
-        o Untar/Ungzip the distribution package with a command like tar xvfz
-          abyss-x.y.tar.gz
-        o Edit the Makefile src/Makefile to meet your system requirements.
-        o Go to directory src and execute make.
-        o The server binary is generated and stored in the bin directory.
-        o Edit the conf/abyss.conf to reflect your system configuration (At
-          least change the paths).
-        o Goto to the bin directory and start the server by typing ./abyss
-          -c ../conf/abyss.conf
-
-   * For Win32 systems:
-        o Unzip the distribution package.
-        o An executable file is already present in the bin directory.
-        o If you wish to recompile the server, open the src/abyss.dsw file
-          with Microsoft Visual C++ 5.0 or higher and rebuild the project.
-        o Edit the conf/abyss.conf to reflect your system configuration (At
-          least change the paths).
-        o Goto to the bin directory and start the server by typing ./abyss
-          -c ../conf/abyss.conf
-
-
-To do:
-------
-
-   * CGI/1.1 support
-   * Web based configuration/administration
-   * Speed improvement
-   * File caching system
-   * Throttling
-   * PUT method handling
-   * ...
diff --git a/lib/abyss/HISTORY-ABYSS b/lib/abyss/HISTORY-ABYSS
new file mode 100644
index 0000000..c7774dc
--- /dev/null
+++ b/lib/abyss/HISTORY-ABYSS
@@ -0,0 +1,122 @@
+Here is some stuff from the README file of the original Abyss source
+package in 2000.  Abyss used to be an independent package and was included
+in Xmlrpc-c for convenience when Xmlrpc-c was created.  Since then, the
+code has been greatly modified and extended for Xmlrpc-c.
+
+The original Abyss project was a product of Moez Mahfoudh mmoez@bigfoot.com.
+
+
+                              ABYSS Web Server
+                             ------------------
+
+
+About:
+------
+
+ABYSS aims to be a fully HTTP/1.1 compliant web server. Its main design
+goals are speed, low resource usage and portability. ABYSS works on most
+UNIX based systems and on Win32 systems (Win95/98/2000/NT).
+
+Copyright:
+----------
+
+Copyright (C) 2000 Moez Mahfoudh. All rights reserved.
+
+Status:
+-------
+
+ABYSS is still in development stage. Actual version is 0.3. Many features
+are not implemented yet but the server core works well and seems to be
+stable. It is fully reliable for serving static files on medium load sites.
+In fact, primary benchmarks show that ABYSS is 70% as fast as Apache when
+using the fork system. This rate jumps to 130% when using threads.
+On UNIX platforms, some problems occurred because of the use of the Pthreads
+library. This will be corrected in the future versions. That's why only the
+fork system is usable under UNIX. This lowers performances but guarantees
+stability.
+CGI/1.1 support is still absent from the current version but will be
+included in the near future.
+
+Change Log:
+-----------
+
+   * Version 0.3 (March 23,2000):
+        o Handles conditional GET requests (by date)
+        o Conforms to all the MUSTs of the RFC2616 (newer version of the
+          HTTP/1.1 protocol draft)
+        o New configuration options (such as pidfile for UNIX systems...)
+        o Handles HEAD and OPTIONS methods
+        o Many bug fixes
+        o Tested on Sun-OS 5.7
+        o Second public release
+
+   * Version 0.2 beta (February 7,2000):
+        o Handles GET on static files
+        o Handles correctly range requests
+        o Conforms to 80% of the MUSTs of the RFC2068 (HTTP/1.1 protocol
+          draft)
+        o Improved code portability (Win32 and UNIX platforms)
+        o Tested on Linux 2.2 and Win95/98
+        o First public release
+
+   * Version 0.1 (January 2000):
+        o Completely rewritten in C
+        o Speed improvement
+        o New memory allocation scheme (using pools)
+        o Never released
+
+   * Version 0.0 (January 2000):
+        o Initial version
+        o Written in C++
+        o Never released
+
+Downloading:
+------------
+
+   * Version 0.3 (current version):
+        o UNIX package (source) abyss-0.3.tar.gz.
+        o Win32 package is not available but you can extract source files
+          from the UNIX package and compile them on Windows without any
+          modification. (Sorry for this inconvenience: I have no Windows
+          machine now to compile the program and to test it. If someone can
+          do that, please email me the zipped package and I'll add it here).
+
+   * Version 0.2 beta:
+        o UNIX package (source) abyss-0.2b.tar.gz.
+        o Win32 package (source+binary) abyss-0.2b.zip.
+
+Installation:
+-------------
+
+   * For UNIX systems:
+        o Untar/Ungzip the distribution package with a command like tar xvfz
+          abyss-x.y.tar.gz
+        o Edit the Makefile src/Makefile to meet your system requirements.
+        o Go to directory src and execute make.
+        o The server binary is generated and stored in the bin directory.
+        o Edit the conf/abyss.conf to reflect your system configuration (At
+          least change the paths).
+        o Goto to the bin directory and start the server by typing ./abyss
+          -c ../conf/abyss.conf
+
+   * For Win32 systems:
+        o Unzip the distribution package.
+        o An executable file is already present in the bin directory.
+        o If you wish to recompile the server, open the src/abyss.dsw file
+          with Microsoft Visual C++ 5.0 or higher and rebuild the project.
+        o Edit the conf/abyss.conf to reflect your system configuration (At
+          least change the paths).
+        o Goto to the bin directory and start the server by typing ./abyss
+          -c ../conf/abyss.conf
+
+
+To do:
+------
+
+   * CGI/1.1 support
+   * Web based configuration/administration
+   * Speed improvement
+   * File caching system
+   * Throttling
+   * PUT method handling
+   * ...
diff --git a/lib/abyss/Makefile b/lib/abyss/Makefile
index a675624..c0d2491 100644
--- a/lib/abyss/Makefile
+++ b/lib/abyss/Makefile
@@ -8,6 +8,12 @@ SUBDIR := lib/abyss
 
 include $(BLDDIR)/config.mk
 
+DOC_FILES_TO_INSTALL := 
+
+ifeq ($(INSTALL_DOCS),yes)
+  DOC_FILES_TO_INSTALL += HISTORY-ABYSS README-ABYSS
+endif
+
 SUBDIRS = src
 
 default: all
@@ -30,7 +36,7 @@ DISTFILES =
 distdir: distdir-common
 
 .PHONY: install
-install: $(SUBDIRS:%=%/install)
+install: $(SUBDIRS:%=%/install) install-common
 
 .PHONY: dep
 dep: $(SUBDIRS:%=%/dep)
diff --git a/lib/abyss/README b/lib/abyss/README
deleted file mode 100644
index b1d6c80..0000000
--- a/lib/abyss/README
+++ /dev/null
@@ -1,23 +0,0 @@
-This directory contains the Abyss HTTP server component of XML-RPC For C/C++
-(Xmlrpc-c).
-
-This was derived from the independently developed and distributed
-Abyss web server package in 2001.  Since that time, work has stopped
-on package except for a non-free derivative of it that the original
-author has done.  He uses the Abyss name for that.
-
-So this is now strictly a piece of Xmlrpc-c.  Some day, we should change
-the name to avoid confusion with the old code on which it was based and
-the current non-free version.
-
-But for Xmlrpc-c, we don't want to enhance this much.  That would
-duplicate the vast amount of work that has gone into other HTTP (web)
-servers such as Apache.  If someone needs fancy HTTP service for
-XML-RPC, he should use Apache.  One can use Apache with Xmlrpc-c
-either by using an Apache request handler plugin or by using a CGI
-script.  Abyss is just for very simple servers, where the complexity
-of using (or even acquiring) Apache would not be warranted.
-
-
-Everything besides what's in the src/ directory is just historical --
-it comes from the original Abyss in 2001.
diff --git a/lib/abyss/README-ABYSS b/lib/abyss/README-ABYSS
new file mode 100644
index 0000000..b1d6c80
--- /dev/null
+++ b/lib/abyss/README-ABYSS
@@ -0,0 +1,23 @@
+This directory contains the Abyss HTTP server component of XML-RPC For C/C++
+(Xmlrpc-c).
+
+This was derived from the independently developed and distributed
+Abyss web server package in 2001.  Since that time, work has stopped
+on package except for a non-free derivative of it that the original
+author has done.  He uses the Abyss name for that.
+
+So this is now strictly a piece of Xmlrpc-c.  Some day, we should change
+the name to avoid confusion with the old code on which it was based and
+the current non-free version.
+
+But for Xmlrpc-c, we don't want to enhance this much.  That would
+duplicate the vast amount of work that has gone into other HTTP (web)
+servers such as Apache.  If someone needs fancy HTTP service for
+XML-RPC, he should use Apache.  One can use Apache with Xmlrpc-c
+either by using an Apache request handler plugin or by using a CGI
+script.  Abyss is just for very simple servers, where the complexity
+of using (or even acquiring) Apache would not be warranted.
+
+
+Everything besides what's in the src/ directory is just historical --
+it comes from the original Abyss in 2001.
diff --git a/lib/expat/Makefile b/lib/expat/Makefile
index 8feab79..97e4169 100644
--- a/lib/expat/Makefile
+++ b/lib/expat/Makefile
@@ -8,6 +8,12 @@ SUBDIR := lib/expat
 
 include $(BLDDIR)/config.mk
 
+DOC_FILES_TO_INSTALL := 
+
+ifeq ($(INSTALL_DOCS),yes)
+  DOC_FILES_TO_INSTALL += expat.html
+endif
+
 # Build up SUBDIRS:
 SUBDIRS = gennmtab xmlparse xmltok
 
@@ -27,7 +33,7 @@ DISTFILES =
 
 distdir: distdir-common
 
-install: $(SUBDIRS:%=%/install)
+install: $(SUBDIRS:%=%/install) install-common
 
 check:
 
diff --git a/tools/xmlrpc/Makefile b/tools/xmlrpc/Makefile
index 7c417b6..1aa96cb 100644
--- a/tools/xmlrpc/Makefile
+++ b/tools/xmlrpc/Makefile
@@ -11,9 +11,13 @@ include $(BLDDIR)/config.mk
 include $(SRCDIR)/tools/common.mk
 
 PROGRAMS_TO_INSTALL := 
+DOC_FILES_TO_INSTALL := 
 
 ifeq ($(MUST_BUILD_CLIENT),yes)
   PROGRAMS_TO_INSTALL += xmlrpc
+  ifeq ($(INSTALL_DOCS),yes)
+    DOC_FILES_TO_INSTALL += xmlrpc.html
+  endif
 endif
 
 all: $(PROGRAMS_TO_INSTALL)
-- 
1.6.1