Crystal build script added.

This commit is contained in:
Luka Vandervelden 2016-05-07 13:52:26 +02:00
parent 82da094ca9
commit 99165c6964
2 changed files with 45 additions and 4 deletions

View File

@ -15,7 +15,7 @@ LDFLAGS :=
Q := @ Q := @
all: build.zsh build/binary.zsh build/library.zsh build/moon.zsh build/ofile.zsh build/script.zsh build/sharedlib.zsh build/staticlib.zsh all: build.zsh build/binary.zsh build/crystal.zsh build/library.zsh build/moon.zsh build/ofile.zsh build/script.zsh build/sharedlib.zsh build/staticlib.zsh
build.zsh: build.zsh.in build.zsh: build.zsh.in
@echo ' [SED] build.zsh' @echo ' [SED] build.zsh'
@ -49,6 +49,19 @@ build/binary.zsh.uninstall:
@echo ' [RM] $(SHAREDIR)/build.zsh/binary.zsh' @echo ' [RM] $(SHAREDIR)/build.zsh/binary.zsh'
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/binary.zsh' $(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/binary.zsh'
build/crystal.zsh:
build/crystal.zsh.install: build/crystal.zsh
@echo ' [IN] $(SHAREDIR)/build.zsh/crystal.zsh'
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
$(Q)install -m0755 build/crystal.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/crystal.zsh
build/crystal.zsh.clean:
build/crystal.zsh.uninstall:
@echo ' [RM] $(SHAREDIR)/build.zsh/crystal.zsh'
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/crystal.zsh'
build/library.zsh: build/library.zsh:
build/library.zsh.install: build/library.zsh build/library.zsh.install: build/library.zsh
@ -142,12 +155,12 @@ $(DESTDIR)$(SHAREDIR):
$(DESTDIR)$(INCLUDEDIR): $(DESTDIR)$(INCLUDEDIR):
@echo ' [DIR] $(INCLUDEDIR)' @echo ' [DIR] $(INCLUDEDIR)'
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR) $(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
install: subdirs.install build.zsh.install build/binary.zsh.install build/library.zsh.install build/moon.zsh.install build/ofile.zsh.install build/script.zsh.install build/sharedlib.zsh.install build/staticlib.zsh.install install: subdirs.install build.zsh.install build/binary.zsh.install build/crystal.zsh.install build/library.zsh.install build/moon.zsh.install build/ofile.zsh.install build/script.zsh.install build/sharedlib.zsh.install build/staticlib.zsh.install
@: @:
subdirs.install: subdirs.install:
uninstall: subdirs.uninstall build.zsh.uninstall build/binary.zsh.uninstall build/library.zsh.uninstall build/moon.zsh.uninstall build/ofile.zsh.uninstall build/script.zsh.uninstall build/sharedlib.zsh.uninstall build/staticlib.zsh.uninstall uninstall: subdirs.uninstall build.zsh.uninstall build/binary.zsh.uninstall build/crystal.zsh.uninstall build/library.zsh.uninstall build/moon.zsh.uninstall build/ofile.zsh.uninstall build/script.zsh.uninstall build/sharedlib.zsh.uninstall build/staticlib.zsh.uninstall
@: @:
subdirs.uninstall: subdirs.uninstall:
@ -157,7 +170,7 @@ test: all subdirs subdirs.test
subdirs.test: subdirs.test:
clean: build.zsh.clean build/binary.zsh.clean build/library.zsh.clean build/moon.zsh.clean build/ofile.zsh.clean build/script.zsh.clean build/sharedlib.zsh.clean build/staticlib.zsh.clean clean: build.zsh.clean build/binary.zsh.clean build/crystal.zsh.clean build/library.zsh.clean build/moon.zsh.clean build/ofile.zsh.clean build/script.zsh.clean build/sharedlib.zsh.clean build/staticlib.zsh.clean
distclean: clean distclean: clean
@ -173,6 +186,7 @@ $(PACKAGE)-$(VERSION).tar.gz: distdir
@echo ' [TAR] $(PACKAGE)-$(VERSION).tar.gz' @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.gz'
$(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \ $(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \
$(PACKAGE)-$(VERSION)/build/binary.zsh \ $(PACKAGE)-$(VERSION)/build/binary.zsh \
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
$(PACKAGE)-$(VERSION)/build/library.zsh \ $(PACKAGE)-$(VERSION)/build/library.zsh \
$(PACKAGE)-$(VERSION)/build/moon.zsh \ $(PACKAGE)-$(VERSION)/build/moon.zsh \
$(PACKAGE)-$(VERSION)/build/ofile.zsh \ $(PACKAGE)-$(VERSION)/build/ofile.zsh \
@ -187,6 +201,7 @@ $(PACKAGE)-$(VERSION).tar.xz: distdir
@echo ' [TAR] $(PACKAGE)-$(VERSION).tar.xz' @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.xz'
$(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \ $(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \
$(PACKAGE)-$(VERSION)/build/binary.zsh \ $(PACKAGE)-$(VERSION)/build/binary.zsh \
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
$(PACKAGE)-$(VERSION)/build/library.zsh \ $(PACKAGE)-$(VERSION)/build/library.zsh \
$(PACKAGE)-$(VERSION)/build/moon.zsh \ $(PACKAGE)-$(VERSION)/build/moon.zsh \
$(PACKAGE)-$(VERSION)/build/ofile.zsh \ $(PACKAGE)-$(VERSION)/build/ofile.zsh \
@ -201,6 +216,7 @@ $(PACKAGE)-$(VERSION).tar.bz2: distdir
@echo ' [TAR] $(PACKAGE)-$(VERSION).tar.bz2' @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.bz2'
$(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \ $(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \
$(PACKAGE)-$(VERSION)/build/binary.zsh \ $(PACKAGE)-$(VERSION)/build/binary.zsh \
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
$(PACKAGE)-$(VERSION)/build/library.zsh \ $(PACKAGE)-$(VERSION)/build/library.zsh \
$(PACKAGE)-$(VERSION)/build/moon.zsh \ $(PACKAGE)-$(VERSION)/build/moon.zsh \
$(PACKAGE)-$(VERSION)/build/ofile.zsh \ $(PACKAGE)-$(VERSION)/build/ofile.zsh \

25
build/crystal.zsh Normal file
View File

@ -0,0 +1,25 @@
function crystal.build {
write "${target}: ${src[@]} ${depends[$target]}"
write "\t@echo '${fg_bold[magenta]} [CR] ${fg_bold[white]}$target${reset_color}'"
write "\t${Q}crystal ${src[@]} -o '${target}'"
write "\n"
}
function crystal.install {
binary.install "$@"
}
function crystal.uninstall {
binary.uninstall "$@"
}
function crystal.clean {
script.clean "$@"
}
function crystal.distfiles {
echo "${target}"
}