From dec91697167c1b2ed5a3aa747fc2258675d294ce Mon Sep 17 00:00:00 2001 From: Thomas Lundström Date: Mon, 20 Jun 2016 14:21:00 +0200 Subject: Deleted the misplaced doc folder --- doc/init.mk | 98 ------------------------------------------------------------- 1 file changed, 98 deletions(-) delete mode 100644 doc/init.mk (limited to 'doc/init.mk') diff --git a/doc/init.mk b/doc/init.mk deleted file mode 100644 index 252409c..0000000 --- a/doc/init.mk +++ /dev/null @@ -1,98 +0,0 @@ -# Makefile including this should first set nondefault BRANCH_DOCENEACOMMON before including it -# and should have targets init: s_docbuild and optional initcommon: s_doceneacommon -# Typically let doc: depend on init and initcommon inside Makefile -# Manually optionally set GLOBALTMPCLONEROOT to yes or to a parent dir for tmpcommon -# This init.mk file ver R1.00/2016-04-29 - -ifeq ($(VERBOSE),yes) -VERB := -else -VERB := @ -endif - -#Git repositories to be cloned -REPO_DOCBUILD := build/docbuild.git -NAME_DOCBUILD := docbuild -REPO_DOCENEACOMMON := linux/documentation.git -NAME_DOCENEACOMMON := doceneacommon - -# Set nondefault BRANCH_DOCENEACOMMON in Makefile -BRANCH_DOCENEACOMMON ?= master-enea -# Separate clones of documentation.git with different branches, needed if cloned globally with risk that different distros can be at same place -ifneq ($(BRANCH_DOCENEACOMMON),master-enea) -NAME_DOCENEACOMMON := doceneacommon_$(BRANCH_DOCENEACOMMON) -endif - -GLOBALTMPCLONEROOT = ../../tmpcommon -ifeq ($(BOOK_GLOBALCLONEROOT),) - TMPCLONEROOT := tmpcommon -else - ifeq ($(BOOK_GLOBALCLONEROOT),yes) - TMPCLONEROOT := $(GLOBALTMPCLONEROOT) - else - TMPCLONEROOT := $(BOOK_GLOBALCLONEROOT)/tmpcommon - endif -endif -DIR_TMPCLONEROOT := $(dir $(TMPCLONEROOT)) -ifeq ($(wildcard $(DIR_TMPCLONEROOT)),) -$(error Parent of selected clone root does not exist ($(DIR_TMPCLONEROOT))) -endif - -.PHONY: initbuild initcommon usageinit cleaninit -# Keep usageinit as default target here to avoid init by mistake - -usageinit: docusage - @echo 'make initbuild Create s_docbuild and if not exists, clone docbuild.git' - @echo 'make initcommon Create s_doceneacommon and if not exists, clone documentation.git' - @echo ' Default clone in tmpcommon' - @echo ' BOOK_GLOBALCLONEROOT=yes Clone in $(GLOBALTMPCLONEROOT)' - @echo ' BOOK_GLOBALCLONEROOT=parentdir Clone in parentdir/tmpcommon' - @echo ' Default branch for documentation.git is master-enea' - @echo ' BRANCH_DOCENEACOMMON=... If another branch, Makefile should set this' - @echo 'make pullbuild git pull in s_docbuild' - @echo 'make pullcommon git pull in s_doceneacommon' - @echo 'make cleaninit Delete all s_* symlinks and local tmpcommon/' - - -# MOVE these to Makefile and set also non-default BRANCH_DOCENEACOMMON in Makefile -initbuild: s_docbuild -initcommon: s_doceneacommon -pullbuild: - $(VERB)if [ ! -d s_docbuild ]; then echo "ERROR: No s_docbuild exists?" ; exit 10 ; fi - $(VERB)cd s_docbuild ; git pull -pullcommon: - $(VERB)if [ ! -d s_doceneacommon ]; then echo "ERROR: No s_doceneacommon exists?" ; exit 10 ; fi - $(VERB)cd s_doceneacommon ; git pull - -s_docbuild: $(TMPCLONEROOT)/$(NAME_DOCBUILD) - $(VERB)rm s_docbuild 2>/dev/null; ln -s $(TMPCLONEROOT)/$(NAME_DOCBUILD) s_docbuild - -s_doceneacommon: $(TMPCLONEROOT)/$(NAME_DOCENEACOMMON) - $(VERB)rm s_doceneacommon 2>/dev/null; ln -s $(TMPCLONEROOT)/$(NAME_DOCENEACOMMON) s_doceneacommon - -$(TMPCLONEROOT)/$(NAME_DOCBUILD): - $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi - $(VERB)if [ -d "$(TMPCLONEROOT)/$(NAME_DOCBUILD)" ] ; then \ - echo "Already exists $(TMPCLONEROOT)/$(NAME_DOCBUILD)" ; \ - echo "Doing git pull instead"; cd $(TMPCLONEROOT)/$(NAME_DOCBUILD) ; git pull ; \ - else \ - echo "Cloning $(REPO_DOCBUILD) in $(TMPCLONEROOT)" ; \ - cd "$(TMPCLONEROOT)" ; \ - git clone -b master-enea git@git.enea.se:$(REPO_DOCBUILD) $(NAME_DOCBUILD) ; \ - fi - -$(TMPCLONEROOT)/$(NAME_DOCENEACOMMON): - $(VERB)if [ ! -d "$(TMPCLONEROOT)" ] ; then mkdir -p "$(TMPCLONEROOT)" ; fi - $(VERB)if [ -d "$(TMPCLONEROOT)/$(NAME_DOCENEACOMMON)" ] ; then \ - echo "Already exists $(TMPCLONEROOT)/$(NAME_DOCENEACOMMON)" ; \ - echo "Doing git pull instead"; cd $(TMPCLONEROOT)/$(NAME_DOCENEACOMMON) ; git pull ; \ - else \ - echo "Cloning $(REPO_DOCENEACOMMON) in $(TMPCLONEROOT) as $(NAME_DOCENEACOMMON)" ; \ - cd "$(TMPCLONEROOT)"; \ - git clone -b $(BRANCH_DOCENEACOMMON) git@git.enea.se:$(REPO_DOCENEACOMMON) $(NAME_DOCENEACOMMON) ; \ - fi - -cleaninit: - @echo "Clean only local tmpcommon/ and all local temporary symlinks s_docbuild s_targets etc." - $(VERB)rm -rf tmpcommon 2>/dev/null ; true - $(VERB)rm s_* 2>/dev/null ; true -- cgit v1.2.3-54-g00ecf