Archived
3
0

Updated Makefile (new build.zsh 0.4.1)

This commit is contained in:
Karchnu 2021-02-20 10:05:04 +01:00
parent fecac6b3d5
commit 68a9a7f50d

View File

@ -10,12 +10,7 @@ MANDIR := $(SHAREDIR)/man
LIBEXECDIR := $(PREFIX)/libexec LIBEXECDIR := $(PREFIX)/libexec
SYSCONFDIR := $(PREFIX)/etc SYSCONFDIR := $(PREFIX)/etc
VERSION := 0.9.3 VERSION := 0.9.3
CRFLAGS := --release
CC := cc
AR := ar
RANLIB := ranlib
CFLAGS :=
LDFLAGS :=
Q := @ Q := @
@ -24,7 +19,7 @@ all: packaging assemble-apk.sh src/config.cr
packaging: src/main.cr src/backends.cr src/context.cr src/exception.cr src/instructions.cr src/main.cr src/package.cr src/recipe.cr src/sources.cr src/config.cr packaging: src/main.cr src/backends.cr src/context.cr src/exception.cr src/instructions.cr src/main.cr src/package.cr src/recipe.cr src/sources.cr src/config.cr
@echo ' CR > packaging' @echo ' CR > packaging'
$(Q)crystal src/main.cr -o 'packaging' $(Q)crystal build $(CRFLAGS) src/main.cr -o 'packaging'
packaging.install: packaging packaging.install: packaging
@ -54,8 +49,8 @@ assemble-apk.sh.uninstall:
$(Q)rm -f '$(DESTDIR)$(LIBEXECDIR)/packaging/assemble-apk.sh' $(Q)rm -f '$(DESTDIR)$(LIBEXECDIR)/packaging/assemble-apk.sh'
src/config.cr: src/config.cr.in src src/config.cr: src/config.cr.in src
@echo ' SED > src/config.cr' @echo ' SED > src/config.cr'
$(Q)sed -e 's&@PREFIX@&$(PREFIX)&;s&@BINDIR@&$(BINDIR)&;s&@LIBDIR@&$(LIBDIR)&;s&@SHAREDIR@&$(SHAREDIR)&;s&@INCLUDEDIR@&$(INCLUDEDIR)&;s&@MANDIR@&$(MANDIR)&;s&@LIBEXECDIR@&$(LIBEXECDIR)&;s&@SYSCONFDIR@&$(SYSCONFDIR)&;s&@VERSION@&$(VERSION)&;' src/config.cr.in > 'src/config.cr' $(Q)sed -e 's&@PREFIX@&$(PREFIX)&;s&@BINDIR@&$(BINDIR)&;s&@LIBDIR@&$(LIBDIR)&;s&@SHAREDIR@&$(SHAREDIR)&;s&@INCLUDEDIR@&$(INCLUDEDIR)&;s&@MANDIR@&$(MANDIR)&;s&@LIBEXECDIR@&$(LIBEXECDIR)&;s&@SYSCONFDIR@&$(SYSCONFDIR)&;s&@VERSION@&$(VERSION)&;s&@CRFLAGS@&$(CRFLAGS)&;' src/config.cr.in > 'src/config.cr'
$(Q)chmod +x 'src/config.cr' $(Q)chmod +x 'src/config.cr'
@ -90,25 +85,14 @@ $(DESTDIR)$(INCLUDEDIR):
$(DESTDIR)$(MANDIR): $(DESTDIR)$(MANDIR):
@echo ' DIR > $(MANDIR)' @echo ' DIR > $(MANDIR)'
$(Q)mkdir -p $(DESTDIR)$(MANDIR) $(Q)mkdir -p $(DESTDIR)$(MANDIR)
install: subdirs.install packaging.install assemble-apk.sh.install src/config.cr.install install: packaging.install assemble-apk.sh.install src/config.cr.install
@: @:
subdirs.install: uninstall: packaging.uninstall assemble-apk.sh.uninstall src/config.cr.uninstall
uninstall: subdirs.uninstall packaging.uninstall assemble-apk.sh.uninstall src/config.cr.uninstall
@: @:
subdirs.uninstall:
test: all subdirs subdirs.test
@:
subdirs.test:
clean: packaging.clean assemble-apk.sh.clean src/config.cr.clean clean: packaging.clean assemble-apk.sh.clean src/config.cr.clean
distclean: clean distclean: clean
dist: dist-gz dist-xz dist-bz2 dist: dist-gz dist-xz dist-bz2
$(Q)rm -- $(PACKAGE)-$(VERSION) $(Q)rm -- $(PACKAGE)-$(VERSION)
@ -173,19 +157,16 @@ help:
@echo ' - uninstall  Deinstalls the project.' @echo ' - uninstall  Deinstalls the project.'
@echo '' @echo ''
@echo 'CLI-modifiable variables:' @echo 'CLI-modifiable variables:'
@echo ' - CC  ${CC}' @echo ' - LIBEXECDIR  ${LIBEXECDIR}'
@echo ' - CFLAGS  ${CFLAGS}' @echo ' - SYSCONFDIR  ${SYSCONFDIR}'
@echo ' - LDFLAGS  ${LDFLAGS}' @echo ' - VERSION  ${VERSION}'
@echo ' - DESTDIR  ${DESTDIR}' @echo ' - CRFLAGS  ${CRFLAGS}'
@echo ' - PREFIX  ${PREFIX}' @echo ' - PREFIX  ${PREFIX}'
@echo ' - BINDIR  ${BINDIR}' @echo ' - BINDIR  ${BINDIR}'
@echo ' - LIBDIR  ${LIBDIR}' @echo ' - LIBDIR  ${LIBDIR}'
@echo ' - SHAREDIR  ${SHAREDIR}' @echo ' - SHAREDIR  ${SHAREDIR}'
@echo ' - INCLUDEDIR  ${INCLUDEDIR}' @echo ' - INCLUDEDIR  ${INCLUDEDIR}'
@echo ' - MANDIR  ${MANDIR}' @echo ' - MANDIR  ${MANDIR}'
@echo ' - LIBEXECDIR  ${LIBEXECDIR}'
@echo ' - SYSCONFDIR  ${SYSCONFDIR}'
@echo ' - VERSION  ${VERSION}'
@echo '' @echo ''
@echo 'Project targets: ' @echo 'Project targets: '
@echo ' - packaging  crystal' @echo ' - packaging  crystal'
@ -197,5 +178,5 @@ help:
@echo '' @echo ''
@echo 'Rebuild the Makefile with:' @echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c' @echo ' zsh ./build.zsh -c'
.PHONY: all subdirs clean distclean dist install uninstall help .PHONY: all clean distclean dist install uninstall help