PACKAGE = lliurex-lwat LIBS= \ admin.php \ admin.js \ index.php \ fixup.php \ setup.php \ chguserpw.php \ default.css \ createlm.php \ buildconf.php \ import.php \ functions.php \ llx_log.php \ llx_users.php \ style.css \ llx_groups.php \ llx_uplouser.php \ llx_uplogroup.php \ llx_importgescen.php \ llx_deleteusers.php \ llx_pdf.php \ table.css \ llx_check.js \ llx_host_add.php \ llx_host_del.php \ delusergescen.php \ group.php \ ldaperror.php \ person.php SCRIPTS= \ createhomedir \ mailnewuser GESCEN= \ gesc2llwat SAMPLES= \ admin.ini \ admin-edu.ini \ admin-slx.ini \ config.php BIN= \ lwat_adduser.php\ lwat-client IMG= \ bgcode.gif \ loading.gif \ bgcontainer.gif \ bg.gif \ bgcontainer-right.png \ bgcontainer-left.png \ bgul.gif \ li.gif \ logo_lliurex.jpg \ quote.gif \ search.gif \ icon.gif \ icon2.gif \ eixir_trans.png \ eixir_va.png \ eixir_es.png \ eixir.png \ exit.gif \ stop.png PROFILE=\ profilelwat \ userChrome.css INSTALL = install -p -m 755 INSTALL_DATA= install -D -p -m 644 INSTALL_LOG = install -m 600 -o www-data -g www-data LANG=C prefix = /usr/local sharedir = $(prefix)/share/$(PACKAGE) webdir = $(sharedir)/web scriptsdir = $(sharedir)/scripts templatedir= $(sharedir)/templates localedir = $(sharedir)/locales profiledir = $(sharedir)/profile docdir = $(prefix)/share/doc/$(PACKAGE) htmldocdir = $(prefix)/share/doc/$(PACKAGE)/html sampledir = $(prefix)/share/doc/$(PACKAGE)/examples bindir = $(prefix)/bin imgdir = $(webdir)/img gescendir = $(prefix)/bin all: #po/*.po: po/lwat.pot # cp $@ $@.bak ; \ # msgmerge $@.bak $^ > $@ locales/mo-stamp: po/*.po for po in $^ ; do \ locale=$$(basename $$po .po) ; \ echo $$locale ; \ mkdir -p locales/$$locale/LC_MESSAGES ; \ msgfmt --statistics -o locales/$$locale/LC_MESSAGES/$(PACKAGE).mo $$po ; \ done mkdir -p locales/qcv/LC_MESSAGES/ mkdir -p locales/es/LC_MESSAGES/ msgfmt --statistics -o locales/qcv/LC_MESSAGES/lwat-client.mo lwat-client-po/qcv.po msgfmt --statistics -o locales/es/LC_MESSAGES/lwat-client.mo lwat-client-po/es.po touch locales/mo-stamp mo-files: locales/mo-stamp po/lwat.pot: lib/*.php templates/*.tpl tsmarty2c.php templates | \ xgettext --add-comments --default-domain=lwat \ - lib/*.php --output po/lwat.pot # TODO: This line doesn't work when is exec into makefile. Why? #cat templates/* lib/*.php bin/*.php| sed 's/{php}//g;s/{\/php}/?\>/g' |xgettext -j -L PHP - -o po/lwat.pot install: all install -d $(DESTDIR)$(sharedir) install -d $(DESTDIR)$(docdir) install -d $(DESTDIR)$(htmldocdir) install -d $(DESTDIR)$(sampledir) install -d $(DESTDIR)$(webdir) install -d $(DESTDIR)$(scriptsdir) install -d $(DESTDIR)$(templatedir) install -d $(DESTDIR)$(localedir) install -d $(DESTDIR)$(bindir) install -d $(DESTDIR)$(imgdir) install -d $(DESTDIR)$(profiledir) for locale in $$(find locales -type f -name $(PACKAGE).mo -printf "%P ") ; do \ install -d $(DESTDIR)$(localedir)/$$(dirname $$locale) ; \ $(INSTALL_DATA) locales/$$locale $(DESTDIR)$(localedir)/$$(dirname $$locale) ; \ done mkdir -p $(DESTDIR)/usr/share/locale/qcv/LC_MESSAGES/ mkdir -p $(DESTDIR)/usr/share/locale/es/LC_MESSAGES/ $(INSTALL_DATA) locales/qcv/LC_MESSAGES/lwat-client.mo $(DESTDIR)/usr/share/locale/qcv/LC_MESSAGES/ $(INSTALL_DATA) locales/es/LC_MESSAGES/lwat-client.mo $(DESTDIR)/usr/share/locale/es/LC_MESSAGES/ for templates in `find templates -type f -name "*.tpl" -printf "%P "` ; do \ $(INSTALL_DATA) templates/$${templates} $(DESTDIR)$(templatedir) ; \ done for script in $(SCRIPTS); do \ $(INSTALL) share/$$script $(DESTDIR)$(scriptsdir); \ done for script in $(GESCEN); do \ $(INSTALL) share/$$script $(DESTDIR)$(gescendir); \ done for lib in $(LIBS); do \ $(INSTALL_DATA) lib/$$lib $(DESTDIR)$(webdir) ; \ done for profile in $(PROFILE); do \ $(INSTALL_DATA) profile/$$profile $(DESTDIR)$(profiledir) ; \ done for htmldoc in $$(find doc -type f -name "*.html" -printf "%P ") ; do \ $(INSTALL_DATA) doc/$$htmldoc $(DESTDIR)$(htmldocdir) ; \ done for sample in $(SAMPLES); do \ $(INSTALL_DATA) examples/$$sample $(DESTDIR)$(sampledir) ; \ done for bin in $(BIN); do \ $(INSTALL) bin/$$bin $(DESTDIR)$(bindir) ; \ done for img in $(IMG); do \ $(INSTALL_DATA) lib/img/$$img $(DESTDIR)$(imgdir) ; \ done clean: # Remove CVS cruft find . -type f -name '.#*' -o -name "*.bak" -o -name "*~" | xargs -r rm -v # Removed completed translations rm -rf locales dist: debuild -us -uc