2008-02-14 18:31:23 +01:00
|
|
|
# GNUstep makefile
|
|
|
|
|
|
|
|
include ../common.make
|
|
|
|
|
2014-08-06 21:43:03 +02:00
|
|
|
WEBSERVER_RESOURCE_DIRS = css fonts img js
|
2017-05-30 20:56:15 +02:00
|
|
|
JS_FILES = js/Administration.* js/Common.* js/Contacts.* js/Mailer.* js/Main.* js/Preferences.* js/Scheduler.*
|
2020-07-24 18:38:02 +02:00
|
|
|
JS_LIB_FILES = js/vendor/angular-animate.* js/vendor/angular-aria.* js/vendor/angular-cookies.* js/vendor/angular-messages.* js/vendor/angular-file-upload.* js/vendor/FileSaver.* js/vendor/ng-sortable.* js/vendor/angular-material.* js/vendor/angular-sanitize.* js/vendor/angular-ui-router.* js/vendor/angular.* js/vendor/lodash.* js/vendor/qrcode.*
|
2017-03-09 18:16:51 +01:00
|
|
|
CSS_FILES = css/styles.css css/styles.css.map css/no-animation.css css/no-animation.css.map
|
2008-02-14 18:31:23 +01:00
|
|
|
|
2015-08-07 15:15:38 +02:00
|
|
|
.DEFAULT_GOAL := all
|
|
|
|
|
|
|
|
dev:
|
2019-06-18 20:47:01 +02:00
|
|
|
npm install
|
2015-06-12 20:12:51 +02:00
|
|
|
@if [ ! -e angular-material/src ]; then \
|
|
|
|
git submodule init; \
|
|
|
|
fi
|
|
|
|
git submodule update
|
|
|
|
grunt --stack build
|
2014-09-15 16:13:02 +02:00
|
|
|
|
2015-12-18 20:08:34 +01:00
|
|
|
prod:
|
|
|
|
grunt --stack build
|
|
|
|
git update-index --no-assume-unchanged $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
|
|
|
|
git add -f $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
|
2016-02-25 16:20:26 +01:00
|
|
|
@if ! git diff --cached --quiet --exit-code; then \
|
2019-10-31 16:59:55 +01:00
|
|
|
git commit -m "chore(js/css): update generated files"; \
|
2016-02-15 16:18:34 +01:00
|
|
|
else \
|
|
|
|
echo "Nothing to commit; skipping git-commit"; \
|
|
|
|
fi
|
2015-12-18 20:08:34 +01:00
|
|
|
git update-index --assume-unchanged $(CSS_FILES) $(JS_FILES) $(JS_LIB_FILES)
|
|
|
|
|
2015-08-07 15:15:38 +02:00
|
|
|
all:
|
|
|
|
@echo "The 'all' target does nothing. Use 'make dev' to generate static files and 'make install' to install them."
|
2008-02-14 18:31:23 +01:00
|
|
|
|
2015-08-07 15:15:38 +02:00
|
|
|
install:
|
2008-05-20 23:59:34 +02:00
|
|
|
@if [ -L "$(SOGO_WEBSERVERRESOURCESDIR)" ]; then \
|
|
|
|
echo "$(SOGO_WEBSERVERRESOURCESDIR) is a symbolic link (for development?). Installation skipped."; \
|
|
|
|
else \
|
|
|
|
mkdir -p $(SOGO_WEBSERVERRESOURCESDIR); \
|
2014-08-06 21:43:03 +02:00
|
|
|
cp -r $(WEBSERVER_RESOURCE_DIRS) $(SOGO_WEBSERVERRESOURCESDIR)/; \
|
2008-05-20 23:59:34 +02:00
|
|
|
fi
|
2008-02-14 18:31:23 +01:00
|
|
|
|
2015-08-07 15:15:38 +02:00
|
|
|
check:
|
2012-10-19 18:46:46 +02:00
|
|
|
|
2015-08-07 15:15:38 +02:00
|
|
|
clean:
|
2008-02-14 18:31:23 +01:00
|
|
|
|
2015-08-07 15:15:38 +02:00
|
|
|
distclean: clean
|
2008-02-14 18:31:23 +01:00
|
|
|
|
2015-08-07 15:15:38 +02:00
|
|
|
uninstall:
|
2009-11-18 17:44:46 +01:00
|
|
|
@if [ -L "$(SOGO_WEBSERVERRESOURCESDIR)" ]; then \
|
|
|
|
echo "$(SOGO_WEBSERVERRESOURCESDIR) is a symbolic link (for development?). Uninstallation skipped."; \
|
|
|
|
else \
|
|
|
|
rm -rf $(SOGO_WEBSERVERRESOURCESDIR); \
|
|
|
|
fi
|