Merge pull request #2 from KaneRoot/master
Adding `scdocman` script to allow scdoc man pages.
This commit is contained in:
commit
5009a910b9
167
Makefile
167
Makefile
@ -1,5 +1,5 @@
|
|||||||
PACKAGE = 'build_zsh'
|
PACKAGE = 'build_zsh'
|
||||||
VERSION = '0.2.2'
|
VERSION = '0.3.0'
|
||||||
|
|
||||||
PREFIX := /usr/local
|
PREFIX := /usr/local
|
||||||
BINDIR := $(PREFIX)/bin
|
BINDIR := $(PREFIX)/bin
|
||||||
@ -16,184 +16,197 @@ LDFLAGS :=
|
|||||||
|
|
||||||
Q := @
|
Q := @
|
||||||
|
|
||||||
all: build.zsh build/binary.zsh build/crystal.zsh build/header.zsh build/library.zsh build/man.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/header.zsh build/library.zsh build/man.zsh build/moon.zsh build/ofile.zsh build/scdocman.zsh build/script.zsh build/sharedlib.zsh build/staticlib.zsh
|
||||||
@:
|
@:
|
||||||
|
|
||||||
build.zsh: build.zsh.in .
|
build.zsh: build.zsh.in
|
||||||
@echo ' SED > build.zsh'
|
@echo '[01;32m SED > [01;37mbuild.zsh[00m'
|
||||||
$(Q)sed -e 's&@LIBDIR@&$(LIBDIR)&;s&@BINDIR@&$(BINDIR)&;s&@SHAREDIR@&$(SHAREDIR)&;' build.zsh.in > 'build.zsh'
|
$(Q)sed -e 's&@PREFIX@&$(PREFIX)&;s&@BINDIR@&$(BINDIR)&;s&@LIBDIR@&$(LIBDIR)&;s&@SHAREDIR@&$(SHAREDIR)&;s&@INCLUDEDIR@&$(INCLUDEDIR)&;s&@MANDIR@&$(MANDIR)&;' build.zsh.in > 'build.zsh'
|
||||||
$(Q)chmod +x 'build.zsh'
|
$(Q)chmod +x 'build.zsh'
|
||||||
|
|
||||||
|
|
||||||
build.zsh.install: build.zsh
|
build.zsh.install: build.zsh
|
||||||
@echo ' IN > $(BINDIR)/build.zsh'
|
@echo '[01;31m IN > [01;37m$(BINDIR)/build.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
|
$(Q)mkdir -p '$(DESTDIR)$(BINDIR)'
|
||||||
$(Q)install -m0755 build.zsh $(DESTDIR)$(BINDIR)/build.zsh
|
$(Q)install -m0755 build.zsh $(DESTDIR)$(BINDIR)/build.zsh
|
||||||
|
|
||||||
build.zsh.clean:
|
build.zsh.clean:
|
||||||
@echo ' RM > build.zsh'
|
@echo '[01;37m RM > [01;37mbuild.zsh[00m'
|
||||||
$(Q)rm -f build.zsh
|
$(Q)rm -f build.zsh
|
||||||
|
|
||||||
build.zsh.uninstall:
|
build.zsh.uninstall:
|
||||||
@echo ' RM > $(BINDIR)/build.zsh'
|
@echo '[01;37m RM > [01;37m$(BINDIR)/build.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(BINDIR)/build.zsh'
|
$(Q)rm -f '$(DESTDIR)$(BINDIR)/build.zsh'
|
||||||
|
|
||||||
build/binary.zsh:
|
build/binary.zsh:
|
||||||
|
|
||||||
build/binary.zsh.install: build/binary.zsh
|
build/binary.zsh.install: build/binary.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/binary.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/binary.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/binary.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/binary.zsh
|
$(Q)install -m0755 build/binary.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/binary.zsh
|
||||||
|
|
||||||
build/binary.zsh.clean:
|
build/binary.zsh.clean:
|
||||||
|
|
||||||
build/binary.zsh.uninstall:
|
build/binary.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/binary.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/binary.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/binary.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/binary.zsh'
|
||||||
|
|
||||||
build/crystal.zsh:
|
build/crystal.zsh:
|
||||||
|
|
||||||
build/crystal.zsh.install: build/crystal.zsh
|
build/crystal.zsh.install: build/crystal.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/crystal.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/crystal.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/crystal.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/crystal.zsh
|
$(Q)install -m0755 build/crystal.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/crystal.zsh
|
||||||
|
|
||||||
build/crystal.zsh.clean:
|
build/crystal.zsh.clean:
|
||||||
|
|
||||||
build/crystal.zsh.uninstall:
|
build/crystal.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/crystal.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/crystal.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/crystal.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/crystal.zsh'
|
||||||
|
|
||||||
build/header.zsh:
|
build/header.zsh:
|
||||||
|
|
||||||
build/header.zsh.install: build/header.zsh
|
build/header.zsh.install: build/header.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/header.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/header.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/header.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/header.zsh
|
$(Q)install -m0755 build/header.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/header.zsh
|
||||||
|
|
||||||
build/header.zsh.clean:
|
build/header.zsh.clean:
|
||||||
|
|
||||||
build/header.zsh.uninstall:
|
build/header.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/header.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/header.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/header.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/header.zsh'
|
||||||
|
|
||||||
build/library.zsh:
|
build/library.zsh:
|
||||||
|
|
||||||
build/library.zsh.install: build/library.zsh
|
build/library.zsh.install: build/library.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/library.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/library.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/library.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/library.zsh
|
$(Q)install -m0755 build/library.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/library.zsh
|
||||||
|
|
||||||
build/library.zsh.clean:
|
build/library.zsh.clean:
|
||||||
|
|
||||||
build/library.zsh.uninstall:
|
build/library.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/library.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/library.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/library.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/library.zsh'
|
||||||
|
|
||||||
build/man.zsh:
|
build/man.zsh:
|
||||||
|
|
||||||
build/man.zsh.install: build/man.zsh
|
build/man.zsh.install: build/man.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/man.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/man.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/man.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/man.zsh
|
$(Q)install -m0755 build/man.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/man.zsh
|
||||||
|
|
||||||
build/man.zsh.clean:
|
build/man.zsh.clean:
|
||||||
|
|
||||||
build/man.zsh.uninstall:
|
build/man.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/man.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/man.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/man.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/man.zsh'
|
||||||
|
|
||||||
build/moon.zsh:
|
build/moon.zsh:
|
||||||
|
|
||||||
build/moon.zsh.install: build/moon.zsh
|
build/moon.zsh.install: build/moon.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/moon.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/moon.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/moon.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/moon.zsh
|
$(Q)install -m0755 build/moon.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/moon.zsh
|
||||||
|
|
||||||
build/moon.zsh.clean:
|
build/moon.zsh.clean:
|
||||||
|
|
||||||
build/moon.zsh.uninstall:
|
build/moon.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/moon.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/moon.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/moon.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/moon.zsh'
|
||||||
|
|
||||||
build/ofile.zsh:
|
build/ofile.zsh:
|
||||||
|
|
||||||
build/ofile.zsh.install: build/ofile.zsh
|
build/ofile.zsh.install: build/ofile.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/ofile.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/ofile.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/ofile.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/ofile.zsh
|
$(Q)install -m0755 build/ofile.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/ofile.zsh
|
||||||
|
|
||||||
build/ofile.zsh.clean:
|
build/ofile.zsh.clean:
|
||||||
|
|
||||||
build/ofile.zsh.uninstall:
|
build/ofile.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/ofile.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/ofile.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/ofile.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/ofile.zsh'
|
||||||
|
|
||||||
|
build/scdocman.zsh:
|
||||||
|
|
||||||
|
build/scdocman.zsh.install: build/scdocman.zsh
|
||||||
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/scdocman.zsh[00m'
|
||||||
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
|
$(Q)install -m0755 build/scdocman.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/scdocman.zsh
|
||||||
|
|
||||||
|
build/scdocman.zsh.clean:
|
||||||
|
|
||||||
|
build/scdocman.zsh.uninstall:
|
||||||
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/scdocman.zsh[00m'
|
||||||
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/scdocman.zsh'
|
||||||
|
|
||||||
build/script.zsh:
|
build/script.zsh:
|
||||||
|
|
||||||
build/script.zsh.install: build/script.zsh
|
build/script.zsh.install: build/script.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/script.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/script.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/script.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/script.zsh
|
$(Q)install -m0755 build/script.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/script.zsh
|
||||||
|
|
||||||
build/script.zsh.clean:
|
build/script.zsh.clean:
|
||||||
|
|
||||||
build/script.zsh.uninstall:
|
build/script.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/script.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/script.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/script.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/script.zsh'
|
||||||
|
|
||||||
build/sharedlib.zsh:
|
build/sharedlib.zsh:
|
||||||
|
|
||||||
build/sharedlib.zsh.install: build/sharedlib.zsh
|
build/sharedlib.zsh.install: build/sharedlib.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/sharedlib.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/sharedlib.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/sharedlib.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/sharedlib.zsh
|
$(Q)install -m0755 build/sharedlib.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/sharedlib.zsh
|
||||||
|
|
||||||
build/sharedlib.zsh.clean:
|
build/sharedlib.zsh.clean:
|
||||||
|
|
||||||
build/sharedlib.zsh.uninstall:
|
build/sharedlib.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/sharedlib.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/sharedlib.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/sharedlib.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/sharedlib.zsh'
|
||||||
|
|
||||||
build/staticlib.zsh:
|
build/staticlib.zsh:
|
||||||
|
|
||||||
build/staticlib.zsh.install: build/staticlib.zsh
|
build/staticlib.zsh.install: build/staticlib.zsh
|
||||||
@echo ' IN > $(SHAREDIR)/build.zsh/staticlib.zsh'
|
@echo '[01;31m IN > [01;37m$(SHAREDIR)/build.zsh/staticlib.zsh[00m'
|
||||||
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
$(Q)mkdir -p '$(DESTDIR)$(SHAREDIR)/build.zsh'
|
||||||
$(Q)install -m0755 build/staticlib.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/staticlib.zsh
|
$(Q)install -m0755 build/staticlib.zsh $(DESTDIR)$(SHAREDIR)/build.zsh/staticlib.zsh
|
||||||
|
|
||||||
build/staticlib.zsh.clean:
|
build/staticlib.zsh.clean:
|
||||||
|
|
||||||
build/staticlib.zsh.uninstall:
|
build/staticlib.zsh.uninstall:
|
||||||
@echo ' RM > $(SHAREDIR)/build.zsh/staticlib.zsh'
|
@echo '[01;37m RM > [01;37m$(SHAREDIR)/build.zsh/staticlib.zsh[00m'
|
||||||
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/staticlib.zsh'
|
$(Q)rm -f '$(DESTDIR)$(SHAREDIR)/build.zsh/staticlib.zsh'
|
||||||
|
|
||||||
build:
|
build:
|
||||||
$(Q)mkdir -p build
|
$(Q)mkdir -p build
|
||||||
$(DESTDIR)$(PREFIX):
|
$(DESTDIR)$(PREFIX):
|
||||||
@echo ' DIR > $(PREFIX)'
|
@echo '[01;35m DIR > [01;37m$(PREFIX)[00m'
|
||||||
$(Q)mkdir -p $(DESTDIR)$(PREFIX)
|
$(Q)mkdir -p $(DESTDIR)$(PREFIX)
|
||||||
$(DESTDIR)$(BINDIR):
|
$(DESTDIR)$(BINDIR):
|
||||||
@echo ' DIR > $(BINDIR)'
|
@echo '[01;35m DIR > [01;37m$(BINDIR)[00m'
|
||||||
$(Q)mkdir -p $(DESTDIR)$(BINDIR)
|
$(Q)mkdir -p $(DESTDIR)$(BINDIR)
|
||||||
$(DESTDIR)$(LIBDIR):
|
$(DESTDIR)$(LIBDIR):
|
||||||
@echo ' DIR > $(LIBDIR)'
|
@echo '[01;35m DIR > [01;37m$(LIBDIR)[00m'
|
||||||
$(Q)mkdir -p $(DESTDIR)$(LIBDIR)
|
$(Q)mkdir -p $(DESTDIR)$(LIBDIR)
|
||||||
$(DESTDIR)$(SHAREDIR):
|
$(DESTDIR)$(SHAREDIR):
|
||||||
@echo ' DIR > $(SHAREDIR)'
|
@echo '[01;35m DIR > [01;37m$(SHAREDIR)[00m'
|
||||||
$(Q)mkdir -p $(DESTDIR)$(SHAREDIR)
|
$(Q)mkdir -p $(DESTDIR)$(SHAREDIR)
|
||||||
$(DESTDIR)$(INCLUDEDIR):
|
$(DESTDIR)$(INCLUDEDIR):
|
||||||
@echo ' DIR > $(INCLUDEDIR)'
|
@echo '[01;35m DIR > [01;37m$(INCLUDEDIR)[00m'
|
||||||
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
$(Q)mkdir -p $(DESTDIR)$(INCLUDEDIR)
|
||||||
$(DESTDIR)$(MANDIR):
|
$(DESTDIR)$(MANDIR):
|
||||||
@echo ' DIR > $(MANDIR)'
|
@echo '[01;35m DIR > [01;37m$(MANDIR)[00m'
|
||||||
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
|
$(Q)mkdir -p $(DESTDIR)$(MANDIR)
|
||||||
install: subdirs.install build.zsh.install build/binary.zsh.install build/crystal.zsh.install build/header.zsh.install build/library.zsh.install build/man.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/header.zsh.install build/library.zsh.install build/man.zsh.install build/moon.zsh.install build/ofile.zsh.install build/scdocman.zsh.install build/script.zsh.install build/sharedlib.zsh.install build/staticlib.zsh.install
|
||||||
@:
|
@:
|
||||||
|
|
||||||
subdirs.install:
|
subdirs.install:
|
||||||
|
|
||||||
uninstall: subdirs.uninstall build.zsh.uninstall build/binary.zsh.uninstall build/crystal.zsh.uninstall build/header.zsh.uninstall build/library.zsh.uninstall build/man.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/header.zsh.uninstall build/library.zsh.uninstall build/man.zsh.uninstall build/moon.zsh.uninstall build/ofile.zsh.uninstall build/scdocman.zsh.uninstall build/script.zsh.uninstall build/sharedlib.zsh.uninstall build/staticlib.zsh.uninstall
|
||||||
@:
|
@:
|
||||||
|
|
||||||
subdirs.uninstall:
|
subdirs.uninstall:
|
||||||
@ -203,7 +216,7 @@ test: all subdirs subdirs.test
|
|||||||
|
|
||||||
subdirs.test:
|
subdirs.test:
|
||||||
|
|
||||||
clean: build.zsh.clean build/binary.zsh.clean build/crystal.zsh.clean build/header.zsh.clean build/library.zsh.clean build/man.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/header.zsh.clean build/library.zsh.clean build/man.zsh.clean build/moon.zsh.clean build/ofile.zsh.clean build/scdocman.zsh.clean build/script.zsh.clean build/sharedlib.zsh.clean build/staticlib.zsh.clean
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
|
|
||||||
@ -216,7 +229,7 @@ distdir:
|
|||||||
|
|
||||||
dist-gz: $(PACKAGE)-$(VERSION).tar.gz
|
dist-gz: $(PACKAGE)-$(VERSION).tar.gz
|
||||||
$(PACKAGE)-$(VERSION).tar.gz: distdir
|
$(PACKAGE)-$(VERSION).tar.gz: distdir
|
||||||
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.gz'
|
@echo '[01;33m TAR > [01;37m$(PACKAGE)-$(VERSION).tar.gz[00m'
|
||||||
$(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \
|
$(Q)tar czf $(PACKAGE)-$(VERSION).tar.gz \
|
||||||
$(PACKAGE)-$(VERSION)/build/binary.zsh \
|
$(PACKAGE)-$(VERSION)/build/binary.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
|
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
|
||||||
@ -225,6 +238,7 @@ $(PACKAGE)-$(VERSION).tar.gz: distdir
|
|||||||
$(PACKAGE)-$(VERSION)/build/man.zsh \
|
$(PACKAGE)-$(VERSION)/build/man.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/moon.zsh \
|
$(PACKAGE)-$(VERSION)/build/moon.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/ofile.zsh \
|
$(PACKAGE)-$(VERSION)/build/ofile.zsh \
|
||||||
|
$(PACKAGE)-$(VERSION)/build/scdocman.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/script.zsh \
|
$(PACKAGE)-$(VERSION)/build/script.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/sharedlib.zsh \
|
$(PACKAGE)-$(VERSION)/build/sharedlib.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/staticlib.zsh \
|
$(PACKAGE)-$(VERSION)/build/staticlib.zsh \
|
||||||
@ -234,7 +248,7 @@ $(PACKAGE)-$(VERSION).tar.gz: distdir
|
|||||||
|
|
||||||
dist-xz: $(PACKAGE)-$(VERSION).tar.xz
|
dist-xz: $(PACKAGE)-$(VERSION).tar.xz
|
||||||
$(PACKAGE)-$(VERSION).tar.xz: distdir
|
$(PACKAGE)-$(VERSION).tar.xz: distdir
|
||||||
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.xz'
|
@echo '[01;33m TAR > [01;37m$(PACKAGE)-$(VERSION).tar.xz[00m'
|
||||||
$(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \
|
$(Q)tar cJf $(PACKAGE)-$(VERSION).tar.xz \
|
||||||
$(PACKAGE)-$(VERSION)/build/binary.zsh \
|
$(PACKAGE)-$(VERSION)/build/binary.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
|
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
|
||||||
@ -243,6 +257,7 @@ $(PACKAGE)-$(VERSION).tar.xz: distdir
|
|||||||
$(PACKAGE)-$(VERSION)/build/man.zsh \
|
$(PACKAGE)-$(VERSION)/build/man.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/moon.zsh \
|
$(PACKAGE)-$(VERSION)/build/moon.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/ofile.zsh \
|
$(PACKAGE)-$(VERSION)/build/ofile.zsh \
|
||||||
|
$(PACKAGE)-$(VERSION)/build/scdocman.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/script.zsh \
|
$(PACKAGE)-$(VERSION)/build/script.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/sharedlib.zsh \
|
$(PACKAGE)-$(VERSION)/build/sharedlib.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/staticlib.zsh \
|
$(PACKAGE)-$(VERSION)/build/staticlib.zsh \
|
||||||
@ -252,7 +267,7 @@ $(PACKAGE)-$(VERSION).tar.xz: distdir
|
|||||||
|
|
||||||
dist-bz2: $(PACKAGE)-$(VERSION).tar.bz2
|
dist-bz2: $(PACKAGE)-$(VERSION).tar.bz2
|
||||||
$(PACKAGE)-$(VERSION).tar.bz2: distdir
|
$(PACKAGE)-$(VERSION).tar.bz2: distdir
|
||||||
@echo ' TAR > $(PACKAGE)-$(VERSION).tar.bz2'
|
@echo '[01;33m TAR > [01;37m$(PACKAGE)-$(VERSION).tar.bz2[00m'
|
||||||
$(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \
|
$(Q)tar cjf $(PACKAGE)-$(VERSION).tar.bz2 \
|
||||||
$(PACKAGE)-$(VERSION)/build/binary.zsh \
|
$(PACKAGE)-$(VERSION)/build/binary.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
|
$(PACKAGE)-$(VERSION)/build/crystal.zsh \
|
||||||
@ -261,6 +276,7 @@ $(PACKAGE)-$(VERSION).tar.bz2: distdir
|
|||||||
$(PACKAGE)-$(VERSION)/build/man.zsh \
|
$(PACKAGE)-$(VERSION)/build/man.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/moon.zsh \
|
$(PACKAGE)-$(VERSION)/build/moon.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/ofile.zsh \
|
$(PACKAGE)-$(VERSION)/build/ofile.zsh \
|
||||||
|
$(PACKAGE)-$(VERSION)/build/scdocman.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/script.zsh \
|
$(PACKAGE)-$(VERSION)/build/script.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/sharedlib.zsh \
|
$(PACKAGE)-$(VERSION)/build/sharedlib.zsh \
|
||||||
$(PACKAGE)-$(VERSION)/build/staticlib.zsh \
|
$(PACKAGE)-$(VERSION)/build/staticlib.zsh \
|
||||||
@ -269,46 +285,47 @@ $(PACKAGE)-$(VERSION).tar.bz2: distdir
|
|||||||
$(PACKAGE)-$(VERSION)/Makefile
|
$(PACKAGE)-$(VERSION)/Makefile
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo ' :: build_zsh-0.2.2'
|
@echo '[01;37m :: build_zsh-0.3.0[00m'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'Generic targets:'
|
@echo '[01;37mGeneric targets:[00m'
|
||||||
@echo ' - help Prints this help message.'
|
@echo '[00m - [01;32mhelp [37m Prints this help message.[00m'
|
||||||
@echo ' - all Builds all targets.'
|
@echo '[00m - [01;32mall [37m Builds all targets.[00m'
|
||||||
@echo ' - dist Creates tarballs of the files of the project.'
|
@echo '[00m - [01;32mdist [37m Creates tarballs of the files of the project.[00m'
|
||||||
@echo ' - install Installs the project.'
|
@echo '[00m - [01;32minstall [37m Installs the project.[00m'
|
||||||
@echo ' - clean Removes compiled files.'
|
@echo '[00m - [01;32mclean [37m Removes compiled files.[00m'
|
||||||
@echo ' - uninstall Deinstalls the project.'
|
@echo '[00m - [01;32muninstall [37m Deinstalls the project.[00m'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'CLI-modifiable variables:'
|
@echo '[01;37mCLI-modifiable variables:[00m'
|
||||||
@echo ' - CC ${CC}'
|
@echo ' - [01;34mCC [37m ${CC}[00m'
|
||||||
@echo ' - CFLAGS ${CFLAGS}'
|
@echo ' - [01;34mCFLAGS [37m ${CFLAGS}[00m'
|
||||||
@echo ' - LDFLAGS ${LDFLAGS}'
|
@echo ' - [01;34mLDFLAGS [37m ${LDFLAGS}[00m'
|
||||||
@echo ' - DESTDIR ${DESTDIR}'
|
@echo ' - [01;34mDESTDIR [37m ${DESTDIR}[00m'
|
||||||
@echo ' - PREFIX ${PREFIX}'
|
@echo ' - [01;34mPREFIX [37m ${PREFIX}[00m'
|
||||||
@echo ' - BINDIR ${BINDIR}'
|
@echo ' - [01;34mBINDIR [37m ${BINDIR}[00m'
|
||||||
@echo ' - LIBDIR ${LIBDIR}'
|
@echo ' - [01;34mLIBDIR [37m ${LIBDIR}[00m'
|
||||||
@echo ' - SHAREDIR ${SHAREDIR}'
|
@echo ' - [01;34mSHAREDIR [37m ${SHAREDIR}[00m'
|
||||||
@echo ' - INCLUDEDIR ${INCLUDEDIR}'
|
@echo ' - [01;34mINCLUDEDIR [37m ${INCLUDEDIR}[00m'
|
||||||
@echo ' - MANDIR ${MANDIR}'
|
@echo ' - [01;34mMANDIR [37m ${MANDIR}[00m'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'Project targets: '
|
@echo '[01;37mProject targets: [00m'
|
||||||
@echo ' - build.zsh script'
|
@echo ' - [01;33mbuild.zsh [37m script[00m'
|
||||||
@echo ' - build/binary.zsh script'
|
@echo ' - [01;33mbuild/binary.zsh[37m script[00m'
|
||||||
@echo ' - build/crystal.zsh script'
|
@echo ' - [01;33mbuild/crystal.zsh[37m script[00m'
|
||||||
@echo ' - build/header.zsh script'
|
@echo ' - [01;33mbuild/header.zsh[37m script[00m'
|
||||||
@echo ' - build/library.zsh script'
|
@echo ' - [01;33mbuild/library.zsh[37m script[00m'
|
||||||
@echo ' - build/man.zsh script'
|
@echo ' - [01;33mbuild/man.zsh [37m script[00m'
|
||||||
@echo ' - build/moon.zsh script'
|
@echo ' - [01;33mbuild/moon.zsh[37m script[00m'
|
||||||
@echo ' - build/ofile.zsh script'
|
@echo ' - [01;33mbuild/ofile.zsh[37m script[00m'
|
||||||
@echo ' - build/script.zsh script'
|
@echo ' - [01;33mbuild/scdocman.zsh[37m script[00m'
|
||||||
@echo ' - build/sharedlib.zsh script'
|
@echo ' - [01;33mbuild/script.zsh[37m script[00m'
|
||||||
@echo ' - build/staticlib.zsh script'
|
@echo ' - [01;33mbuild/sharedlib.zsh[37m script[00m'
|
||||||
|
@echo ' - [01;33mbuild/staticlib.zsh[37m script[00m'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'Makefile options:'
|
@echo '[01;37mMakefile options:[00m'
|
||||||
@echo ' - gnu: false'
|
@echo ' - gnu: false'
|
||||||
@echo ' - colors: false'
|
@echo ' - colors: true'
|
||||||
@echo ''
|
@echo ''
|
||||||
@echo 'Rebuild the Makefile with:'
|
@echo '[01;37mRebuild the Makefile with:[00m'
|
||||||
@echo ' zsh ./build.zsh'
|
@echo ' zsh ./build.zsh -c'
|
||||||
.PHONY: all subdirs clean distclean dist install uninstall help
|
.PHONY: all subdirs clean distclean dist install uninstall help
|
||||||
|
|
||||||
|
81
build/scdocman.zsh
Normal file
81
build/scdocman.zsh
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
|
||||||
|
function scdocman.build {
|
||||||
|
typeset -l S
|
||||||
|
|
||||||
|
if [[ -n "${sources[$target]}" ]]; then
|
||||||
|
S="${sources[$target]}"
|
||||||
|
elif [[ -e "${target}.scd" ]]; then
|
||||||
|
S="${target}.scd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
write -n "${target}:"
|
||||||
|
|
||||||
|
if [[ -n "${S}" ]]; then
|
||||||
|
write " $S $(dirdep $target)"
|
||||||
|
write "\t@echo '$(SED "${target}" | sed 's|SED|MAN|')'"
|
||||||
|
write "\t${Q}scdoc < '$S' > '${target}'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
write "\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
function scdocman.install {
|
||||||
|
local basename="${filename[$target]}"
|
||||||
|
if [[ -z "$basename" ]]; then
|
||||||
|
basename="$(basename "${target}")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local section="${basename%.scd}"
|
||||||
|
section="${section##*.}"
|
||||||
|
local install="${install[$target]:-\$(MANDIR)/man${section}}"
|
||||||
|
|
||||||
|
write "${target}.install: ${target}"
|
||||||
|
write "\t@echo '$(IN "${install}/${basename}")'"
|
||||||
|
write "\t${Q}mkdir -p '\$(DESTDIR)${install}'"
|
||||||
|
write "\t${Q}install -m0644 ${target} \$(DESTDIR)${install}/${basename}"
|
||||||
|
write
|
||||||
|
}
|
||||||
|
|
||||||
|
function scdocman.uninstall {
|
||||||
|
local basename="${filename[$target]}"
|
||||||
|
if [[ -z "$basename" ]]; then
|
||||||
|
basename="$(basename "${target}")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
local section="${basename%.scd}"
|
||||||
|
section="${section##*.}"
|
||||||
|
local install="${install[$target]:-\$(MANDIR)/man${section}}"
|
||||||
|
|
||||||
|
write "${target}.uninstall:"
|
||||||
|
write "\t@echo '$(RM ${install}/${basename})'"
|
||||||
|
write "\t${Q}rm -f '\$(DESTDIR)${install}/${basename}'"
|
||||||
|
write
|
||||||
|
}
|
||||||
|
|
||||||
|
function scdocman.clean {
|
||||||
|
typeset -l S
|
||||||
|
|
||||||
|
if [[ -n "${sources[$target]}" ]]; then
|
||||||
|
S="${sources[$target]}"
|
||||||
|
else
|
||||||
|
S="${target}.scd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
write "${target}.clean:"
|
||||||
|
|
||||||
|
if [[ -e "${S%% *}" ]]; then
|
||||||
|
write "\t@echo '$(RM ${target})'"
|
||||||
|
write "\t${Q}rm -f ${target}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
write
|
||||||
|
}
|
||||||
|
|
||||||
|
function scdocman.distfiles {
|
||||||
|
if [[ -e "${target}.scd" ]]; then
|
||||||
|
echo "${target}.scd"
|
||||||
|
else
|
||||||
|
echo "${target}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user