# $Id: Maintenance.kmk 2019 2008-11-02 00:21:05Z bird $ ## @file # Maintenance Makefile for kBuild. # # # Copyright (c) 2008 knut st. osmundsen # # This file is part of kBuild. # # kBuild is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # kBuild is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with kBuild. If not, see # # DEPTH = . include $(PATH_KBUILD)/header.kmk RMTREE = $(ECHO) todo: $(RM) -Rf RMTREE = rm -Rf SVN = svn TAR = tar GZIP = gzip ifeq ($(strip $(KBUILD_SVN_INFO_KMK)),) $(error wtf? KBUILD_SVN_INFO_KMK is empty!) endif # # Creates the 'all' tarballs. # $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz: | $$(dir $$@) $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz $(RMTREE) $(PATH_TARGET)/all/ $(MKDIR) -p $(PATH_TARGET)/all/ $(SVN) export . $(PATH_TARGET)/all/kBuild-$(KBUILD_VERSION)/ $(INSTALL) $(KBUILD_SVN_INFO_KMK) \ $(PATH_TARGET)/all/kBuild-$(KBUILD_VERSION)/SvnInfo.kmk $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar \ -C $(PATH_TARGET)/all/ kBuild-$(KBUILD_VERSION)/ $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar $(RMTREE) $(PATH_TARGET)/all/kBuild-$(KBUILD_VERSION)/ OTHER_CLEAN += \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz: | $$(dir $$@) $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz $(RMTREE) $(PATH_TARGET)/night-all/ $(MKDIR) -p $(PATH_TARGET)/night-all/ $(SVN) export . $(PATH_TARGET)/night-all/kBuild-$(KBUILD_SVN_REV)/ $(INSTALL) $(KBUILD_SVN_INFO_KMK) \ $(PATH_TARGET)/night-all/kBuild-$(KBUILD_SVN_REV)/SvnInfo.kmk $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar \ -C $(PATH_TARGET)/night-all/ kBuild-$(KBUILD_SVN_REV)/ $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar $(RMTREE) $(PATH_TARGET)/night-all/kBuild-$(KBUILD_SVN_REV)/ OTHER_CLEAN += \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz # # Creates the source tarballs. # $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz: | $$(dir $$@) $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz $(RMTREE) $(PATH_TARGET)/src/ $(MKDIR) -p $(PATH_TARGET)/src/ $(SVN) export . $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/ $(RMTREE) $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/kBuild/bin $(INSTALL) $(KBUILD_SVN_INFO_KMK) \ $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/SvnInfo.kmk $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar \ -C $(PATH_TARGET)/src/ kBuild-$(KBUILD_VERSION)/ $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar $(RMTREE) $(PATH_TARGET)/src/kBuild-$(KBUILD_VERSION)/ OTHER_CLEAN += \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz: | $$(dir $$@) $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz $(RMTREE) $(PATH_TARGET)/night-src/ $(MKDIR) -p $(PATH_TARGET)/night-src/ $(SVN) export . $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/ $(RMTREE) $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/kBuild/bin $(INSTALL) $(KBUILD_SVN_INFO_KMK) \ $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/SvnInfo.kmk $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar \ -C $(PATH_TARGET)/night-src/ kBuild-$(KBUILD_SVN_REV)/ $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar $(RMTREE) $(PATH_TARGET)/night-src/kBuild-$(KBUILD_SVN_REV)/ OTHER_CLEAN += \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz # # Creates the binary tarballs. # $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz: | $$(dir $$@) $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz $(RMTREE) $(PATH_TARGET)/bin/ $(MKDIR) -p $(PATH_TARGET)/bin/kBuild-$(KBUILD_VERSION)/ $(SVN) export kBuild/ $(PATH_TARGET)/bin/kBuild-$(KBUILD_VERSION)/kBuild/ $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar \ -C $(PATH_TARGET)/bin/ kBuild-$(KBUILD_VERSION)/ $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar $(RMTREE) $(PATH_TARGET)/bin/kBuild-$(KBUILD_VERSION)/ OTHER_CLEAN += \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz: | $$(dir $$@) $(RM) -f $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz $(RMTREE) $(PATH_TARGET)/night-bin/ $(MKDIR) -p $(PATH_TARGET)/night-bin/kBuild-$(KBUILD_SVN_REV)/ $(SVN) export kBuild/ $(PATH_TARGET)/night-bin/kBuild-$(KBUILD_SVN_REV)/kBuild/ $(TAR) cvf $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar \ -C $(PATH_TARGET)/night-bin/ kBuild-$(KBUILD_SVN_REV)/ $(GZIP) -9 $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar $(RMTREE) $(PATH_TARGET)/night-bin/kBuild-$(KBUILD_SVN_REV)/ OTHER_CLEAN += \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz # # Aliases # tarballs: \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz release: \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION).tar.gz \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-src.tar.gz \ $(PATH_TARGET)/kBuild-$(KBUILD_VERSION)-all.tar.gz nightly: \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV).tar.gz \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-src.tar.gz \ $(PATH_TARGET)/kBuild-$(KBUILD_SVN_REV)-all.tar.gz .PHONY: tarballs release nightly include $(PATH_KBUILD)/footer.kmk