edgebsd
PACKAGE = edgebsd-update
VERSION = 9
VENDOR = EdgeBSD
SUBDIRS = doc src tests tools
TARGETS = tests
RM = rm -f
LN = ln -f
TAR = tar
TGZEXT = .tar.gz
MKDIR = mkdir -m 0755 -p
INSTALL = install
all: subdirs
subdirs:
@for i in $(SUBDIRS); do (cd "$$i" && \
if [ -n "$(OBJDIR)" ]; then \
([ -d "$(OBJDIR)$$i" ] || $(MKDIR) -- "$(OBJDIR)$$i") && \
$(MAKE) OBJDIR="$(OBJDIR)$$i/"; \
else $(MAKE); fi) || exit; done
tests: all
cd tests && (if [ -n "$(OBJDIR)" ]; then $(MAKE) OBJDIR="$(OBJDIR)tests/" "$(OBJDIR)tests/fixme.log" "$(OBJDIR)tests/shlint.log" "$(OBJDIR)tests/tests.log"; else $(MAKE) fixme.log shlint.log tests.log; fi)
clean:
@for i in $(SUBDIRS); do (cd "$$i" && \
if [ -n "$(OBJDIR)" ]; then \
$(MAKE) OBJDIR="$(OBJDIR)$$i/" clean; \
else $(MAKE) clean; fi) || exit; done
distclean:
@for i in $(SUBDIRS); do (cd "$$i" && \
if [ -n "$(OBJDIR)" ]; then \
$(MAKE) OBJDIR="$(OBJDIR)$$i/" distclean; \
else $(MAKE) distclean; fi) || exit; done
dist:
$(RM) -r -- $(OBJDIR)$(PACKAGE)-$(VERSION)
$(LN) -s -- "$$PWD" $(OBJDIR)$(PACKAGE)-$(VERSION)
@cd $(OBJDIR). && $(TAR) -czvf $(PACKAGE)-$(VERSION)$(TGZEXT) -- \
$(PACKAGE)-$(VERSION)/doc/Makefile \
$(PACKAGE)-$(VERSION)/doc/docbook.sh \
$(PACKAGE)-$(VERSION)/doc/edgebsd-update.css.xml \
$(PACKAGE)-$(VERSION)/doc/edgebsd-update.xml \
$(PACKAGE)-$(VERSION)/doc/manual.css.xml \
$(PACKAGE)-$(VERSION)/doc/project.conf \
$(PACKAGE)-$(VERSION)/src/Makefile \
$(PACKAGE)-$(VERSION)/src/edgebsd-update.in \
$(PACKAGE)-$(VERSION)/src/project.conf \
$(PACKAGE)-$(VERSION)/tests/Makefile \
$(PACKAGE)-$(VERSION)/tests/destdir/boot \
$(PACKAGE)-$(VERSION)/tests/destdir/etc/mtree/set.base \
$(PACKAGE)-$(VERSION)/tests/destdir/prekern \
$(PACKAGE)-$(VERSION)/tests/destdir/usr/mdec/boot \
$(PACKAGE)-$(VERSION)/tests/destdir/usr/mdec/prekern \
$(PACKAGE)-$(VERSION)/tests/fixme.sh \
$(PACKAGE)-$(VERSION)/tests/shlint.sh \
$(PACKAGE)-$(VERSION)/tests/tests.sh \
$(PACKAGE)-$(VERSION)/tests/project.conf \
$(PACKAGE)-$(VERSION)/tools/Makefile \
$(PACKAGE)-$(VERSION)/tools/subst.sh \
$(PACKAGE)-$(VERSION)/tools/project.conf \
$(PACKAGE)-$(VERSION)/Makefile \
$(PACKAGE)-$(VERSION)/README.md \
$(PACKAGE)-$(VERSION)/config.sh \
$(PACKAGE)-$(VERSION)/project.conf
$(RM) -- $(OBJDIR)$(PACKAGE)-$(VERSION)
distcheck: dist
$(TAR) -xzvf $(OBJDIR)$(PACKAGE)-$(VERSION)$(TGZEXT)
$(MKDIR) -- $(PACKAGE)-$(VERSION)/objdir
$(MKDIR) -- $(PACKAGE)-$(VERSION)/destdir
cd "$(PACKAGE)-$(VERSION)" && $(MAKE) OBJDIR="$$PWD/objdir/"
cd "$(PACKAGE)-$(VERSION)" && $(MAKE) OBJDIR="$$PWD/objdir/" DESTDIR="$$PWD/destdir" install
cd "$(PACKAGE)-$(VERSION)" && $(MAKE) OBJDIR="$$PWD/objdir/" DESTDIR="$$PWD/destdir" uninstall
cd "$(PACKAGE)-$(VERSION)" && $(MAKE) OBJDIR="$$PWD/objdir/" distclean
cd "$(PACKAGE)-$(VERSION)" && $(MAKE) dist
$(RM) -r -- $(PACKAGE)-$(VERSION)
install: all
@for i in $(SUBDIRS); do (cd "$$i" && \
if [ -n "$(OBJDIR)" ]; then \
$(MAKE) OBJDIR="$(OBJDIR)$$i/" install; \
else $(MAKE) install; fi) || exit; done
uninstall:
@for i in $(SUBDIRS); do (cd "$$i" && \
if [ -n "$(OBJDIR)" ]; then \
$(MAKE) OBJDIR="$(OBJDIR)$$i/" uninstall; \
else $(MAKE) uninstall; fi) || exit; done
.PHONY: all subdirs clean distclean dist distcheck install uninstall tests