Obsolete
/
packaging
Archived
3
0
Fork 0
This repository has been archived on 2022-01-17. You can view files and clone it, but cannot push or open issues/pull-requests.
packaging/Makefile

202 lines
6.9 KiB
Makefile
Raw Normal View History

2019-09-12 17:30:39 +02:00
PACKAGE = 'packaging'
2019-09-04 19:53:41 +02:00
VERSION = '0.8.0'
2019-08-03 13:12:23 +02:00
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
LIBDIR := $(PREFIX)/lib
SHAREDIR := $(PREFIX)/share
INCLUDEDIR := $(PREFIX)/include
MANDIR := $(SHAREDIR)/man
LIBEXECDIR := $(PREFIX)/libexec
2019-08-29 00:20:15 +02:00
SYSCONFDIR := $(PREFIX)/etc
2019-09-04 19:53:41 +02:00
VERSION := 0.8.0
2019-08-03 13:12:23 +02:00
CC := cc
AR := ar
RANLIB := ranlib
CFLAGS :=
LDFLAGS :=
Q := @
2019-09-12 17:30:39 +02:00
all: packaging assemble-apk.sh src/config.cr
2019-08-03 13:12:23 +02:00
@:
2019-09-12 17:30:39 +02:00
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'
$(Q)crystal src/main.cr -o 'packaging'
2019-08-03 13:12:23 +02:00
2019-09-12 17:30:39 +02:00
packaging.install: packaging
@echo ' IN > $(BINDIR)/packaging'
2019-08-03 13:12:23 +02:00
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
2019-09-12 17:30:39 +02:00
$(Q)install -m0755 packaging $(DESTDIR)$(BINDIR)/packaging
2019-08-03 13:12:23 +02:00
2019-09-12 17:30:39 +02:00
packaging.clean:
@echo ' RM > packaging'
$(Q)rm -f packaging
2019-08-03 13:12:23 +02:00
2019-09-12 17:30:39 +02:00
packaging.uninstall:
@echo ' RM > $(BINDIR)/packaging'
$(Q)rm -f '$(DESTDIR)$(BINDIR)/packaging'
2019-08-03 13:12:23 +02:00
assemble-apk.sh:
assemble-apk.sh.install: assemble-apk.sh
2019-09-12 17:30:39 +02:00
@echo ' IN > $(LIBEXECDIR)/packaging/assemble-apk.sh'
$(Q)mkdir -p '$(DESTDIR)$(LIBEXECDIR)/packaging'
$(Q)install -m0755 assemble-apk.sh $(DESTDIR)$(LIBEXECDIR)/packaging/assemble-apk.sh
2019-08-03 13:12:23 +02:00
assemble-apk.sh.clean:
assemble-apk.sh.uninstall:
2019-09-12 17:30:39 +02:00
@echo ' RM > $(LIBEXECDIR)/packaging/assemble-apk.sh'
$(Q)rm -f '$(DESTDIR)$(LIBEXECDIR)/packaging/assemble-apk.sh'
2019-08-03 13:12:23 +02:00
src/config.cr: src/config.cr.in src
@echo ' SED > src/config.cr'
2019-08-29 00:20:15 +02:00
$(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'
2019-08-03 13:12:23 +02:00
$(Q)chmod +x 'src/config.cr'
src/config.cr.install:
$(Q):
src/config.cr.clean:
@echo ' RM > src/config.cr'
$(Q)rm -f src/config.cr
src/config.cr.uninstall:
@echo ' RM > false/config.cr'
$(Q)rm -f '$(DESTDIR)false/config.cr'
src:
$(Q)mkdir -p src
$(DESTDIR)$(PREFIX):
@echo ' DIR > $(PREFIX)'
$(Q)mkdir -p $(DESTDIR)$(PREFIX)
$(DESTDIR)$(BINDIR):
@echo ' DIR > $(BINDIR)'
$(Q)mkdir -p $(DESTDIR)$(BINDIR)
$(DESTDIR)$(LIBDIR):
@echo ' DIR > $(LIBDIR)'
$(Q)mkdir -p $(DESTDIR)$(LIBDIR)
$(DESTDIR)$(SHAREDIR):
@echo ' DIR > $(SHAREDIR)'
$(Q)mkdir -p $(DESTDIR)$(SHAREDIR)
$(DESTDIR)$(INCLUDEDIR):
@echo ' DIR > $(INCLUDEDIR)'
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
$(DESTDIR)$(MANDIR):
@echo ' DIR > $(MANDIR)'
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
2019-09-12 17:30:39 +02:00
install: subdirs.install packaging.install assemble-apk.sh.install src/config.cr.install
2019-08-03 13:12:23 +02:00
@:
subdirs.install:
2019-09-12 17:30:39 +02:00
uninstall: subdirs.uninstall packaging.uninstall assemble-apk.sh.uninstall src/config.cr.uninstall
2019-08-03 13:12:23 +02:00
@:
subdirs.uninstall:
test: all subdirs subdirs.test
@:
subdirs.test:
2019-09-12 17:30:39 +02:00
clean: packaging.clean assemble-apk.sh.clean src/config.cr.clean
2019-08-03 13:12:23 +02:00
distclean: clean
dist: dist-gz dist-xz dist-bz2
$(Q)rm -- $(PACKAGE)-$(VERSION)
distdir:
$(Q)rm -rf -- $(PACKAGE)-$(VERSION)
$(Q)ln -s -- . $(PACKAGE)-$(VERSION)
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/config.cr.in \
2019-09-12 17:30:39 +02:00
$(PACKAGE)-$(VERSION)/src/backends.cr \
2019-08-03 13:12:23 +02:00
$(PACKAGE)-$(VERSION)/src/context.cr \
2019-08-28 20:25:59 +02:00
$(PACKAGE)-$(VERSION)/src/exception.cr \
2019-08-03 13:12:23 +02:00
$(PACKAGE)-$(VERSION)/src/instructions.cr \
$(PACKAGE)-$(VERSION)/src/main.cr \
$(PACKAGE)-$(VERSION)/src/package.cr \
$(PACKAGE)-$(VERSION)/src/recipe.cr \
$(PACKAGE)-$(VERSION)/src/sources.cr \
$(PACKAGE)-$(VERSION)/src/config.cr
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/config.cr.in \
2019-09-12 17:30:39 +02:00
$(PACKAGE)-$(VERSION)/src/backends.cr \
2019-08-03 13:12:23 +02:00
$(PACKAGE)-$(VERSION)/src/context.cr \
2019-08-28 20:25:59 +02:00
$(PACKAGE)-$(VERSION)/src/exception.cr \
2019-08-03 13:12:23 +02:00
$(PACKAGE)-$(VERSION)/src/instructions.cr \
$(PACKAGE)-$(VERSION)/src/main.cr \
$(PACKAGE)-$(VERSION)/src/package.cr \
$(PACKAGE)-$(VERSION)/src/recipe.cr \
$(PACKAGE)-$(VERSION)/src/sources.cr \
$(PACKAGE)-$(VERSION)/src/config.cr
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/config.cr.in \
2019-09-12 17:30:39 +02:00
$(PACKAGE)-$(VERSION)/src/backends.cr \
2019-08-03 13:12:23 +02:00
$(PACKAGE)-$(VERSION)/src/context.cr \
2019-08-28 20:25:59 +02:00
$(PACKAGE)-$(VERSION)/src/exception.cr \
2019-08-03 13:12:23 +02:00
$(PACKAGE)-$(VERSION)/src/instructions.cr \
$(PACKAGE)-$(VERSION)/src/main.cr \
$(PACKAGE)-$(VERSION)/src/package.cr \
$(PACKAGE)-$(VERSION)/src/recipe.cr \
$(PACKAGE)-$(VERSION)/src/sources.cr \
$(PACKAGE)-$(VERSION)/src/config.cr
help:
2019-09-12 17:30:39 +02:00
@echo ' :: packaging-0.8.0'
2019-08-03 13:12:23 +02:00
@echo ''
@echo 'Generic targets:'
@echo ' - help  Prints this help message.'
@echo ' - all  Builds all targets.'
@echo ' - dist  Creates tarballs of the files of the project.'
@echo ' - install  Installs the project.'
@echo ' - clean  Removes compiled files.'
@echo ' - uninstall  Deinstalls the project.'
@echo ''
@echo 'CLI-modifiable variables:'
@echo ' - CC  ${CC}'
@echo ' - CFLAGS  ${CFLAGS}'
@echo ' - LDFLAGS  ${LDFLAGS}'
@echo ' - DESTDIR  ${DESTDIR}'
@echo ' - PREFIX  ${PREFIX}'
@echo ' - BINDIR  ${BINDIR}'
@echo ' - LIBDIR  ${LIBDIR}'
@echo ' - SHAREDIR  ${SHAREDIR}'
@echo ' - INCLUDEDIR  ${INCLUDEDIR}'
@echo ' - MANDIR  ${MANDIR}'
@echo ' - LIBEXECDIR  ${LIBEXECDIR}'
2019-08-29 00:20:15 +02:00
@echo ' - SYSCONFDIR  ${SYSCONFDIR}'
2019-08-28 20:25:59 +02:00
@echo ' - VERSION  ${VERSION}'
2019-08-03 13:12:23 +02:00
@echo ''
@echo 'Project targets: '
2019-09-12 17:30:39 +02:00
@echo ' - packaging  crystal'
2019-08-03 13:12:23 +02:00
@echo ' - assemble-apk.sh script'
@echo ''
@echo 'Makefile options:'
@echo ' - gnu: false'
@echo ' - colors: true'
@echo ''
@echo 'Rebuild the Makefile with:'
@echo ' zsh ./build.zsh -c'
.PHONY: all subdirs clean distclean dist install uninstall help