Makefile: new target 'pot-files'
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
cd9d62f95b
commit
f525086f8b
19
Makefile
19
Makefile
@ -59,7 +59,7 @@ pck_infiles := $(wildcard *.in conf/*.in lib/*.in man/*.in man/*/*.in plugins/*.
|
|||||||
s,@date@,`LC_ALL="C" date "+%a %b %d %Y"`,g;\
|
s,@date@,`LC_ALL="C" date "+%a %b %d %Y"`,g;\
|
||||||
s,@date_my@,`LC_ALL="C" date "+%B %Y"`," $< > $@
|
s,@date_my@,`LC_ALL="C" date "+%B %Y"`," $< > $@
|
||||||
|
|
||||||
all: dist-update locales check
|
all: dist-update locales check pot-files
|
||||||
|
|
||||||
check: dist-update
|
check: dist-update
|
||||||
@echo "Checking libraries and scripts for syntax errors..."
|
@echo "Checking libraries and scripts for syntax errors..."
|
||||||
@ -71,6 +71,22 @@ check: dist-update
|
|||||||
|
|
||||||
dist-update: $(pck_infiles:.in=)
|
dist-update: $(pck_infiles:.in=)
|
||||||
|
|
||||||
|
pot-files: dist-update
|
||||||
|
@echo "Creating pot files..."
|
||||||
|
@echo "Generating po template '$(PACKAGE).pot'..."; \
|
||||||
|
/usr/bin/xgettext -i -L shell \
|
||||||
|
--copyright-holder="Davide Madrisan" \
|
||||||
|
--msgid-bugs-address="davide.madrisan@gmail.com" \
|
||||||
|
--no-location \
|
||||||
|
--package-name=$(PACKAGE) \
|
||||||
|
--package-version=${VERSION} \
|
||||||
|
$(PACKAGE) -o $(srcdir)/po/$(PACKAGE).pot 2>/dev/null
|
||||||
|
@$(MAKE) pot-files -C lib || exit 1
|
||||||
|
@$(MAKE) pot-files -C plugins || exit 1
|
||||||
|
@$(MAKE) pot-files -C tests || exit 1
|
||||||
|
|
||||||
|
# /usr/bin/msgmerge -i --update po/it/$(PACKAGE).po po/$(PACKAGE).pot
|
||||||
|
|
||||||
locales:
|
locales:
|
||||||
@for loc in $(LOCALES); do\
|
@for loc in $(LOCALES); do\
|
||||||
$(MAKE) -C po/$$loc || exit 1;\
|
$(MAKE) -C po/$$loc || exit 1;\
|
||||||
@ -208,4 +224,5 @@ mostlyclean:
|
|||||||
$(MAKE) clean -C man/$$loc || exit 1;\
|
$(MAKE) clean -C man/$$loc || exit 1;\
|
||||||
$(MAKE) clean -C po/$$loc || exit 1;\
|
$(MAKE) clean -C po/$$loc || exit 1;\
|
||||||
done
|
done
|
||||||
|
@rm -f po/$(PACKAGE).pot
|
||||||
|
|
||||||
|
23
lib/Makefile
23
lib/Makefile
@ -19,8 +19,9 @@ srcdir = ..
|
|||||||
include $(srcdir)/Makefile.env
|
include $(srcdir)/Makefile.env
|
||||||
|
|
||||||
pck_libs := libapse.lib libcfg.lib libmsgmng.lib libnetwork.lib libspec.lib \
|
pck_libs := libapse.lib libcfg.lib libmsgmng.lib libnetwork.lib libspec.lib \
|
||||||
libtest.lib README.API
|
libtest.lib
|
||||||
pck_libs_infiles := $(wildcard *.in)
|
pck_libs_infiles := $(wildcard *.in)
|
||||||
|
pck_libs_all := $(pck_libs) README.API
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
@ -31,16 +32,32 @@ check: $(pck_libs)
|
|||||||
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
|
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
|
||||||
done
|
done
|
||||||
|
|
||||||
install: $(pck_libs)
|
pot-files: $(pck_libs)
|
||||||
|
@for f in $(pck_libs); do\
|
||||||
|
echo -n "Generating po template '$$f.pot'...";\
|
||||||
|
/usr/bin/xgettext -i -L shell \
|
||||||
|
--copyright-holder="Davide Madrisan" \
|
||||||
|
--msgid-bugs-address="davide.madrisan@gmail.com" \
|
||||||
|
--no-location \
|
||||||
|
--package-name=$(PACKAGE) \
|
||||||
|
--package-version=${VERSION} \
|
||||||
|
$$f -o $(srcdir)/po/$$f.pot 2>/dev/null \
|
||||||
|
&& echo "[DONE]" || { echo "[ERROR]"; exit 1; };\
|
||||||
|
done
|
||||||
|
|
||||||
|
install: $(pck_libs_all)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(libdir)
|
@$(INSTALL_DIR) $(DESTDIR)$(libdir)
|
||||||
for f in $(pck_libs); do\
|
for f in $(pck_libs); do\
|
||||||
$(INSTALL_DATA) $${f} $(DESTDIR)$(libdir)/$${f};\
|
$(INSTALL_DATA) $${f} $(DESTDIR)$(libdir)/$${f};\
|
||||||
done
|
done
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
for f in $(pck_libs); do\
|
for f in $(pck_libs_all); do\
|
||||||
rm -f $(DESTDIR)$(libdir)/$${f};\
|
rm -f $(DESTDIR)$(libdir)/$${f};\
|
||||||
done
|
done
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(patsubst %.in,%,$(pck_libs_infiles))
|
rm -f $(patsubst %.in,%,$(pck_libs_infiles))
|
||||||
|
@for f in $(pck_libs_all); do\
|
||||||
|
rm -f $(srcdir)/po/$$f.pot;\
|
||||||
|
done
|
||||||
|
@ -30,6 +30,19 @@ check: $(pck_plugins)
|
|||||||
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
|
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
|
||||||
done
|
done
|
||||||
|
|
||||||
|
pot-files: $(pck_plugins)
|
||||||
|
@for f in $(pck_plugins); do\
|
||||||
|
echo -n "Generating po template '$$f.pot'...";\
|
||||||
|
/usr/bin/xgettext -i -L shell \
|
||||||
|
--copyright-holder="Davide Madrisan" \
|
||||||
|
--msgid-bugs-address="davide.madrisan@gmail.com" \
|
||||||
|
--no-location \
|
||||||
|
--package-name=$(PACKAGE) \
|
||||||
|
--package-version=${VERSION} \
|
||||||
|
$$f -o $(srcdir)/po/$$f.pot 2>/dev/null \
|
||||||
|
&& echo "[DONE]" || { echo "[ERROR]"; exit 1; };\
|
||||||
|
done
|
||||||
|
|
||||||
install: $(pck_plugins)
|
install: $(pck_plugins)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(plugindir)
|
@$(INSTALL_DIR) $(DESTDIR)$(plugindir)
|
||||||
for f in $(pck_plugins); do\
|
for f in $(pck_plugins); do\
|
||||||
@ -43,3 +56,6 @@ uninstall:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(patsubst %.in,%,$(pck_plugins_infiles))
|
rm -f $(patsubst %.in,%,$(pck_plugins_infiles))
|
||||||
|
@for f in $(pck_plugins); do\
|
||||||
|
rm -f $(srcdir)/po/$$f.pot;\
|
||||||
|
done
|
||||||
|
@ -30,6 +30,19 @@ check: $(pck_tests)
|
|||||||
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
|
&& echo "[PASSED]" || { echo "[FAILED]"; exit 1; };\
|
||||||
done
|
done
|
||||||
|
|
||||||
|
pot-files: $(pck_tests)
|
||||||
|
@for f in $(pck_tests); do\
|
||||||
|
echo -n "Generating po template '$$f.pot'...";\
|
||||||
|
/usr/bin/xgettext -i -L shell \
|
||||||
|
--copyright-holder="Davide Madrisan" \
|
||||||
|
--msgid-bugs-address="davide.madrisan@gmail.com" \
|
||||||
|
--no-location \
|
||||||
|
--package-name=$(PACKAGE) \
|
||||||
|
--package-version=${VERSION} \
|
||||||
|
$$f -o $(srcdir)/po/$$f.pot 2>/dev/null \
|
||||||
|
&& echo "[DONE]" || { echo "[ERROR]"; exit 1; };\
|
||||||
|
done
|
||||||
|
|
||||||
install: $(pck_tests)
|
install: $(pck_tests)
|
||||||
@$(INSTALL_DIR) $(DESTDIR)$(testdir)
|
@$(INSTALL_DIR) $(DESTDIR)$(testdir)
|
||||||
for f in $(pck_tests); do\
|
for f in $(pck_tests); do\
|
||||||
@ -43,3 +56,6 @@ uninstall:
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(patsubst %.in,%,$(pck_tests_infiles))
|
rm -f $(patsubst %.in,%,$(pck_tests_infiles))
|
||||||
|
@for f in $(pck_tests); do\
|
||||||
|
rm -f $(srcdir)/po/$$f.pot;\
|
||||||
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user