Updated Makefile to match repository.

This commit is contained in:
Luka Vandervelden 2019-12-09 03:37:55 +01:00
parent 035f40a83d
commit fda6504e35
2 changed files with 8 additions and 32 deletions

View File

@ -7,31 +7,12 @@ LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
MANDIR := $(SHAREDIR)/man
CRFLAGS := --release
Q := @
all: todoc main.js style.css
all: main.js style.css
@:
todoc: src/client.cr
@echo ' CR > todoc'
$(Q)crystal build $(CRFLAGS) src/client.cr -o 'todoc'
todoc.install: todoc
@echo ' IN > $(BINDIR)/todoc'
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
$(Q)install -m0755 todoc $(DESTDIR)$(BINDIR)/todoc
todoc.clean:
@echo ' RM > todoc'
$(Q)rm -f todoc
todoc.uninstall:
@echo ' RM > $(BINDIR)/todoc'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/todoc'
main.js: main.bundle.js
@echo ' MIN > main.js'
$(Q)npx babel --minified main.bundle.js -o main.js
@ -94,13 +75,13 @@ $(DESTDIR)$(INCLUDEDIR):
$(DESTDIR)$(MANDIR):
@echo ' DIR > $(MANDIR)'
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
install: todoc.install main.js.install style.css.install
install: main.js.install style.css.install
@:
uninstall: todoc.uninstall main.js.uninstall style.css.uninstall
uninstall: main.js.uninstall style.css.uninstall
@:
clean: todoc.clean main.js.clean style.css.clean
clean: main.js.clean style.css.clean
distclean: clean
dist: dist-gz dist-xz dist-bz2
$(Q)rm -- $(PACKAGE)-$(VERSION)
@ -113,7 +94,6 @@ 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)/src/client.cr \
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
$(PACKAGE)-$(VERSION)/client/authd.ls \
@ -132,7 +112,6 @@ 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)/src/client.cr \
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
$(PACKAGE)-$(VERSION)/client/authd.ls \
@ -151,7 +130,6 @@ 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)/src/client.cr \
$(PACKAGE)-$(VERSION)/client/index.ls \
$(PACKAGE)-$(VERSION)/client/style.sass \
$(PACKAGE)-$(VERSION)/client/authd.ls \
@ -178,7 +156,6 @@ help:
@echo ' - uninstall  Deinstalls the project.'
@echo ''
@echo 'CLI-modifiable variables:'
@echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - PREFIX  ${PREFIX}'
@echo ' - BINDIR  ${BINDIR}'
@echo ' - LIBDIR  ${LIBDIR}'
@ -187,7 +164,6 @@ help:
@echo ' - MANDIR  ${MANDIR}'
@echo ''
@echo 'Project targets: '
@echo ' - todoc  crystal'
@echo ' - main.js  livescript'
@echo ' - style.css  sass'
@echo ''

View File

@ -2,10 +2,10 @@
package=todo-webclient
version=0.1
targets=(todoc)
type[todoc]=crystal
sources[todoc]=src/client.cr
depends[todoc]="$(find src | grep .cr$ | grep -v src/client.cr)"
#targets=(todoc)
#type[todoc]=crystal
#sources[todoc]=src/client.cr
#depends[todoc]="$(find src | grep .cr$ | grep -v src/client.cr)"
targets+=(main.js)
type[main.js]=livescript