-ifeq ($(CODE_STATUS),stable)
- @$(ECHO) Setting docs to stable $(VERSION)
- @$(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "INCLUDE">/;\
- s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "IGNORE">/' \
- doc/source/*sgml doc/source/*/*sgml
- $(RM) -r doc/source/*bak doc/source/*/*bak
-else
- @$(ECHO) Setting docs to not stable $(VERSION)
- @$(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "IGNORE">/;\
- s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "INCLUDE">/' \
- doc/source/*sgml doc/source/*/*sgml
- $(RM) -r doc/source/*bak doc/source/*/*bak
-endif
-
-# Create release announcement in text and html, with short and long versions.
-# This is a standalone target, and must be invoked directly.
-# announce: dok-release
-# mkdir -p $(DOC_TMP)
-# cd $(DOC_TMP) && cp -f ../announce.sgml . && $(DB) -iannounce-big announce.sgml &&\
-# mv -f index.html announce.html && $(WDUMP) announce.html > announce.txt
-# cd $(DOC_TMP) && $(DB) announce.sgml &&\
-# mv -f index.html announce-mini.html && $(WDUMP) announce-mini.html > announce-mini.txt &&\
-# mv -f *html *txt ../../..
-# rm -fr $(DOC_TMP)
-
-# The main Privoxy config file, generated from sgml sources.
-# NOTE: This will require some hand editing. The new file is outputted
-# as config.new so that problem sections can be compared to previous
-# version. This is hardcored to w3m for html/text conversion. Also,
-# requires the shell util 'fmt'.
-config-file: dok-release
- cd doc/source && $(DB)-notoc -iconfig-file -V nochunks config.sgml > __tmp.html &&\
- env -u LANG w3m -dump __tmp.html | fmt -w 70 > ../../config.new && $(RM) -r __tmp.*
- $(PERL) -i.bak utils/prepare-configfile.pl config.new
-
- $(RM) *.bak
+ @if [ $(CODE_STATUS) = "stable" ]; then \
+ $(ECHO) Setting docs to stable $(VERSION); \
+ $(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "INCLUDE">/;\
+ s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "IGNORE">/' \
+ doc/source/*sgml doc/source/*/*sgml; \
+ else \
+ $(ECHO) Setting docs to not stable $(VERSION); \
+ $(PERL) -pi.bak -e 's/<!entity +% +p-stable.*>/<!entity % p-stable "IGNORE">/; \
+ s/<!entity +% +p-not-stable.*>/<!entity % p-not-stable "INCLUDE">/' \
+ doc/source/*sgml doc/source/*/*sgml; \
+ fi;
+ $(RM) -r doc/source/*bak doc/source/*/*bak;
+
+# The main Privoxy config file, generated from sgml sources.
+# NOTE: This will require some hand editing.
+config-file: dok-release generate-config-file
+
+ $(RM) config.bak config.html