todo-webclient/Makefile

193 lines
7.3 KiB
Makefile
Raw Normal View History

2019-11-20 19:22:51 +01:00
PACKAGE = 'todo-webclient'
VERSION = '0.1'
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
MANDIR := $(SHAREDIR)/man
Q := @
2019-12-09 03:37:55 +01:00
all: main.js style.css
2019-11-20 19:22:51 +01:00
@:
main.js: main.bundle.js
@echo ' MIN > main.js'
$(Q)npx babel --minified main.bundle.js -o main.js
main.bundle.js: client/index.ls client/authws.ls client/bulma.ls client/card.ls client/column-edit-modal.ls client/column.ls client/font-awesome.ls client/modal.ls client/navbar.ls client/project-creation-modal.ls client/project.ls client/task-creation-modal.ls client/task.ls client/task-removal-modal.ls client/todowebsocket.ls client/users-cache.ls client/validation-modal.ls
2019-11-20 19:22:51 +01:00
@echo ' BUN > main.bundle.js'
$(Q)npx browserify -t browserify-livescript client/index.ls -o main.bundle.js
main.js.install: main.js
@echo ' IN > $(SHAREDIR)/todo-webclient/main.js'
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/todo-webclient'
$(Q)install -m644 main.js $(DESTDIR)$(SHAREDIR)/todo-webclient/main.js
main.js.clean:
@echo ' RM > main.js'
$(Q)rm -f main.js
@echo ' RM > main.bundle.js'
$(Q)rm -f main.bundle.js
main.js.uninstall:
@echo ' RM > $(SHAREDIR)/todo-webclient/main.js'
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/todo-webclient/main.js'
style.css: client/style.sass
@echo ' CSS > style.css'
$(Q)sassc client/style.sass > style.css
style.css.install: style.css
@echo ' IN > $(SHAREDIR)/todo-webclient/style.css'
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/todo-webclient'
$(Q)install -m644 style.css $(DESTDIR)$(SHAREDIR)/todo-webclient/style.css
style.css.clean:
@echo ' RM > style.css'
$(Q)rm -f style.css
style.css.uninstall:
@echo ' RM > $(SHAREDIR)/todo-webclient/style.css'
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/todo-webclient/style.css'
$(DESTDIR)$(PREFIX):
@echo ' DIR > $(PREFIX)'
$(Q)mkdir -p $(DESTDIR)$(PREFIX)
$(DESTDIR)$(BINDIR):
@echo ' DIR > $(BINDIR)'
$(Q)mkdir -p $(DESTDIR)$(BINDIR)
$(DESTDIR)$(LIBDIR):
@echo ' DIR > $(LIBDIR)'
$(Q)mkdir -p $(DESTDIR)$(LIBDIR)
$(DESTDIR)$(SHAREDIR):
@echo ' DIR > $(SHAREDIR)'
$(Q)mkdir -p $(DESTDIR)$(SHAREDIR)
$(DESTDIR)$(INCLUDEDIR):
@echo ' DIR > $(INCLUDEDIR)'
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
$(DESTDIR)$(MANDIR):
@echo ' DIR > $(MANDIR)'
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
2019-12-09 03:37:55 +01:00
install: main.js.install style.css.install
2019-11-20 19:22:51 +01:00
@:
2019-12-09 03:37:55 +01:00
uninstall: main.js.uninstall style.css.uninstall
2019-11-20 19:22:51 +01:00
@:
2019-12-09 03:37:55 +01:00
clean: main.js.clean style.css.clean
2019-11-20 19:22:51 +01:00
distclean: clean
dist: dist-gz dist-xz dist-bz2
$(Q)rm -- $(PACKAGE)-$(VERSION)
distdir:
$(Q)rm -rf -- $(PACKAGE)-$(VERSION)
$(Q)ln -s -- . $(PACKAGE)-$(VERSION)
dist-gz: $(PACKAGE)-$(VERSION).tar.gz
$(PACKAGE)-$(VERSION).tar.gz: distdir
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.gz'
$(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
2019-12-12 21:49:15 +01:00
$(PACKAGE)-$(VERSION)/client/authws.ls \
2019-11-20 19:22:51 +01:00
$(PACKAGE)-$(VERSION)/client/bulma.ls \
2019-12-06 04:07:19 +01:00
$(PACKAGE)-$(VERSION)/client/card.ls \
2019-12-20 01:34:41 +01:00
$(PACKAGE)-$(VERSION)/client/column-edit-modal.ls \
$(PACKAGE)-$(VERSION)/client/column.ls \
2019-12-20 01:34:41 +01:00
$(PACKAGE)-$(VERSION)/client/font-awesome.ls \
2019-12-04 23:30:12 +01:00
$(PACKAGE)-$(VERSION)/client/modal.ls \
2019-12-12 21:49:15 +01:00
$(PACKAGE)-$(VERSION)/client/navbar.ls \
2019-12-06 21:07:39 +01:00
$(PACKAGE)-$(VERSION)/client/project-creation-modal.ls \
2019-11-22 16:52:50 +01:00
$(PACKAGE)-$(VERSION)/client/project.ls \
2019-12-06 04:10:00 +01:00
$(PACKAGE)-$(VERSION)/client/task-creation-modal.ls \
2019-11-22 16:52:50 +01:00
$(PACKAGE)-$(VERSION)/client/task.ls \
2019-12-06 04:07:19 +01:00
$(PACKAGE)-$(VERSION)/client/task-removal-modal.ls \
2019-12-05 01:45:21 +01:00
$(PACKAGE)-$(VERSION)/client/todowebsocket.ls \
2019-12-22 19:48:21 +01:00
$(PACKAGE)-$(VERSION)/client/users-cache.ls \
2019-12-05 01:45:21 +01:00
$(PACKAGE)-$(VERSION)/client/validation-modal.ls
2019-11-20 19:22:51 +01:00
dist-xz: $(PACKAGE)-$(VERSION).tar.xz
$(PACKAGE)-$(VERSION).tar.xz: distdir
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.xz'
$(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
2019-12-12 21:49:15 +01:00
$(PACKAGE)-$(VERSION)/client/authws.ls \
2019-11-20 19:22:51 +01:00
$(PACKAGE)-$(VERSION)/client/bulma.ls \
2019-12-06 04:07:19 +01:00
$(PACKAGE)-$(VERSION)/client/card.ls \
2019-12-20 01:34:41 +01:00
$(PACKAGE)-$(VERSION)/client/column-edit-modal.ls \
$(PACKAGE)-$(VERSION)/client/column.ls \
2019-12-20 01:34:41 +01:00
$(PACKAGE)-$(VERSION)/client/font-awesome.ls \
2019-12-04 23:30:12 +01:00
$(PACKAGE)-$(VERSION)/client/modal.ls \
2019-12-12 21:49:15 +01:00
$(PACKAGE)-$(VERSION)/client/navbar.ls \
2019-12-06 21:07:39 +01:00
$(PACKAGE)-$(VERSION)/client/project-creation-modal.ls \
2019-11-22 16:52:50 +01:00
$(PACKAGE)-$(VERSION)/client/project.ls \
2019-12-06 04:10:00 +01:00
$(PACKAGE)-$(VERSION)/client/task-creation-modal.ls \
2019-11-22 16:52:50 +01:00
$(PACKAGE)-$(VERSION)/client/task.ls \
2019-12-06 04:07:19 +01:00
$(PACKAGE)-$(VERSION)/client/task-removal-modal.ls \
2019-12-05 01:45:21 +01:00
$(PACKAGE)-$(VERSION)/client/todowebsocket.ls \
2019-12-22 19:48:21 +01:00
$(PACKAGE)-$(VERSION)/client/users-cache.ls \
2019-12-05 01:45:21 +01:00
$(PACKAGE)-$(VERSION)/client/validation-modal.ls
2019-11-20 19:22:51 +01:00
dist-bz2: $(PACKAGE)-$(VERSION).tar.bz2
$(PACKAGE)-$(VERSION).tar.bz2: distdir
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.bz2'
$(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
2019-12-12 21:49:15 +01:00
$(PACKAGE)-$(VERSION)/client/authws.ls \
2019-11-20 19:22:51 +01:00
$(PACKAGE)-$(VERSION)/client/bulma.ls \
2019-12-06 04:07:19 +01:00
$(PACKAGE)-$(VERSION)/client/card.ls \
2019-12-20 01:34:41 +01:00
$(PACKAGE)-$(VERSION)/client/column-edit-modal.ls \
$(PACKAGE)-$(VERSION)/client/column.ls \
2019-12-20 01:34:41 +01:00
$(PACKAGE)-$(VERSION)/client/font-awesome.ls \
2019-12-04 23:30:12 +01:00
$(PACKAGE)-$(VERSION)/client/modal.ls \
2019-12-12 21:49:15 +01:00
$(PACKAGE)-$(VERSION)/client/navbar.ls \
2019-12-06 21:07:39 +01:00
$(PACKAGE)-$(VERSION)/client/project-creation-modal.ls \
2019-11-22 16:52:50 +01:00
$(PACKAGE)-$(VERSION)/client/project.ls \
2019-12-06 04:10:00 +01:00
$(PACKAGE)-$(VERSION)/client/task-creation-modal.ls \
2019-11-22 16:52:50 +01:00
$(PACKAGE)-$(VERSION)/client/task.ls \
2019-12-06 04:07:19 +01:00
$(PACKAGE)-$(VERSION)/client/task-removal-modal.ls \
2019-12-05 01:45:21 +01:00
$(PACKAGE)-$(VERSION)/client/todowebsocket.ls \
2019-12-22 19:48:21 +01:00
$(PACKAGE)-$(VERSION)/client/users-cache.ls \
2019-12-05 01:45:21 +01:00
$(PACKAGE)-$(VERSION)/client/validation-modal.ls
2019-11-20 19:22:51 +01:00
help:
@echo ' :: todo-webclient-0.1'
@echo ''
@echo 'Generic targets:'
@echo ' - help  Prints this help message.'
@echo ' - all  Builds all targets.'
@echo ' - dist  Creates tarballs of the files of the project.'
@echo ' - install  Installs the project.'
@echo ' - clean  Removes compiled files.'
@echo ' - uninstall  Deinstalls the project.'
@echo ''
@echo 'CLI-modifiable variables:'
@echo ' - PREFIX  ${PREFIX}'
@echo ' - BINDIR  ${BINDIR}'
@echo ' - LIBDIR  ${LIBDIR}'
@echo ' - SHAREDIR  ${SHAREDIR}'
@echo ' - INCLUDEDIR  ${INCLUDEDIR}'
@echo ' - MANDIR  ${MANDIR}'
@echo ''
@echo 'Project targets: '
@echo ' - main.js  livescript'
@echo ' - style.css  sass'
@echo ''
@echo 'Makefile options:'
@echo ' - gnu: false'
@echo ' - colors: true'
@echo ''
@echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c'
.PHONY: all clean distclean dist install uninstall help