/[ddp]/manuals/trunk/quick-reference/Makefile
ViewVC logotype

Diff of /manuals/trunk/quick-reference/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7012 by osamu, Mon Dec 28 17:27:48 2009 UTC revision 7013 by osamu, Tue Dec 29 08:46:30 2009 UTC
# Line 8  Line 8 
8  # Build from xml only as default (package) -- for squeeze (package)  # Build from xml only as default (package) -- for squeeze (package)
9  # to avoid regression caused by asciidoc 8.4.1  # to avoid regression caused by asciidoc 8.4.1
10  ifdef DEBIAN_PACKAGE_BUILD_MODE  ifdef DEBIAN_PACKAGE_BUILD_MODE
11  # For squeeze  # When executed from pbuilder, debuild, debian/rules, ...
12  BUILD_MODE      := xml  BUILD_MODE      := deb
13  else  else
14  # Now local machine is lenny  # If run directlt from make on lenny-derivative, this is "5.0"
15  BUILD_MODE      := asciidoc  BUILD_MODE      := $(sed 's#\(^...\).*#\1#' /etc/debian_version)
16  endif  endif
17    # BUILD_MODE value to for building from asciidoc
18  # Force "publish" targets to use BUILD_MODE=asciidoc for DDP  BUILD_MODE_ASCIIDOC := 5.0
19    
20  # Please note package build and ddp script overides $(PUBLISHDIR)  # Please note package build and ddp script overides $(PUBLISHDIR)
21  # if $(PUBLISHDIR) is not set, set it here for testing  # if $(PUBLISHDIR) is not set, set it here for testing
# Line 61  LANGSGML =     $(filter-out en $(LANGPO), $( Line 61  LANGSGML =     $(filter-out en $(LANGPO), $(
61    
62  # remotely fetched data cached locally but removed for package  # remotely fetched data cached locally but removed for package
63  DATASRCS:=      all-popcon-results.txt packages.txt packages.bkup.txt  DATASRCS:=      all-popcon-results.txt packages.txt packages.bkup.txt
64  # AsciiDoc source file names in $(ADOC) directories  # AsciiDoc source file names in $(ADOC) directories for local update
65  ASC_NM  :=      00_preface.txt 01_tutorial.txt 02_package.txt \  ASC_NM  :=      00_preface.txt 01_tutorial.txt 02_package.txt \
66                  03_sysinit.txt 04_auth.txt 05_network.txt 06_netapp.txt \                  03_sysinit.txt 04_auth.txt 05_network.txt 06_netapp.txt \
67                  07_xwindow.txt 08_i18nl10ntxt 09_systips.txt 10_datamngt.txt \                  07_xwindow.txt 08_i18nl10ntxt 09_systips.txt 10_datamngt.txt \
# Line 71  ASC_NM :=      00_preface.txt 01_tutorial.txt Line 71  ASC_NM :=      00_preface.txt 01_tutorial.txt
71  SRC_ASC :=      $(addprefix $(ADOC)/, $(ASC_NM))  SRC_ASC :=      $(addprefix $(ADOC)/, $(ASC_NM))
72    
73    
74  # source XML inclusion files (build prcess requires these)  # source XML inclusion files
75  SRC_ENT :=      header.txt datadatepop.ent datadatesize.ent popcon.ent pkgsize.ent common.ent  SRC_ENT         :=      datadatepop.ent datadatesize.ent popcon.ent pkgsize.ent
76  # source PO files (build prcess requires these)  # source PO files (build prcess requires these)
77  SRC_PO  :=      $(addsuffix .po, $(addprefix  $(PODOC)/$(DOCNAME)., $(LANGPO)))  SRC_PO  :=      $(addsuffix .po, $(addprefix  $(PODOC)/$(DOCNAME)., $(LANGPO)))
78  # source XML file (package build requires these)  # pristine source XML / PO files (package build requires these)
79  SRC_XML  =      $(DOCNAME).raw.xml $(SRC_ENT) $(SRC_PO)  SRC_XML  =      $(DOCNAME).raw.xml $(SRC_ENT) $(SRC_PO)
80    
81    #######################################################################
82    # Build all sources to html and text pages (Default target)     ALL/DEB
83    #######################################################################
84    .PHONY: all
85    all: html txt css
86            $(MAKE) -C sgml all PUBLISHDIR=$(PUBLISHDIR) "LANG_ALL=$(LANGSGML)"
87    # When building for Debian packages, build debhelper entries for install
88    ifdef DEBIAN_PACKAGE_BUILD_MODE
89            # Generate files for debhelper in debian/
90            cd $(CURDIR)/debian/ ; \
91            cp postinst.in     $(DOCNAME)-common.postinst ; \
92            for xx in $(LANGALL) ; do \
93              cp postinst.in     $(DOCNAME)-$${xx}.postinst ; \
94              cp postrm.in       $(DOCNAME)-$${xx}.postrm ; \
95              case $$xx in \
96                en) LANGX="English" ;;  \
97                de) LANGX="German" ;;   \
98                fr) LANGX="French" ;;   \
99                fi) LANGX="Finnish" ;;  \
100                es) LANGX="Spanish" ;;  \
101                it) LANGX="Italian" ;;  \
102                ja) LANGX="Japanese" ;; \
103                pl) LANGX="Polish" ;; \
104                pt-br) LANGX="Portuguese (Brazil)" ;; \
105                zh-tw) LANGX="Chinese (Traditional)" ;; \
106                zh-cn) LANGX="Chinese (Simplified)" ;; \
107              esac ; \
108              cp $(DOCNAME).dirs.in $(DOCNAME)-$${xx}.dirs ; \
109              sed  -e "s/@@/$$xx/" -e "s/@LANG@/$$LANGX/" < $(DOCNAME).doc-base.in  >$(DOCNAME)-$${xx}.doc-base ; \
110              sed  -e "s/@@/$$xx/" < $(DOCNAME).install.in  >$(DOCNAME)-$${xx}.install ; \
111            done
112    endif
113    #######################################################################
114    # Build all sources to html and text pages for web (DDP on alioth)  DDP
115    #######################################################################
116    .PHONY: publish
117    
118    # $(PUBLISHDIR) is set to be: /org/www.debian.org/www/doc/manuals for master-www
119    publish:
120            -mkdir -p $(PUBLISHDIR)/debian-reference
121            -rm -f $(PUBLISHDIR)/reference
122            # For www.debian.org, relative symlink only
123            -ln -sf debian-reference $(PUBLISHDIR)/reference
124            # When DDP moves to squeeze, change to BUILD_MODE=xml
125            $(MAKE) html txt css BUILD_MODE=asciidoc PUBLISHDIR=$(PUBLISHDIR)/debian-reference "LANGPO=$(LANGPO)"
126            $(MAKE) -C sgml all PUBLISHDIR=$(PUBLISHDIR)/debian-reference "LANG_ALL=$(LANGSGML)"
127    
128    #######################################################################
129    # Clean targets                                                     ALL
130    #######################################################################
131    .PHONY: clean distclean
132    
133    clean:
134            -rm -f *.swp *~ *.tmp
135            -rm -f $(PODOC)/*~ $(ADOC)/*~
136            -rm -rf html
137            -mkdir -p html
138            -rm -f $(addsuffix .xml,      $(addprefix  $(DOCNAME)., en $(LANGPO)))
139            -rm -f $(DOCNAME).en.xmlt
140            $(MAKE) -C sgml clean "LANG_ALL=$(LANGSGML)" PUBLISHDIR=$(PUBLISHDIR)
141            # Clean files for debhelper in debian/
142            -rm -f $(addsuffix .postinst, $(addprefix  $(DOCNAME)., $(LANGALL)))
143            -rm -f $(addsuffix .postrm,   $(addprefix  $(DOCNAME)., $(LANGALL)))
144            -rm -f $(addsuffix .dirs,     $(addprefix  $(DOCNAME)., $(LANGALL)))
145            -rm -f $(addsuffix .doc-base, $(addprefix  $(DOCNAME)., $(LANGALL)))
146            -rm -f $(addsuffix .install,  $(addprefix  $(DOCNAME)., $(LANGALL)))
147            -rm -f $(addsuffix .postinst, $(addprefix  $(DOCNAME)., $(LANGALL)))
148    
149    # Run distclean only for regenerating all locally cached data from remote
150    #                          (and all raw XML from asciidoc for lenny@local)
151    distclean: clean
152            # We should clean these local cached data for debian package
153            -rm -f all-popcon-results.txt packages.txt packages.bkup.txt pkg.lst
154            -rm -f pkg.lst header.txt common.ent
155    ifneq ($(BUILD_MODE),$(BUILD_MODE_ASCIIDOC))
156            -rm -f $(DOCNAME).raw.xml $(SRC_ENT)
157    endif
158    
159  #########################################################################  #########################################################################
160  # Local raw XML files and base data created from asciidoc in lenny  LOCAL  # Local raw XML file created from asciidoc in lenny                 LOCAL
161  #########################################################################  #########################################################################
162  #=======================================================================#  #=======================================================================#
163  ifeq ($(BUILD_MODE),asciidoc)  ifeq ($(BUILD_MODE),$(BUILD_MODE_ASCIIDOC))
164  #=======================================================================#  #=======================================================================#
165    
166  .SECONDARY: $(SRC_XML)  .SECONDARY: $(SRC_XML)
# Line 94  ifeq ($(BUILD_MODE),asciidoc) Line 172  ifeq ($(BUILD_MODE),asciidoc)
172  #    Marking a file as secondary also marks it as intermediate.  #    Marking a file as secondary also marks it as intermediate.
173    
174  # -----------------------------------------------------------------------  # -----------------------------------------------------------------------
 # This is cleaned after "make distclean"  
175  # create a raw XML source from asciidoc source  # create a raw XML source from asciidoc source
176  # Regression caused by asciidoc 8.4.1 should be addressed by  # Regression caused by asciidoc 8.4.1 should be addressed by
177  # "-a no-inline-literal" but .... this does not work.  Use lenny only.  # "-a no-inline-literal" but .... this does not work.  Use lenny only.
# Line 103  $(DOCNAME).raw.xml: $(SRC_ASC) Line 180  $(DOCNAME).raw.xml: $(SRC_ASC)
180          sed -e "/<\/authorinitials>/r $(ADOC)/copyright.txt" |\          sed -e "/<\/authorinitials>/r $(ADOC)/copyright.txt" |\
181          xmllint --format -  |\          xmllint --format -  |\
182          sed -f bin/replace > $@          sed -f bin/replace > $@
183    #=======================================================================#
184    eles
185    #=======================================================================#
186    # After squeeze, $(DOCNAME).raw.xml is pristine source and should not be rebuild.
187    # To avoid dependency issues due to "$(DOCNAME).%.xml:", we need this target:
188    $(DOCNAME).raw.xml:
189            echo "You need to run \"make xml\" in lenny environment or get it as pristine source."
190            exit 1
191    #=======================================================================#
192    endif
193    #=======================================================================#
194    
195  # -----------------------------------------------------------------------  #########################################################################
196  # Remotely fetched files prior to the build after "make distclean"  # Local cached data created from remote data by local updates       LOCAL
197  # These are cleaned after "make clean" for Debian package build  #########################################################################
 # These will not be a part of source except datadate{pop|size}.ent  
198  # datadate{pop|size}.ent are generated as secondary side effects  # datadate{pop|size}.ent are generated as secondary side effects
199    # These files are not part of the packaged source
200    
201  all-popcon-results.txt:  all-popcon-results.txt:
202          wget -O - $(UPOPC) | zcat - > $@          wget -O - $(UPOPC) | zcat - > $@
# Line 138  packages.bkup.txt: Line 226  packages.bkup.txt:
226          grep-dctrl -e -sPackage,Installed-Size -P "." packages.bkup.tmp > $@          grep-dctrl -e -sPackage,Installed-Size -P "." packages.bkup.tmp > $@
227          rm packages.bkup.tmp          rm packages.bkup.tmp
228    
229  # trick to allow building source w/o all-popcon-results.txt for minor update.  pkg.lst: $(DOCNAME).raw.xml
230            xsltproc --novalid $(VERBOSE) $(PXSLT)/pkg.xsl $< > $@
231    
232    #########################################################################
233    # Local base data created from cached data by local updates         LOCAL
234    #########################################################################
235    # These $(SRC_ENT) files are part of the packaged prestine source.
236    # These $(SRC_ENT) need to be rebuild if $(DOCNAME).raw.xml is updated.
237    # But these $(SRC_ENT) do not depend on $(DOCNAME).raw.xml intentionally to
238    # avoid long build tine.  Beakage due to these are rare, minor and pedictable.
239    # To rebuild these $(SRC_ENT), do "make distclean" first.
240    
241    .PHONY: xml
242    xml: $(DOCNAME).raw.xml $(SRC_ENT)
243    
244  datadatepop.ent:  datadatepop.ent:
245          $(MAKE) all-popcon-results.txt          $(MAKE) all-popcon-results.txt
246    
 # trick to allow building source w/o packages.txt  
247  datadatesize.ent:  datadatesize.ent:
248          $(MAKE) packages.txt          $(MAKE) packages.txt
249    
250  # trick to allow building source w/o all-popcon-results.txt and pkg.lst  popcon.ent:
251  popcon.ent: $(DOCNAME).raw.xml          if ! [ -f $(DOCNAME).raw.xml ]; then $(MAKE) $(DOCNAME).raw.xml ; fi
252          if ! [ -f all-popcon-results.txt ]; then $(MAKE) all-popcon-results.txt ; fi          if ! [ -f all-popcon-results.txt ]; then $(MAKE) all-popcon-results.txt ; fi
253          if ! [ -f pkg.lst ] || [ $(DOCNAME).raw.xml -nt pkg.lst ]; then $(MAKE) pkg.lst ; fi          if ! [ -f pkg.lst ] || [ $(DOCNAME).raw.xml -nt pkg.lst ]; then $(MAKE) pkg.lst ; fi
254          echo "<!ENTITY pop-submissions \"$(shell sed -n -e 's/^Submissions: *\([^ ]*\) *$$/\1/p' < all-popcon-results.txt)\">"  >  $@          echo "<!ENTITY pop-submissions \"$(shell sed -n -e 's/^Submissions: *\([^ ]*\) *$$/\1/p' < all-popcon-results.txt)\">"  >  $@
# Line 156  popcon.ent: $(DOCNAME).raw.xml Line 257  popcon.ent: $(DOCNAME).raw.xml
257          TOTAL=$(shell sed -n -e 's/^Submissions: *\([^ ]*\) *$$/\1/p' < all-popcon-results.txt) ;\          TOTAL=$(shell sed -n -e 's/^Submissions: *\([^ ]*\) *$$/\1/p' < all-popcon-results.txt) ;\
258          grep -e '^Package:' all-popcon-results.txt | grep -f pkg.lst | $(PBIN)/popconent $$TOTAL                                >> $@          grep -e '^Package:' all-popcon-results.txt | grep -f pkg.lst | $(PBIN)/popconent $$TOTAL                                >> $@
259    
260  # trick to allow building source w/o packages.txt and packages.bkup.txt and pkg.lst  pkgsize.ent:
261  pkgsize.ent: $(DOCNAME).raw.xml          if ! [ -f $(DOCNAME).raw.xml ]; then $(MAKE) $(DOCNAME).raw.xml ; fi
262          if ! [ -f packages.txt ]; then $(MAKE) packages.txt ; fi          if ! [ -f packages.txt ]; then $(MAKE) packages.txt ; fi
263          if ! [ -f packages.bkup.txt ]; then $(MAKE) packages.bkup.txt ; fi          if ! [ -f packages.bkup.txt ]; then $(MAKE) packages.bkup.txt ; fi
264          if ! [ -f pkg.lst ] || [ $(DOCNAME).raw.xml -nt pkg.lst ]; then $(MAKE) pkg.lst ; fi          if ! [ -f pkg.lst ] || [ $(DOCNAME).raw.xml -nt pkg.lst ]; then $(MAKE) pkg.lst ; fi
265          $(PBIN)/sizeent packages.txt packages.bkup.txt < pkg.lst        > $@          $(PBIN)/sizeent packages.txt packages.bkup.txt < pkg.lst        > $@
266    
 #=======================================================================#  
 endif  
 #=======================================================================#  
267  #########################################################################  #########################################################################
268  # XML file operations                                                 ALL  # XML file operations                                                 ALL
269  #########################################################################  #########################################################################
270  # Create final XML sources  # Create final XML sources
 # This is not cleaned after "make clean" but cleaned by "make distclean"  
   
 # replace table contents with @-@popcon*@@@ and @@@psize*@-@ and  
 # fix URL referencees and table ID.  
 $(DOCNAME).en.xml: $(DOCNAME).raw.xml header.txt  
         # use asciidoc generated xml file as main contents  
         xsltproc --novalid $(VERBOSE) $(PXSLT)/table.xsl $(DOCNAME).raw.xml |\  
         $(PBIN)/colspec.py  |\  
         sed -e '/<!DOCTYPE /d' -e "1r header.txt" |\  
         sed -e 's/@-@amp@-@/\&/g' -e 's/@-@\([^@]\+\)@-@/\&\1;/g' > $@  
   
 # replace table contents with @-@popcon*@-@ and @-@psize*@-@ with dummy text and  
 # fix URL referencees and table ID as template for translation.  
 $(DOCNAME).en.xmlt: $(DOCNAME).raw.xml header.txt  
         # use asciidoc generated xml file as main contents  
         xsltproc --novalid $(VERBOSE) $(PXSLT)/tablet.xsl $(DOCNAME).raw.xml |\  
         $(PBIN)/colspec.py  |\  
         sed -e '/<!DOCTYPE /d' -e "1r header.txt" |\  
         sed -e 's/@-@amp@-@/\&/g' -e 's/@-@\([^@]\+\)@-@/\&\1;/g' > $@  
271    
272  common.ent: $(filter-out common.ent, $(SRC_XML))  common.ent: $(SRC_XML)
273          echo "<!ENTITY build-date \"$(shell date -u +'%F %T %Z')\">"    >  $@          echo "<!ENTITY build-date \"$(shell date -u +'%F %T %Z')\">"    >  $@
274          echo "<!ENTITY arch \"$(ARCH)\">"                               >> $@          echo "<!ENTITY arch \"$(ARCH)\">"                               >> $@
275          echo "<!ENTITY codename-stable   \"lenny\">"                    >> $@          echo "<!ENTITY codename-stable   \"lenny\">"                    >> $@
# Line 198  common.ent: $(filter-out common.ent, $(S Line 277  common.ent: $(filter-out common.ent, $(S
277          echo "<!ENTITY codename-nexttesting  \"squeeze+1\">"            >> $@          echo "<!ENTITY codename-nexttesting  \"squeeze+1\">"            >> $@
278          echo "<!ENTITY codename-unstable \"sid\">"                      >> $@          echo "<!ENTITY codename-unstable \"sid\">"                      >> $@
279    
280  # Update from $(DOCNAME).raw.xml  # Update URL list header from $(DOCNAME).raw.xml
281  header.txt: $(ADOC)/header1.txt $(DOCNAME).raw.xml $(ADOC)/header2.txt  header.txt: $(ADOC)/header1.txt $(DOCNAME).raw.xml $(ADOC)/header2.txt
282          cat $(ADOC)/header1.txt >  $@          cat $(ADOC)/header1.txt >  $@
283          xsltproc --novalid $(VERBOSE) $(PXSLT)/urls.xsl $(DOCNAME).raw.xml | sort | uniq |\          xsltproc --novalid $(VERBOSE) $(PXSLT)/urls.xsl $(DOCNAME).raw.xml | sort | uniq |\
284          sed -e "s/&/\&amp;/g"   >> $@          sed -e "s/&/\&amp;/g"   >> $@
285          cat $(ADOC)/header2.txt >> $@          cat $(ADOC)/header2.txt >> $@
286    
287  # package name list for popcon and size ent file generation  # Replace table contents with @-@popcon*@@@ and @@@psize*@-@ and
288  # This file is not part of source  # fix URL referencees and table ID.
289  pkg.lst: $(DOCNAME).raw.xml  $(DOCNAME).en.xml: $(DOCNAME).raw.xml header.txt
290          xsltproc --novalid $(VERBOSE) $(PXSLT)/pkg.xsl $< > $@          # use asciidoc generated xml file as main contents
291            xsltproc --novalid $(VERBOSE) $(PXSLT)/table.xsl $(DOCNAME).raw.xml |\
292  #=======================================================================#          $(PBIN)/colspec.py  |\
293  ifneq ($(BUILD_MODE),asciidoc)          sed -e '/<!DOCTYPE /d' -e "1r header.txt" |\
294  #=======================================================================#          sed -e 's/@-@amp@-@/\&/g' -e 's/@-@\([^@]\+\)@-@/\&\1;/g' > $@
 # To avoid dependency issues:  
 $(DOCNAME).raw.xml:  
         echo "You need to run \"make xml\" in lenny environment"  
         exit 1  
295    
296  # To avoid dependency issues:  # Replace table contents with dummy text and
297  #$(SRC_ENT):  # fix URL referencees and table ID as the template for translation.
298  #       echo "You need to run \"make $(SRC_ENT)\" in lenny environment"  # This avoids bloated PO/POT files. (tablet.xsl used insted of table.xsl)
299  #       exit 1  $(DOCNAME).en.xmlt: $(DOCNAME).raw.xml header.txt
300  #=======================================================================#          # use asciidoc generated xml file as main contents
301  endif          xsltproc --novalid $(VERBOSE) $(PXSLT)/tablet.xsl $(DOCNAME).raw.xml |\
302  #=======================================================================#          $(PBIN)/colspec.py  |\
303            sed -e '/<!DOCTYPE /d' -e "1r header.txt" |\
304            sed -e 's/@-@amp@-@/\&/g' -e 's/@-@\([^@]\+\)@-@/\&\1;/g' > $@
305    
306  #########################################################################  #########################################################################
307  # POT/PO file operations                                              ALL  # POT/PO file operations                                              ALL
308  #########################################################################  #########################################################################
309  # Create new POT file in $(PODOC) matching $(DOCNAME).en.xml  # Create new POT file in $(PODOC) matching $(DOCNAME).en.xml
310  .PHONY: pot  .PHONY: pot
311  pot: $(PODOC)/$(DOCNAME).pot $(PODOC)/urls.pot  pot: $(PODOC)/$(DOCNAME).pot
312    
313  # create pot file from template xml  # create pot file from template xml
314  $(PODOC)/$(DOCNAME).pot: $(DOCNAME).en.xmlt  $(PODOC)/$(DOCNAME).pot: $(DOCNAME).en.xmlt
315          $(GETTEXT) -p $@ -m $<          $(GETTEXT) -p $@ -m $<
316    
317    .PHONY: po
318    po:     $(foreach lang, $(LANGPO), $(PODOC)/$(DOCNAME).$(lang).po)
319    
320  # Update new PO file in $(PODOC) by POT file  # Update new PO file in $(PODOC) by POT file
321  $(PODOC)/$(DOCNAME).%.po: $(PODOC)/$(DOCNAME).pot  $(PODOC)/$(DOCNAME).%.po: $(PODOC)/$(DOCNAME).pot
322          $(UPDATEPO) $@ $<          $(UPDATEPO) $@ $<
# Line 262  css: Line 342  css:
342          cp -f $(PXSLT)/$(DOCNAME).css $(PUBLISHDIR)/$(DOCNAME).css          cp -f $(PXSLT)/$(DOCNAME).css $(PUBLISHDIR)/$(DOCNAME).css
343          cd $(IMAGES) ; cp caution.png home.gif important.png next.gif note.png prev.gif tip.png up.gif warning.png $(PUBLISHDIR)/images          cd $(IMAGES) ; cp caution.png home.gif important.png next.gif note.png prev.gif tip.png up.gif warning.png $(PUBLISHDIR)/images
344    
345  .PHONY: html  .PHONY: html1 htmli html htmls
346  html:   $(foreach lang, en $(LANGPO), $(PUBLISHDIR)/$(DOCNAME).$(lang).html)  $(foreach lang, en $(LANGPO), $(PUBLISHDIR)/index.$(lang).html)  html1:  $(foreach lang, en $(LANGPO), $(PUBLISHDIR)/$(DOCNAME).$(lang).html)
347    htmli:  $(foreach lang, en $(LANGPO), $(PUBLISHDIR)/index.$(lang).html)
348    html:   html1 htmli
349    htmls:  html css
350    
351  $(PUBLISHDIR)/$(DOCNAME).%.html: $(DOCNAME).%.xml $(SRC_ENT)  $(PUBLISHDIR)/$(DOCNAME).%.html: $(DOCNAME).%.xml $(SRC_ENT)
352          $(XP)   --stringparam root.filename $(DOCNAME) \          $(XP)   --stringparam root.filename $(DOCNAME) \
# Line 290  $(PUBLISHDIR)/$(DOCNAME).%.txt: $(PUBLIS Line 373  $(PUBLISHDIR)/$(DOCNAME).%.txt: $(PUBLIS
373          LC_ALL=en_US.UTF-8 w3m -dump -cols 65 -T text/html $(PUBLISHDIR)/$(DOCNAME).$*.html >$@          LC_ALL=en_US.UTF-8 w3m -dump -cols 65 -T text/html $(PUBLISHDIR)/$(DOCNAME).$*.html >$@
374    
375  #######################################################################  #######################################################################
376  # Build html for web (DDP on alioth)                                DDP  # Build xml/html(indexed) for testing source (local)                ALL
377  #######################################################################  #######################################################################
 .PHONY: publish  
   
 # $(PUBLISHDIR) is set to be: /org/www.debian.org/www/doc/manuals for master-www  
 publish:  
         -mkdir -p $(PUBLISHDIR)/debian-reference  
         -rm -f $(PUBLISHDIR)/reference  
         # For www.debian.org, relative symlink only  
         -ln -sf debian-reference $(PUBLISHDIR)/reference  
         # When DDP moves to squeeze, change to BUILD_MODE=xml  
         $(MAKE) html txt css BUILD_MODE=asciidoc PUBLISHDIR=$(PUBLISHDIR)/debian-reference "LANGPO=$(LANGPO)"  
         $(MAKE) -C sgml all PUBLISHDIR=$(PUBLISHDIR)/debian-reference "LANG_ALL=$(LANGSGML)"  
   
 #######################################################################  
 # Build package for Debian                                          DEB  
 #######################################################################  
 .PHONY: build  
 build: html txt css  
 ifdef DEBIAN_PACKAGE_BUILD_MODE  
         $(MAKE) -C sgml all PUBLISHDIR=$(PUBLISHDIR) "LANG_ALL=$(LANGSGML)"  
         # Generate files for debhelper in debian/  
         cd $(CURDIR)/debian/ ; \  
         cp postinst.in     $(DOCNAME)-common.postinst ; \  
         for xx in $(LANGALL) ; do \  
           cp postinst.in     $(DOCNAME)-$${xx}.postinst ; \  
           cp postrm.in       $(DOCNAME)-$${xx}.postrm ; \  
           case $$xx in \  
             en) LANGX="English" ;;  \  
             de) LANGX="German" ;;   \  
             fr) LANGX="French" ;;   \  
             fi) LANGX="Finnish" ;;  \  
             es) LANGX="Spanish" ;;  \  
             it) LANGX="Italian" ;;  \  
             ja) LANGX="Japanese" ;; \  
             pl) LANGX="Polish" ;; \  
             pt-br) LANGX="Portuguese (Brazil)" ;; \  
             zh-tw) LANGX="Chinese (Traditional)" ;; \  
             zh-cn) LANGX="Chinese (Simplified)" ;; \  
           esac ; \  
           cp $(DOCNAME).dirs.in $(DOCNAME)-$${xx}.dirs ; \  
           sed  -e "s/@@/$$xx/" -e "s/@LANG@/$$LANGX/" < $(DOCNAME).doc-base.in  >$(DOCNAME)-$${xx}.doc-base ; \  
           sed  -e "s/@@/$$xx/" < $(DOCNAME).install.in  >$(DOCNAME)-$${xx}.install ; \  
         done  
 endif  
 #######################################################################  
 # Build xml/html for testing source (local)                         ALL  
 #######################################################################  
 .PHONY: xml  
 xml: $(DOCNAME).raw.xml $(SRC_ENT)  
   
 .PHONY: po  
 po:     $(foreach lang, $(LANGPO), $(PODOC)/$(DOCNAME).$(lang).po)  
   
 # rebuild all html txt including ones from old sgml  
 .PHONY: all  
 all:   html txt css  
         $(MAKE) -C sgml all PUBLISHDIR=$(PUBLISHDIR) "LANG_ALL=$(LANGSGML)"  
   
 # rebuild local html for check result of source updates  
 .PHONY: htmls  
 htmls: html css  
   
378  # force rebuild when touched po file after asciidoc  # force rebuild when touched po file after asciidoc
379  .PHONY: new  .PHONY: new
380  new:  new:
381          touch $(ADOC)/00_preface.txt          touch $(ADOC)/00_preface.txt
382            $(MAKE) htmli
 #######################################################################  
 # Clean targets                                                     ALL  
 #######################################################################  
 .PHONY: clean distclean  
   
 clean:  
         -rm -f *.swp *~ *.tmp  
         -rm -rf html  
         -rm -f $(PODOC)/*~  
         -rm -f pkg.lst  
         -rm -f $(addsuffix .xml,      $(addprefix  $(DOCNAME)., en $(LANGPO)))  
         -rm -f $(DOCNAME).en.xmlt  
         $(MAKE) -C sgml clean "LANG_ALL=$(LANGSGML)" PUBLISHDIR=$(PUBLISHDIR)  
         # Clean files for debhelper in debian/  
         -rm -f $(addsuffix .postinst, $(addprefix  $(DOCNAME)., $(LANGALL)))  
         -rm -f $(addsuffix .postrm,   $(addprefix  $(DOCNAME)., $(LANGALL)))  
         -rm -f $(addsuffix .dirs,     $(addprefix  $(DOCNAME)., $(LANGALL)))  
         -rm -f $(addsuffix .doc-base, $(addprefix  $(DOCNAME)., $(LANGALL)))  
         -rm -f $(addsuffix .install,  $(addprefix  $(DOCNAME)., $(LANGALL)))  
         -rm -f $(addsuffix .postinst, $(addprefix  $(DOCNAME)., $(LANGALL)))  
         -rm -f all-popcon-results.txt packages.txt packages.bkup.txt pkg.lst  
   
 # Run distclean only for regenerating all XML and remote data  
 distclean: clean  
         # We should clean these for debian package  
         -rm -f all-popcon-results.txt packages.txt packages.bkup.txt pkg.lst  
 ifndef DEBIAN_PACKAGE_BUILD_MODE  
         -rm -f $(DOCNAME).raw.xml $(SRC_ENT)  
 endif  
   
   
383    
384  #########################################################################  #########################################################################
385  # Utility targets                                                     ALL  # Utility targets                                                     ALL
# Line 438  $(PODOC)/wikipedia.%.po: $(PODOC)/wikipe Line 429  $(PODOC)/wikipedia.%.po: $(PODOC)/wikipe
429  typo:  typo:
430          -rm -f $(PODOC)/$(DOCNAME).pot.old          -rm -f $(PODOC)/$(DOCNAME).pot.old
431          cp $(PODOC)/$(DOCNAME).pot $(PODOC)/$(DOCNAME).pot.old          cp $(PODOC)/$(DOCNAME).pot $(PODOC)/$(DOCNAME).pot.old
432          $(MAKE) BUILD_MODE=asciidoc  $(DOCNAME).en.xmlt          $(MAKE) $(DOCNAME).en.xmlt
433          $(GETTEXT) -p $(PODOC)/$(DOCNAME).pot -m $(DOCNAME).en.xmlt          $(GETTEXT) -p $(PODOC)/$(DOCNAME).pot -m $(DOCNAME).en.xmlt
434          # repeat for all languages          # repeat for all languages
435          for $$xx in $(LANGPO) ; do \          for $$xx in $(LANGPO) ; do \

Legend:
Removed from v.7012  
changed lines
  Added in v.7013

  ViewVC Help
Powered by ViewVC 1.1.5