Updated Makefile (new build.zsh 0.4.1)
parent
fecac6b3d5
commit
68a9a7f50d
47
Makefile
47
Makefile
|
@ -10,21 +10,16 @@ MANDIR := $(SHAREDIR)/man
|
|||
LIBEXECDIR := $(PREFIX)/libexec
|
||||
SYSCONFDIR := $(PREFIX)/etc
|
||||
VERSION := 0.9.3
|
||||
|
||||
CC := cc
|
||||
AR := ar
|
||||
RANLIB := ranlib
|
||||
CFLAGS :=
|
||||
LDFLAGS :=
|
||||
CRFLAGS := --release
|
||||
|
||||
Q := @
|
||||
|
||||
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 '[01;35m CR > [01;37mpackaging[00m'
|
||||
$(Q)crystal src/main.cr -o 'packaging'
|
||||
$(Q)crystal build $(CRFLAGS) src/main.cr -o 'packaging'
|
||||
|
||||
|
||||
packaging.install: packaging
|
||||
|
@ -54,8 +49,8 @@ assemble-apk.sh.uninstall:
|
|||
$(Q)rm -f '$(DESTDIR)$(LIBEXECDIR)/packaging/assemble-apk.sh'
|
||||
|
||||
src/config.cr: src/config.cr.in src
|
||||
@echo '[01;32m SED > [01;37msrc/config.cr[00m'
|
||||
$(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'
|
||||
@echo '[01;33m SED > [01;37msrc/config.cr[00m'
|
||||
$(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'
|
||||
|
||||
|
||||
|
@ -90,25 +85,14 @@ $(DESTDIR)$(INCLUDEDIR):
|
|||
$(DESTDIR)$(MANDIR):
|
||||
@echo '[01;35m DIR > [01;37m$(MANDIR)[00m'
|
||||
$(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: subdirs.uninstall packaging.uninstall assemble-apk.sh.uninstall src/config.cr.uninstall
|
||||
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
|
||||
|
||||
distclean: clean
|
||||
|
||||
dist: dist-gz dist-xz dist-bz2
|
||||
$(Q)rm -- $(PACKAGE)-$(VERSION)
|
||||
|
||||
|
@ -173,23 +157,20 @@ help:
|
|||
@echo '[00m - [01;32muninstall [37m Deinstalls the project.[00m'
|
||||
@echo ''
|
||||
@echo '[01;37mCLI-modifiable variables:[00m'
|
||||
@echo ' - [01;34mCC [37m ${CC}[00m'
|
||||
@echo ' - [01;34mCFLAGS [37m ${CFLAGS}[00m'
|
||||
@echo ' - [01;34mLDFLAGS [37m ${LDFLAGS}[00m'
|
||||
@echo ' - [01;34mDESTDIR [37m ${DESTDIR}[00m'
|
||||
@echo ' - [01;34mLIBEXECDIR [37m ${LIBEXECDIR}[00m'
|
||||
@echo ' - [01;34mSYSCONFDIR [37m ${SYSCONFDIR}[00m'
|
||||
@echo ' - [01;34mVERSION [37m ${VERSION}[00m'
|
||||
@echo ' - [01;34mCRFLAGS [37m ${CRFLAGS}[00m'
|
||||
@echo ' - [01;34mPREFIX [37m ${PREFIX}[00m'
|
||||
@echo ' - [01;34mBINDIR [37m ${BINDIR}[00m'
|
||||
@echo ' - [01;34mLIBDIR [37m ${LIBDIR}[00m'
|
||||
@echo ' - [01;34mSHAREDIR [37m ${SHAREDIR}[00m'
|
||||
@echo ' - [01;34mINCLUDEDIR [37m ${INCLUDEDIR}[00m'
|
||||
@echo ' - [01;34mMANDIR [37m ${MANDIR}[00m'
|
||||
@echo ' - [01;34mLIBEXECDIR [37m ${LIBEXECDIR}[00m'
|
||||
@echo ' - [01;34mSYSCONFDIR [37m ${SYSCONFDIR}[00m'
|
||||
@echo ' - [01;34mVERSION [37m ${VERSION}[00m'
|
||||
@echo ''
|
||||
@echo '[01;37mProject targets: [00m'
|
||||
@echo ' - [01;33mpackaging [37m crystal[00m'
|
||||
@echo ' - [01;33massemble-apk.sh[37m script[00m'
|
||||
@echo ' - [01;33mpackaging [37m crystal[00m'
|
||||
@echo ' - [01;33massemble-apk.sh [37m script[00m'
|
||||
@echo ''
|
||||
@echo '[01;37mMakefile options:[00m'
|
||||
@echo ' - gnu: false'
|
||||
|
@ -197,5 +178,5 @@ help:
|
|||
@echo ''
|
||||
@echo '[01;37mRebuild the Makefile with:[00m'
|
||||
@echo ' zsh ./build.zsh -c'
|
||||
.PHONY: all subdirs clean distclean dist install uninstall help
|
||||
.PHONY: all clean distclean dist install uninstall help
|
||||
|
||||
|
|
Reference in New Issue