auto-build html documentation

auto-compress manpages
install html documentation
install manpages
add --docdir configure switch back
add --mandir configure switch
update NEWS
parent a679d6c1
...@@ -14,7 +14,7 @@ APP_VERSION=9.2 ...@@ -14,7 +14,7 @@ APP_VERSION=9.2
APP_CODENAME="Galvanize" APP_CODENAME="Galvanize"
APP_LANGUAGES="de" APP_LANGUAGES="de"
CFG_VERSION="4.3.5" CFG_VERSION="4.3.6"
if [[ -d "/usr/lib/girepository-1.0/" ]]; then if [[ -d "/usr/lib/girepository-1.0/" ]]; then
export GIRPATH="/usr/lib/girepository-1.0/" export GIRPATH="/usr/lib/girepository-1.0/"
...@@ -28,6 +28,8 @@ PYTHON=$(which python3 || which python2 || which python) ...@@ -28,6 +28,8 @@ PYTHON=$(which python3 || which python2 || which python)
BINDIR="${PREFIX}/bin" BINDIR="${PREFIX}/bin"
PCDIR="${PREFIX}/share/pkgconfig/" PCDIR="${PREFIX}/share/pkgconfig/"
DATADIR="${PREFIX}/share/" DATADIR="${PREFIX}/share/"
DOCDIR="${DATADIR}/doc/"
MANDIR="${DATADIR}/man/"
PYMINVER_P="2.7.0" PYMINVER_P="2.7.0"
PYMAXVER_P="3.5.0" PYMAXVER_P="3.5.0"
...@@ -48,6 +50,8 @@ export_result () ...@@ -48,6 +50,8 @@ export_result ()
echo -e "PREFIX=\"${PREFIX}\" echo -e "PREFIX=\"${PREFIX}\"
DATADIR=\"${DATADIR}/bashstyle-ng/\" DATADIR=\"${DATADIR}/bashstyle-ng/\"
DATADIR_LIST=( ui rc/{functions,internal,settings,styles} termcap/{bar,body} vim/colors ) DATADIR_LIST=( ui rc/{functions,internal,settings,styles} termcap/{bar,body} vim/colors )
DOCDIR=\"${DOCDIR}/bashstyle-ng/\"
MANDIR=\"${MANDIR}/man1/\"
BINDIR=\"${BINDIR}\" BINDIR=\"${BINDIR}\"
LOCALEDIR=\"${DATADIR}/locale/\" LOCALEDIR=\"${DATADIR}/locale/\"
LOCALEDIR_LIST=( ${LC_MESSAGES_DIRS} ) LOCALEDIR_LIST=( ${LC_MESSAGES_DIRS} )
......
...@@ -96,6 +96,7 @@ help_message () { ...@@ -96,6 +96,7 @@ help_message () {
${ORANGE}--prefix=<prefix>${WHITE} *|${GREEN} Change installation prefix (default: /usr) ${ORANGE}--prefix=<prefix>${WHITE} *|${GREEN} Change installation prefix (default: /usr)
${ORANGE}--bindir=<bindir>${WHITE} *|${GREEN} Change binary path (default: /usr/bin) ${ORANGE}--bindir=<bindir>${WHITE} *|${GREEN} Change binary path (default: /usr/bin)
${ORANGE}--docdir=<docdir>${WHITE} *|${GREEN} Change doc path (default: /usr/share/doc/) ${ORANGE}--docdir=<docdir>${WHITE} *|${GREEN} Change doc path (default: /usr/share/doc/)
${ORANGE}--mandir=<mandir>${WHITE} *|${GREEN} Change man path (default: /usr/share/man/)
${ORANGE}--datadir=<datadir>${WHITE} *|${GREEN} Change data path (default: /usr/share/) ${ORANGE}--datadir=<datadir>${WHITE} *|${GREEN} Change data path (default: /usr/share/)
${ORANGE}--pcdir=<pcdir>${WHITE} *|${GREEN} Change pkg-config path (default: /usr/share/pkgconfig) ${ORANGE}--pcdir=<pcdir>${WHITE} *|${GREEN} Change pkg-config path (default: /usr/share/pkgconfig)
${ORANGE}--girpath=<girpath>${WHITE} *|${GREEN} Where to look G-I typelibs (default: /usr/lib/girepository-1.0/) ${ORANGE}--girpath=<girpath>${WHITE} *|${GREEN} Where to look G-I typelibs (default: /usr/lib/girepository-1.0/)
......
...@@ -10,21 +10,33 @@ ...@@ -10,21 +10,33 @@
######################################################### #########################################################
make_news () { make_news () {
echo -e "\t${WHITE}+ ${MAGENTA} NEWS file"
makeinfo --no-validate --no-headers doc/news.texi > NEWS makeinfo --no-validate --no-headers doc/news.texi > NEWS
} }
make_info () { make_info () {
echo -e "\t${WHITE}+ ${MAGENTA} Info documentation"
makeinfo -I ${PWD}/doc/ doc/userdoc.texi -o doc/bashstyle.info makeinfo -I ${PWD}/doc/ doc/userdoc.texi -o doc/bashstyle.info
} }
make_info_html () { make_info_html () {
echo -e "\t${WHITE}+ ${MAGENTA} HTML documenation"
makeinfo -I ${PWD}/doc/ --html doc/userdoc.texi -o doc/html makeinfo -I ${PWD}/doc/ --html doc/userdoc.texi -o doc/html
} }
make_gzip_man () {
echo -e "\t${WHITE}+ ${MAGENTA} compressing manpages"
for manpage in ${MAN_FILES[@]}; do
gzip ${PWD}/${manpage/:*} -c > ${PWD}/${manpage/:*}.gz
done
}
make_build () { make_build () {
check_configure && check_configure &&
build_message && build_message &&
generate_mo && generate_mo &&
make_info_html &&
make_gzip_man &&
touch ${PWD}/.make/build_done touch ${PWD}/.make/build_done
} }
...@@ -49,7 +61,7 @@ make_remove () { ...@@ -49,7 +61,7 @@ make_remove () {
CLEAN_FILES=( data/bashstyle data/bashstyle-ng.pc ui/bashstyle.ui.h CLEAN_FILES=( data/bashstyle data/bashstyle-ng.pc ui/bashstyle.ui.h
data/bashstyle.sh rc/nx-rc i18n/??/*.mo i18n/*.pot data/bashstyle.sh rc/nx-rc i18n/??/*.mo i18n/*.pot
.configure/results .make/build_done ui/#bashstyle.ui# .configure/results .make/build_done ui/#bashstyle.ui#
ui/bashstyle.ui~ doc/bashstyle.info ) ui/bashstyle.ui~ doc/bashstyle.info doc/*.gz )
CLEAN_DIRS=( doc/html ) CLEAN_DIRS=( doc/html )
......
...@@ -28,14 +28,14 @@ update_po () { ...@@ -28,14 +28,14 @@ update_po () {
echo -e "\n${RED}You need to run './make pot' first!\n" echo -e "\n${RED}You need to run './make pot' first!\n"
exit 1 exit 1
else else
echo -e "\t${WHITE}+ ${MAGENTA} gui translations:" echo -e "\t${WHITE}+ ${MAGENTA} gui translations"
for lang in ${APP_LANGUAGES}; do for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}" echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgmerge -q -o i18n/${lang}/bs-ng.po \ msgmerge -q -o i18n/${lang}/bs-ng.po \
i18n/${lang}/bs-ng.po i18n/bs-ng.pot >/dev/null i18n/${lang}/bs-ng.po i18n/bs-ng.pot >/dev/null
done done
echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations:" echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations"
for lang in ${APP_LANGUAGES}; do for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}" echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgmerge -q -o i18n/${lang}/nx-rc.po \ msgmerge -q -o i18n/${lang}/nx-rc.po \
...@@ -47,14 +47,14 @@ update_po () { ...@@ -47,14 +47,14 @@ update_po () {
generate_mo () { generate_mo () {
echo -e "\t${WHITE}+ ${MAGENTA} gui translations:" echo -e "\t${WHITE}+ ${MAGENTA} gui translations"
for lang in ${APP_LANGUAGES}; do for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}" echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgfmt --output-file=i18n/${lang}/bs-ng.mo \ msgfmt --output-file=i18n/${lang}/bs-ng.mo \
i18n/${lang}/bs-ng.po i18n/${lang}/bs-ng.po
done done
echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations:" echo -e "\t${WHITE}+ ${MAGENTA} nx-rc translations"
for lang in ${APP_LANGUAGES}; do for lang in ${APP_LANGUAGES}; do
echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}" echo -e "\t${WHITE} *${SMOOTHBLUE} ${lang}"
msgfmt --output-file=i18n/${lang}/nx-rc.mo \ msgfmt --output-file=i18n/${lang}/nx-rc.mo \
......
...@@ -20,6 +20,9 @@ DATA_FILES=( ui/*.{py,ui}:${DATADIR}/ui ...@@ -20,6 +20,9 @@ DATA_FILES=( ui/*.{py,ui}:${DATADIR}/ui
data/*.ini:${DATADIR} data/*.ini:${DATADIR}
data/*.desktop:${DESKTOPDIR} ) data/*.desktop:${DESKTOPDIR} )
DOC_FILES=( doc/html/*.html:${DOCDIR} )
MAN_FILES=( doc/bashstyle.1:${MANDIR} )
for lang in ${APP_LANGUAGES}; do for lang in ${APP_LANGUAGES}; do
LOCALE_REMOVE=( ${LOCALE_REMOVE[@]} ${LOCALEDIR}/${lang}/{bs-ng,nx-rc}.mo) LOCALE_REMOVE=( ${LOCALE_REMOVE[@]} ${LOCALEDIR}/${lang}/{bs-ng,nx-rc}.mo)
LOCALE_FILES=( i18n/${lang}/*.mo:${LOCALEDIR}/${lang}/LC_MESSAGES ) LOCALE_FILES=( i18n/${lang}/*.mo:${LOCALEDIR}/${lang}/LC_MESSAGES )
...@@ -36,4 +39,5 @@ REMOVE_FILES=( ${LOCALE_REMOVE[@]} ...@@ -36,4 +39,5 @@ REMOVE_FILES=( ${LOCALE_REMOVE[@]}
${BINDIR}/bashstyle ${BINDIR}/bashstyle
${ICONDIR}/bs-ng*.png ${ICONDIR}/bs-ng*.png
${PCDIR}/bashstyle-ng.pc ${PCDIR}/bashstyle-ng.pc
${DATADIR} ) ${DATADIR}
${DOCDIR} )
...@@ -50,16 +50,20 @@ inst () ...@@ -50,16 +50,20 @@ inst ()
{ {
case ${1} in case ${1} in
data ) MODE=644 ;;
bin ) MODE=755 ;; bin ) MODE=755 ;;
* ) MODE=644 ;;
esac esac
shift FILE=${2/:*}
FILE=${1/:*} DEST=${2/*:}
DEST=${1/*:}
install -m${MODE} ${FILE} ${DESTDIR}${DEST} if [[ ${1} == man ]]; then
unset FILE DEST install -m${MODE} ${FILE}.gz ${DESTDIR}${DEST}
else
install -m${MODE} ${FILE} ${DESTDIR}${DEST}
fi
unset TYPE FILE DEST
} }
...@@ -76,6 +80,14 @@ install_bsng () { ...@@ -76,6 +80,14 @@ install_bsng () {
inst bin ${file} inst bin ${file}
done done
echo -e "\t${WHITE}+${CYAN} documentation and manual pages"
for file in ${DOC_FILES[@]}; do
inst doc ${file}
done
for file in ${MAN_FILES[@]}; do
inst man ${file}
done
} }
remove_bsng () { remove_bsng () {
......
...@@ -111,6 +111,10 @@ between. For more detailed information see the or git log. ...@@ -111,6 +111,10 @@ between. For more detailed information see the or git log.
* Configure * Configure
- 4.3.6
+ add '--docdir' switch back
+ add '--mandir' switch
- 4.3.5 - 4.3.5
+ remove system bashrc detection + remove system bashrc detection
+ remove -profiledir switch + remove -profiledir switch
...@@ -128,11 +132,17 @@ between. For more detailed information see the or git log. ...@@ -128,11 +132,17 @@ between. For more detailed information see the or git log.
* Make * Make
- 1.0.8
+ compress manpages upon './make build'
+ install info and html documentation upon '.make install'
+ install manpages upon './make install'
+ add a few more strings
- 1.0.7 - 1.0.7
+ build NEWS from doc/news.info ('./make --news') + build NEWS from doc/news.info ('./make news')
+ build doc/bashstyle.info from doc/userdoc.texi ('./make + build doc/bashstyle.info from doc/userdoc.texi ('./make
--info') info')
+ build doc/html from doc/userdoc.texi ('./make --html') + build doc/html from doc/userdoc.texi ('./make html')
- 1.0.6 - 1.0.6
+ fixed bug #191 + fixed bug #191
......
...@@ -26,6 +26,8 @@ while [[ ${xcount} -lt $# ]]; do ...@@ -26,6 +26,8 @@ while [[ ${xcount} -lt $# ]]; do
--prefix=* ) PREFIX="${1/*=}" ;; --prefix=* ) PREFIX="${1/*=}" ;;
--pcdir=* ) PCDIR="${1/*=}" ;; --pcdir=* ) PCDIR="${1/*=}" ;;
--bindir=* ) BINDIR="${1/*=}" ;; --bindir=* ) BINDIR="${1/*=}" ;;
--docdir=* ) DOCDIR="${1/*=}" ;;
--mandir=* ) MANDIR="${1/*=}" ;;
--girpath=* ) GIRPATH="${1/*=}" ;; --girpath=* ) GIRPATH="${1/*=}" ;;
--datadir=* ) DATADIR="${1/*=}" ;; --datadir=* ) DATADIR="${1/*=}" ;;
--python=* ) PYTHON="${1/*=}" ;; --python=* ) PYTHON="${1/*=}" ;;
......
...@@ -114,6 +114,12 @@ down Bash a bit if you have a huge history. ...@@ -114,6 +114,12 @@ down Bash a bit if you have a huge history.
@item Configure @item Configure
@itemize @minus @itemize @minus
@item 4.3.6
@itemize +
@item add @code{--docdir} switch back
@item add @code{--mandir} switch
@end itemize
@item 4.3.5 @item 4.3.5
@itemize + @itemize +
@item remove system bashrc detection @item remove system bashrc detection
...@@ -135,11 +141,19 @@ maximum python versions for configure messages) ...@@ -135,11 +141,19 @@ maximum python versions for configure messages)
@item Make @item Make
@itemize @minus @itemize @minus
@item 1.0.8
@itemize +
@item compress manpages upon @code{./make build}
@item install info and html documentation upon @code{.make install}
@item install manpages upon @code{./make install}
@item add a few more strings
@end itemize
@item 1.0.7 @item 1.0.7
@itemize + @itemize +
@item build NEWS from doc/news.info (@code{./make --news}) @item build NEWS from doc/news.info (@code{./make news})
@item build doc/bashstyle.info from doc/userdoc.texi (@code{./make --info}) @item build doc/bashstyle.info from doc/userdoc.texi (@code{./make info})
@item build doc/html from doc/userdoc.texi (@code{./make --html}) @item build doc/html from doc/userdoc.texi (@code{./make html})
@end itemize @end itemize
@item 1.0.6 @item 1.0.6
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
CF_MODULES=( base color ) CF_MODULES=( base color )
MK_MODULES=( build install messages checks actions ) MK_MODULES=( build install messages checks actions )
MK_VERSION=1.0.7 MK_VERSION=1.0.8
for mod in ${CF_MODULES[@]}; do for mod in ${CF_MODULES[@]}; do
source .configure/${mod} source .configure/${mod}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment