#
# ownCloud scaffolder tool
#
# Copyright (C) 2013 Bernhard Posselt, <nukewhale@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Makefile for building the project

# common directories
grunt_dir=$(CURDIR)/node_modules/grunt-cli/bin/grunt
gruntfile_dir=$(CURDIR)/Gruntfile.js

# building the javascript
build: deps
	$(grunt_dir) --config $(gruntfile_dir) build

watch: build
	$(grunt_dir) --config $(gruntfile_dir) watch:concat

# general
deps:
	npm install --deps

l10n-extract: deps
	$(grunt_dir) --config $(gruntfile_dir) nggettext_extract

l10n-compile: deps
	$(grunt_dir) --config $(gruntfile_dir) nggettext_compile
	cd ../l10n; ./l10n.pl music write
