aef761f767
Take all from master branch. Conflicts: Makefile admin-basics/index.txt asciidoc.conf desktop-kde/images/kde-desktop-with-widgets.png desktop-kde/images/kde-desktop.png desktop-kde/images/kde-helpcenter.png desktop-kde/images/kde-menu.png desktop-kde/images/kde-panel.png desktop-kde/images/kde-settings.png desktop-kde/images/kde-widgets-rotate.png desktop-kde/images/kde-widgets-select.png desktop-kde/images/kde-widgets-unlock.png desktop-software/file-manager/dolphin/images/dolphin-address.png desktop-software/file-manager/dolphin/images/dolphin-places.png desktop-software/file-manager/dolphin/images/dolphin.png desktop-software/file-manager/index.txt desktop-software/graphics/index.txt desktop-software/index.txt desktop-software/internet/im/index.txt desktop-software/internet/im/telepathy/images/telepathy-settings.png desktop-software/internet/im/telepathy/images/telepathy.png desktop-software/internet/mail/index.txt desktop-software/internet/mail/kmail/images/kmail-message.png desktop-software/internet/mail/kmail/images/kmail.png desktop-software/internet/mail/kmail/index.txt desktop-software/internet/web/index.txt desktop-software/internet/web/konqueror/images/konqueror.png desktop-software/multimedia/index.txt desktop-software/multimedia/kde/index.txt desktop-software/office/index.txt desktop-software/others/index.txt desktop-software/others/k3b/images/k3b.png docs.spec index.txt install-guide/alternative-install.txt install-guide/images/boot.png install-guide/images/installer-preinstall.png install-guide/images/pkg-groups.png install-guide/images/sysconfig.png install-guide/images/vm.png install-guide/vm.txt packages/apt-get.txt ru-RU/images/boot-live.png ru-RU/images/desktop-xfce.png ru-RU/images/hello.png ru-RU/images/live-system.png ru-RU/images/nm-applet-help.png ru-RU/images/pidgin-settings.png ru-RU/images/pidgin.png ru-RU/images/pkg-0.png ru-RU/images/prepare-hdd.png ru-RU/images/set-language.png ru-RU/images/small_cd-writer.png ru-RU/images/thunar.png ru-RU/images/thunderbird-message.png ru-RU/images/thunderbird.png ru-RU/images/xfce-setting-manager.png system-management/acc/gui.txt system-management/network/images/knetworkmanager-settings.png system-management/network/networkmanager.txt system-start/system-login-dm.txt whatis-distro/index.txt
102 lines
3.5 KiB
Makefile
Executable File
102 lines
3.5 KiB
Makefile
Executable File
# based on https://github.com/jhradilek/publican-makefile 87dc33d7e1
|
|
|
|
# General settings; change the path to the publican executable, the lang-
|
|
# uage in which the document is authored, the default configuration file,
|
|
# or the main file of your DocBook project:
|
|
PUBLICAN = publican
|
|
LANGUAGE = ru-RU
|
|
CONFIG = publican.cfg
|
|
MAINFILE = $(if $(findstring Book_Info.xml, $(wildcard $(XML_LANG)/*.xml)),Book,Article)_Info.xml
|
|
|
|
# Known file extensions:
|
|
FILEEXTS = XML xml ENT ent PO po
|
|
IMAGEEXTS = BMP bmp CGM cgm DVI dvi EPS eps EQN eqn FAX fax GIF gif IGS \
|
|
igs PCX pcx PDF pdf PIC pic PNG png SVG svg SWF swf TLB tbl \
|
|
TEX tex WMF wmf WPG wpg PS ps SGML sgml TIFF tiff
|
|
|
|
# Known directories:
|
|
FILEDIR := $(LANGUAGE)
|
|
BUILDDIR := tmp/$(LANGUAGE)
|
|
|
|
PROJECT = doc
|
|
#docdir = /usr/local/share/doc/$(PROJECT)
|
|
docdir = /tmp/$(PROJECT)
|
|
DESTDIR =
|
|
|
|
INSTALL = install
|
|
INSTALL_DATA = $(INSTALL) -m 644
|
|
|
|
# Essential prerequisites:
|
|
ALL := $(shell find ru-RU \( -name '.*' -prune \) -o -type f -print)
|
|
FILES := $(foreach ext, $(FILEEXTS), $(filter %.$(ext), $(ALL)))
|
|
IMAGES := $(foreach ext, $(IMAGEEXTS), $(filter %.$(ext), $(ALL)))
|
|
|
|
# Helper functions:
|
|
getoption = $(shell (grep -qe '^[ \t]*$(1):' $(CONFIG) && sed -ne 's/^[ \t]*$(1):[ \t]*"\?\([a-zA-Z0-9._ -]\+\).*/\1/p' $(CONFIG) || sed -ne 's/^.*<$(2)>\(.\+\)<\/$(2)>.*/\1/ip' $(XML_LANG)/$(MAINFILE)) | sed -e 's/[ \t]*$$//')
|
|
|
|
# Helper variables:
|
|
EMPTY :=
|
|
SPACE := $(EMPTY) $(EMPTY)
|
|
XML_LANG := $(subst $(SPACE),_,$(call getoption,xml_lang,NULL))
|
|
|
|
# The following are the make rules. Do not edit the rules unless you really
|
|
# know what you are doing:
|
|
|
|
.PHONY: html-single
|
|
html-single: $(BUILDDIR)/html-single
|
|
|
|
.PHONY: html-desktop
|
|
html-desktop: $(BUILDDIR)/html-desktop
|
|
|
|
.PHONY: html
|
|
html: $(BUILDDIR)/html
|
|
|
|
.PHONY: epub
|
|
epub: $(BUILDDIR)/epub
|
|
|
|
.PHONY: pdf
|
|
pdf: $(BUILDDIR)/pdf
|
|
|
|
.PHONY: txt
|
|
txt: $(BUILDDIR)/txt
|
|
|
|
.PHONY: all
|
|
all: html-desktop html-single html epub pdf txt
|
|
|
|
|
|
install: html-single $(wildcard html-desktop)
|
|
$(INSTALL) -d $(DESTDIR)$(docdir)/ru-RU/Common_Content/css/
|
|
$(INSTALL) -d $(DESTDIR)$(docdir)/ru-RU/Common_Content/images/
|
|
$(INSTALL) -d $(DESTDIR)$(docdir)/ru-RU/images/
|
|
$(INSTALL_DATA) publish/home/ru-RU/Common_Content/css/* $(DESTDIR)$(docdir)/ru-RU/Common_Content/css/
|
|
$(INSTALL_DATA) publish/home/ru-RU/Common_Content/images/* $(DESTDIR)$(docdir)/ru-RU/Common_Content/images/
|
|
$(INSTALL_DATA) publish/home/ru-RU/images/* $(DESTDIR)$(docdir)/ru-RU/images/
|
|
$(INSTALL_DATA) publish/home/ru-RU/splash.html $(DESTDIR)$(docdir)/ru-RU/index.html
|
|
$(INSTALL_DATA) index.html $(DESTDIR)$(docdir)/
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
$(PUBLICAN) clean
|
|
|
|
.PHONY: test
|
|
test: $(FILES) $(IMAGES) $(CONFIG)
|
|
$(PUBLICAN) build --config $(CONFIG) --langs $(LANGUAGE) --formats test
|
|
|
|
$(BUILDDIR)/html-desktop: $(FILES) $(IMAGES) $(CONFIG)
|
|
$(PUBLICAN) build --config $(CONFIG) --langs $(LANGUAGE) --formats html-desktop --publish && touch $@
|
|
|
|
$(BUILDDIR)/html-single: $(FILES) $(IMAGES) $(CONFIG)
|
|
$(PUBLICAN) build --config $(CONFIG) --langs $(LANGUAGE) --formats html-single --publish && touch $@
|
|
|
|
$(BUILDDIR)/html: $(FILES) $(IMAGES) $(CONFIG)
|
|
$(PUBLICAN) build --config $(CONFIG) --langs $(LANGUAGE) --formats html --publish && touch $@
|
|
|
|
$(BUILDDIR)/epub: $(FILES) $(IMAGES) $(CONFIG)
|
|
$(PUBLICAN) build --config $(CONFIG) --langs $(LANGUAGE) --formats epub && touch $@
|
|
|
|
$(BUILDDIR)/pdf: $(FILES) $(IMAGES) $(CONFIG)
|
|
$(PUBLICAN) build --config $(CONFIG) --langs $(LANGUAGE) --formats pdf && touch $@
|
|
|
|
$(BUILDDIR)/txt: $(FILES) $(IMAGES) $(CONFIG)
|
|
$(PUBLICAN) build --config $(CONFIG) --langs $(LANGUAGE) --formats txt && touch $@
|