From 99165c6964f4d973030548c51f5415fc924aa640 Mon Sep 17 00:00:00 2001 From: Luka Vandervelden Date: Sat, 7 May 2016 13:52:26 +0200 Subject: [PATCH] Crystal build script added. --- Makefile | 24 ++++++++++++++++++++---- build/crystal.zsh | 25 +++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 build/crystal.zsh diff --git a/Makefile b/Makefile index 449f816..bcedd48 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ LDFLAGS := 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 @echo ' [SED] build.zsh' @@ -49,6 +49,19 @@ build/binary.zsh.uninstall: @echo ' [RM] $(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.install: build/library.zsh @@ -142,12 +155,12 @@ $(DESTDIR)$(SHAREDIR): $(DESTDIR)$(INCLUDEDIR): @echo ' [DIR] $(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: -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: @@ -157,7 +170,7 @@ test: all subdirs 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 @@ -173,6 +186,7 @@ $(PACKAGE)-$(VERSION).tar.gz: distdir @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.gz' $(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \ $(PACKAGE)-$(VERSION)/build/binary.zsh \ + $(PACKAGE)-$(VERSION)/build/crystal.zsh \ $(PACKAGE)-$(VERSION)/build/library.zsh \ $(PACKAGE)-$(VERSION)/build/moon.zsh \ $(PACKAGE)-$(VERSION)/build/ofile.zsh \ @@ -187,6 +201,7 @@ $(PACKAGE)-$(VERSION).tar.xz: distdir @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.xz' $(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \ $(PACKAGE)-$(VERSION)/build/binary.zsh \ + $(PACKAGE)-$(VERSION)/build/crystal.zsh \ $(PACKAGE)-$(VERSION)/build/library.zsh \ $(PACKAGE)-$(VERSION)/build/moon.zsh \ $(PACKAGE)-$(VERSION)/build/ofile.zsh \ @@ -201,6 +216,7 @@ $(PACKAGE)-$(VERSION).tar.bz2: distdir @echo ' [TAR] $(PACKAGE)-$(VERSION).tar.bz2' $(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \ $(PACKAGE)-$(VERSION)/build/binary.zsh \ + $(PACKAGE)-$(VERSION)/build/crystal.zsh \ $(PACKAGE)-$(VERSION)/build/library.zsh \ $(PACKAGE)-$(VERSION)/build/moon.zsh \ $(PACKAGE)-$(VERSION)/build/ofile.zsh \ diff --git a/build/crystal.zsh b/build/crystal.zsh new file mode 100644 index 0000000..0536f2e --- /dev/null +++ b/build/crystal.zsh @@ -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}" +} +