File tree Expand file tree Collapse file tree 11 files changed +32090
-31998
lines changed Expand file tree Collapse file tree 11 files changed +32090
-31998
lines changed Original file line number Diff line number Diff line change 22# 
33#  PostgreSQL documentation makefile
44# 
5- #  $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.114 2008/12/11 07:34:07 petere  Exp $
5+ #  $PostgreSQL: pgsql/doc/src/sgml/Makefile,v 1.115 2009/05/02 20:17:19 tgl  Exp $
66# 
77# ----------------------------------------------------------------------------
88
@@ -173,13 +173,13 @@ JADE.tex.call = $(JADE) $(JADEFLAGS) $(SGMLINCLUDE) $(CATALOG) -d $(srcdir)/styl
173173#  PostScript from TeX
174174postgres.ps :
175175	$(error  Invalid target;  use postgres-A4.ps or postgres-US.ps as targets) 
176- 	 
176+ 
177177% .ps% .dvi
178178	dvips -o $@  $< 
179179
180180postgres.pdf :
181181	$(error  Invalid target;  use postgres-A4.pdf or postgres-US.pdf as targets) 
182- 	 
182+ 
183183% .pdf% .tex-pdf
184184	@rm -f $* .aux $* .log $* .out
185185#  multiple runs are necessary to create proper intra-document links
@@ -208,12 +208,8 @@ INSTALL HISTORY regress_README: % : %.html
208208INSTALL.html : standalone-install.sgml installation.sgml version.sgml
209209	$(JADE.text )  -V nochunks standalone-install.sgml installation.sgml > $@ 
210210
211- #  remove links to main documentation
212- HISTORY.html : release.sgml
213- 	( echo  ' <!doctype appendix PUBLIC "-//OASIS//DTD DocBook V4.2//EN">' ;  \
214- 	  cat $<  ) |  \ 
215- 	$(PERL )  -p -0 -e ' s/<link\s+linkend[^>]*>//g' |  \ 
216- 	$(PERL )  -p -e ' s/<\/link>//g' > tempfile_HISTORY.sgml
211+ HISTORY.html : generate_history.pl $(wildcard  $(srcdir ) /release* .sgml) 
212+ 	$(PERL )  $<  " $( srcdir) " > tempfile_HISTORY.sgml
217213	$(JADE.text )  -V nochunks tempfile_HISTORY.sgml > $@ 
218214	rm tempfile_HISTORY.sgml
219215
Original file line number Diff line number Diff line change 1- <!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.60  2009/03/25 23: 20:01  tgl Exp $ -->
1+ <!-- $PostgreSQL: pgsql/doc/src/sgml/filelist.sgml,v 1.61  2009/05/02  20:17:19  tgl Exp $ -->
22
33<!entity history    SYSTEM "history.sgml">
44<!entity info       SYSTEM "info.sgml">
138138<!entity errcodes   SYSTEM "errcodes.sgml">
139139<!entity features   SYSTEM "features.sgml">
140140<!entity keywords   SYSTEM "keywords.sgml">
141+ 
141142<!entity release    SYSTEM "release.sgml">
143+ <!entity release-8.4    SYSTEM "release-8.4.sgml">
144+ <!entity release-8.3    SYSTEM "release-8.3.sgml">
145+ <!entity release-8.2    SYSTEM "release-8.2.sgml">
146+ <!entity release-8.1    SYSTEM "release-8.1.sgml">
147+ <!entity release-8.0    SYSTEM "release-8.0.sgml">
148+ <!entity release-7.4    SYSTEM "release-7.4.sgml">
149+ <!entity release-old    SYSTEM "release-old.sgml">
150+ 
142151<!entity acronyms   SYSTEM "acronyms.sgml">
143152
144153<!entity features-supported   SYSTEM "features-supported.sgml">
Original file line number Diff line number Diff line change 1+ # ! /usr/bin/perl -w
2+ 
3+ #  generate_history.pl -- flatten release notes for use as HISTORY file
4+ # 
5+ #  Usage: generate_history.pl srcdir release.sgml >output.sgml
6+ # 
7+ #  The main point of this script is to strip out <link> references, which
8+ #  generally point into the rest of the documentation and so can't be used
9+ #  in a standalone build of the release notes.  To make sure this is done
10+ #  everywhere, we have to fold in the sub-files of the release notes.
11+ # 
12+ #  $PostgreSQL: pgsql/doc/src/sgml/generate_history.pl,v 1.1 2009/05/02 20:17:19 tgl Exp $
13+ 
14+ use  strict;
15+ 
16+ my ($srcdir ) = shift ;
17+ defined ($srcdir ) || die  " $0 : missing required argument: srcdir\n " 
18+ my ($infile ) = shift ;
19+ defined ($infile ) || die  " $0 : missing required argument: inputfile\n " 
20+ 
21+ #  Emit DOCTYPE header so that the output is a self-contained SGML document
22+ print  " <!DOCTYPE appendix PUBLIC \" -//OASIS//DTD DocBook V4.2//EN\" >\n " 
23+ 
24+ process_file($infile );
25+ 
26+ exit  0;
27+ 
28+ sub  process_file  {
29+     my ($filename ) = @_ ;
30+ 
31+     local  *FILE;		#  need a local filehandle so we can recurse
32+ 
33+     my ($f ) = $srcdir  . ' /' $filename ;
34+     open (FILE, $f ) || die  " could not read $f : $! \n " 
35+ 
36+     while  (<FILE>) {
37+ 	#  Recursively expand sub-files of the release notes
38+ 	if  (m /$ / 
39+ 	    process_file($1  . " .sgml" 
40+ 	    next ;
41+ 	}
42+ 
43+ 	#  Remove <link ...> tags, which might span multiple lines
44+ 	while  (m // 
45+ 	    if  (s /\s +linkend[^>]*>// 
46+ 		next ;
47+ 	    }
48+ 	    #  incomplete tag, so slurp another line
49+ 	    $_  .= <FILE>;
50+ 	}
51+ 
52+ 	#  Remove </link> too
53+ 	s ||| g 
54+ 
55+ 	print ;
56+     }
57+     close (FILE);
58+ }
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments