#! gmake # # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it would be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Further, this software is distributed without any warranty that it is # free of the rightful claim of any third person regarding infringement # or the like. Any license provided herein, whether implied or # otherwise, applies only to this software file. Patent licenses, if # any, provided herein do not apply to combinations of this program with # other software, or any other product whatsoever. # # You should have received a copy of the GNU General Public License # along with this program; if not, write the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. # # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, # Mountain View, CA 94043, or: # # http://www.sgi.com # # For further information regarding this notice, see: # # http://oss.sgi.com/projects/GenInfo/NoticeExplan # # Makefile for the full FailSafe packages # # The main targets at the top level are: # # TOPDIR = . include $(TOPDIR)/include/builddefs # # In order to package all source code for the ISM, each file # must be listed in one of the source macros listed in the commondefs # file (e.g CFILES, CXXFILES, etc.). For files not covered under the # source code macros use LSOURCES. Note that the Makefile is automatically # included in the source list and should not be added to LSOURCES. # LSOURCES = $(NULL) \ AUTHORS \ CHANGELOG \ COPYING \ INSTALL \ LSM \ NEWS \ README \ VERSION \ CONTRIBUTE \ TODO \ install-sh \ build/Makefile \ build/spec \ build/fsinstall \ include/Makefile \ include/builddefs \ include/buildrules \ $(NULL) # # List all subdirectories that need to be built (i.e. that have # a Makefile). Note that the 'build' subdirectory is not listed # since there is no Makefile in that directory. # SUBDIRS = $(NULL) \ include \ $(CASNAME) \ $(CINAME) \ $(FSNAME) \ build \ $(NULL) PWD := $(shell pwd) DIST_MANIFEST := $(PWD)/build/manifest DIST_ROOT := $(PWD)/build/$(PKG_NAME) DIST_PREP = build/.release_number srctar # # Typical target for building subdirectories # all: headers exports $(SUBDIRS_MAKERULE) headers exports $(COMMONTARGS): $(SUBDIRS_MAKERULE) # # Each Makefile must include $(BUILDRULES) anywhere # after the first target is defined. # include $(BUILDRULES) TARDIR = build/dist/SOURCES SRCTAR = $(TARDIR)/$(PKG_NAME).tar.gz tardir: - mkdir -p $(TARDIR) # stupid workaround for recursize make problem... srctar: tardir $(PKG_NAME) $(SUBDIRS) (ls -1 Makefile $(LSOURCES) | sed -n 's,^,'$(PKG_NAME)'/,p' ; \ $(MAKEF) -C $(CASNAME) source | sed -n 's,^\./,'$(PKG_NAME)'/'$(CASNAME)'/,p' ; \ $(MAKEF) -C $(CINAME) source | sed -n 's,^\./,'$(PKG_NAME)'/'$(CINAME)'/,p' ; \ $(MAKEF) -C $(FSNAME) source | sed -n 's,^\./,'$(PKG_NAME)'/'$(FSNAME)'/,p' ) \ | tar -czf $(SRCTAR) -T - $(PKG_NAME): - $(LN_S) . $(PKG_NAME) $(CASNAME): - $(LN_S) ../cas $(CASNAME) $(CINAME): - $(LN_S) ../CI $(CINAME) $(FSNAME): - $(LN_S) ../FailSafe $(FSNAME) build/.release_number: if [ ! -s build/.release_number ] ; then \ $(ECHO) 1 > build/.release_number ; \ fi dist rpm rpms: build/.release_number srctar $(DIST_MAKERULE) realclean: clean if test -n "${FS_REPOSITORY}" ; then rm -rf ${FS_REPOSITORY}/*; fi # rm -f $(PKG_NAME) $(CASNAME) $(CINAME) $(FSNAME)