[prev in list] [next in list] [prev in thread] [next in thread]
List: dict-notifications-bg
Subject: www-bg GNUmakefile
From: Yavor Doganov <yavor () gnu ! org>
Date: 2009-05-24 7:16:46
Message-ID: E1M87ws-0003Gl-Rj () cvs ! savannah ! gnu ! org
[Download RAW message or body]
CVSROOT: /cvsroot/www-bg
Module name: www-bg
Changes by: Yavor Doganov <yavor> 09/05/24 07:16:46
Modified files:
. : GNUmakefile
Log message:
Синхронизиране с GNUnited Nations 0.3.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/www-bg/GNUmakefile?cvsroot=www-bg&r1=1.2&r2=1.3
Patches:
Index: GNUmakefile
===================================================================
RCS file: /cvsroot/www-bg/www-bg/GNUmakefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- GNUmakefile 24 Jun 2008 12:21:53 -0000 1.2
+++ GNUmakefile 24 May 2009 07:16:46 -0000 1.3
@@ -1,5 +1,5 @@
# This is -*-makefile-gmake-*-, because we adore GNU make.
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
# This file is part of GNUnited Nations.
@@ -24,8 +24,10 @@
### DEPENDENCIES ###
# GNU make >= 3.81 (prereleases are OK too)
-# GNU gettext >= 0.14
+# GNU gettext >= 0.16
# CVS
+# Subversion (if the www-LANG repository is SVN)
+# GNU Arch (if the www-LANG repository is Arch)
SHELL = /bin/bash
@@ -40,25 +42,41 @@
MSGMERGE := msgmerge
MSGFMT := msgfmt
CVS := cvs
+SVN := svn
+# Baz can be used alternatively; its commands are compatible.
+TLA := tla
translations := $(shell find -name '*.$(TEAM).po' | sort)
+# Determine the VCS.
+REPO := $(shell (test -d CVS && echo CVS) || (test -d .svn && echo SVN) \
+ || (test -d \{arch\} && echo Arch))
+ifndef REPO
+$(error Unsupported Version Control System)
+endif
+
# For those who love details.
ifdef VERBOSE
+$(info Repository: $(REPO))
$(info translations = $(translations))
MSGMERGEVERBOSE := --verbose
ECHO := echo $$file: ;
CVSQUIET :=
endif
-# If not in VERBOSE mode, suppress the output from cvs.
+# If not in VERBOSE mode, suppress the output from cvs/svn.
CVSQUIET ?= -q
-# The command to update the repositories.
+# The command to update the CVS repositories.
define cvs-update
$(CVS) $(CVSQUIET) update -d -P
endef
+# The command to update the Subversion repository.
+define svn-update
+$(SVN) $(CVSQUIET) update
+endef
+
.PHONY: all
all: update sync
@@ -68,7 +86,13 @@
ifeq ($(VCS),yes)
@echo Обновяване на хранилищата…
cd $(wwwdir) && $(cvs-update)
+ifeq ($(REPO),CVS)
$(cvs-update)
+else ifeq ($(REPO),SVN)
+ $(svn-update)
+else ifeq ($(REPO),Arch)
+ $(TLA) update
+endif
else
$(info Хранилищата не са обновени, навярно \
искате „make VCS=yes".) endif
@@ -77,11 +101,22 @@
.PHONY: sync
sync: update
@for file in $(translations) ; do \
- $(ECHO) $(MSGMERGE) $(MSGMERGEVERBOSE) --quiet --update $$file \
- $(wwwdir)`dirname $$file`/po/`basename $${file/.$(TEAM).po/.pot}` ; \
+ $(ECHO) $(MSGMERGE) $(MSGMERGEVERBOSE) --quiet --update --previous \
+ $$file \
+ $(wwwdir)`dirname $$file`/po/`basename $${file/.$(TEAM).po/.pot}`; \
done
ifeq ($(VCS),yes)
+ifeq ($(REPO),CVS)
$(CVS) commit -m "Автоматично синхронизиране с \
официалното хранилище." +else ifeq ($(REPO),SVN)
+ $(SVN) commit -m "Автоматично синхронизиране с \
официалното хранилище." +else ifeq ($(REPO),Arch)
+# Arch is so dumb that it will do a bogus commit (adding another
+# absolutely useless revision) even if there are no changes.
+# Fortunately, the exit status of `tla changes' is sane.
+ $(TLA) changes >/dev/null || $(TLA) commit -s \
+ "Автоматично синхронизиране с официалното \
хранилище." +endif
endif
# Helper target to check which articles have to be updated.
_______________________________________________
Dict-notifications mailing list
Dict-notifications@fsa-bg.org
http://zver.fsa-bg.org/cgi-bin/mailman/listinfo/dict-notifications
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic