145 lines
4.9 KiB
Makefile
145 lines
4.9 KiB
Makefile
|
PACKAGE = 'infra-baguette'
|
|||
|
VERSION = '0.1.0'
|
|||
|
|
|||
|
PREFIX := /usr/local
|
|||
|
BINDIR := $(PREFIX)/bin
|
|||
|
LIBDIR := $(PREFIX)/lib
|
|||
|
SHAREDIR := $(PREFIX)/share
|
|||
|
INCLUDEDIR := $(PREFIX)/include
|
|||
|
MANDIR := $(SHAREDIR)/man
|
|||
|
|
|||
|
Q := @
|
|||
|
|
|||
|
all: man/certificats.7 man/infra.7
|
|||
|
@:
|
|||
|
|
|||
|
man/certificats.7: man/certificats.7.scd man
|
|||
|
@echo '[01;33m MAN > [01;37mman/certificats.7[00m'
|
|||
|
$(Q)scdoc < 'man/certificats.7.scd' > 'man/certificats.7'
|
|||
|
|
|||
|
|
|||
|
man/certificats.7.install: man/certificats.7
|
|||
|
@echo '[01;31m IN > [01;37m$(MANDIR)/man7/certificats.7[00m'
|
|||
|
$(Q)mkdir -p '$(DESTDIR)$(MANDIR)/man7'
|
|||
|
$(Q)install -m0644 man/certificats.7 $(DESTDIR)$(MANDIR)/man7/certificats.7
|
|||
|
|
|||
|
man/certificats.7.clean:
|
|||
|
@echo '[01;37m RM > [01;37mman/certificats.7[00m'
|
|||
|
$(Q)rm -f man/certificats.7
|
|||
|
|
|||
|
man/certificats.7.uninstall:
|
|||
|
@echo '[01;37m RM > [01;37m$(MANDIR)/man7/certificats.7[00m'
|
|||
|
$(Q)rm -f '$(DESTDIR)$(MANDIR)/man7/certificats.7'
|
|||
|
|
|||
|
man/infra.7: man/infra.7.scd man
|
|||
|
@echo '[01;33m MAN > [01;37mman/infra.7[00m'
|
|||
|
$(Q)scdoc < 'man/infra.7.scd' > 'man/infra.7'
|
|||
|
|
|||
|
|
|||
|
man/infra.7.install: man/infra.7
|
|||
|
@echo '[01;31m IN > [01;37m$(MANDIR)/man7/infra.7[00m'
|
|||
|
$(Q)mkdir -p '$(DESTDIR)$(MANDIR)/man7'
|
|||
|
$(Q)install -m0644 man/infra.7 $(DESTDIR)$(MANDIR)/man7/infra.7
|
|||
|
|
|||
|
man/infra.7.clean:
|
|||
|
@echo '[01;37m RM > [01;37mman/infra.7[00m'
|
|||
|
$(Q)rm -f man/infra.7
|
|||
|
|
|||
|
man/infra.7.uninstall:
|
|||
|
@echo '[01;37m RM > [01;37m$(MANDIR)/man7/infra.7[00m'
|
|||
|
$(Q)rm -f '$(DESTDIR)$(MANDIR)/man7/infra.7'
|
|||
|
|
|||
|
man:
|
|||
|
$(Q)mkdir -p man
|
|||
|
$(DESTDIR)$(PREFIX):
|
|||
|
@echo '[01;35m DIR > [01;37m$(PREFIX)[00m'
|
|||
|
$(Q)mkdir -p $(DESTDIR)$(PREFIX)
|
|||
|
$(DESTDIR)$(BINDIR):
|
|||
|
@echo '[01;35m DIR > [01;37m$(BINDIR)[00m'
|
|||
|
$(Q)mkdir -p $(DESTDIR)$(BINDIR)
|
|||
|
$(DESTDIR)$(LIBDIR):
|
|||
|
@echo '[01;35m DIR > [01;37m$(LIBDIR)[00m'
|
|||
|
$(Q)mkdir -p $(DESTDIR)$(LIBDIR)
|
|||
|
$(DESTDIR)$(SHAREDIR):
|
|||
|
@echo '[01;35m DIR > [01;37m$(SHAREDIR)[00m'
|
|||
|
$(Q)mkdir -p $(DESTDIR)$(SHAREDIR)
|
|||
|
$(DESTDIR)$(INCLUDEDIR):
|
|||
|
@echo '[01;35m DIR > [01;37m$(INCLUDEDIR)[00m'
|
|||
|
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
|||
|
$(DESTDIR)$(MANDIR):
|
|||
|
@echo '[01;35m DIR > [01;37m$(MANDIR)[00m'
|
|||
|
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
|
|||
|
install: man/certificats.7.install man/infra.7.install
|
|||
|
@:
|
|||
|
|
|||
|
uninstall: man/certificats.7.uninstall man/infra.7.uninstall
|
|||
|
@:
|
|||
|
|
|||
|
clean: man/certificats.7.clean man/infra.7.clean
|
|||
|
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 '[01;33m TAR > [01;37m$(PACKAGE)-$(VERSION).tar.gz[00m'
|
|||
|
$(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \
|
|||
|
$(PACKAGE)-$(VERSION)/Makefile \
|
|||
|
$(PACKAGE)-$(VERSION)/project.zsh \
|
|||
|
$(PACKAGE)-$(VERSION)/man/certificats.7.scd \
|
|||
|
$(PACKAGE)-$(VERSION)/man/infra.7.scd
|
|||
|
|
|||
|
dist-xz: $(PACKAGE)-$(VERSION).tar.xz
|
|||
|
$(PACKAGE)-$(VERSION).tar.xz: distdir
|
|||
|
@echo '[01;33m TAR > [01;37m$(PACKAGE)-$(VERSION).tar.xz[00m'
|
|||
|
$(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \
|
|||
|
$(PACKAGE)-$(VERSION)/Makefile \
|
|||
|
$(PACKAGE)-$(VERSION)/project.zsh \
|
|||
|
$(PACKAGE)-$(VERSION)/man/certificats.7.scd \
|
|||
|
$(PACKAGE)-$(VERSION)/man/infra.7.scd
|
|||
|
|
|||
|
dist-bz2: $(PACKAGE)-$(VERSION).tar.bz2
|
|||
|
$(PACKAGE)-$(VERSION).tar.bz2: distdir
|
|||
|
@echo '[01;33m TAR > [01;37m$(PACKAGE)-$(VERSION).tar.bz2[00m'
|
|||
|
$(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \
|
|||
|
$(PACKAGE)-$(VERSION)/Makefile \
|
|||
|
$(PACKAGE)-$(VERSION)/project.zsh \
|
|||
|
$(PACKAGE)-$(VERSION)/man/certificats.7.scd \
|
|||
|
$(PACKAGE)-$(VERSION)/man/infra.7.scd
|
|||
|
|
|||
|
help:
|
|||
|
@echo '[01;37m :: infra-baguette-0.1.0[00m'
|
|||
|
@echo ''
|
|||
|
@echo '[01;37mGeneric targets:[00m'
|
|||
|
@echo '[00m - [01;32mhelp [37m Prints this help message.[00m'
|
|||
|
@echo '[00m - [01;32mall [37m Builds all targets.[00m'
|
|||
|
@echo '[00m - [01;32mdist [37m Creates tarballs of the files of the project.[00m'
|
|||
|
@echo '[00m - [01;32minstall [37m Installs the project.[00m'
|
|||
|
@echo '[00m - [01;32mclean [37m Removes compiled files.[00m'
|
|||
|
@echo '[00m - [01;32muninstall [37m Deinstalls the project.[00m'
|
|||
|
@echo ''
|
|||
|
@echo '[01;37mCLI-modifiable variables:[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 ''
|
|||
|
@echo '[01;37mProject targets: [00m'
|
|||
|
@echo ' - [01;33mman/certificats.7 [37m scdocman[00m'
|
|||
|
@echo ' - [01;33mman/infra.7 [37m scdocman[00m'
|
|||
|
@echo ''
|
|||
|
@echo '[01;37mMakefile options:[00m'
|
|||
|
@echo ' - gnu: false'
|
|||
|
@echo ' - colors: true'
|
|||
|
@echo ''
|
|||
|
@echo '[01;37mRebuild the Makefile with:[00m'
|
|||
|
@echo ' zsh ./build.zsh -c'
|
|||
|
.PHONY: all clean distclean dist install uninstall help
|
|||
|
|