File: [Development] / failsafe / FailSafe / include / buildrules (download)
Revision 1.2, Wed May 30 00:11:24 2001 UTC (16 years, 4 months ago) by scotth
Branch: MAIN
CVS Tags: HEAD Changes since 1.1: +1 -1
lines
Malloc() is only spec-ed to return a nul-ed buffer the first time that the
rebion is used. A previous bug-fix caused this function to start re-using
free()ed areas. Also, the worst-case buffer size is actually filesize+1.
Also piggy-backs a couple of build fixes... bugzilla 79 (cdbd SEGVs when
creating a new database).
|
#!/bin/sh
#
# 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
# Common build rules for gmake
#
ifndef _BUILDRULES_INCLUDED_
_BUILDRULES_INCLUDED_ = 1
include $(TOPDIR)/include/builddefs
#
# Standard targets
#
ifdef CMDTARGET
$(CMDTARGET) : $(SUBDIRS) $(OBJECTS)
$(CCF) -o $(CMDTARGET) $(LDFLAGS) $(OBJECTS) $(LDLIBS)
endif
ifdef DSO_TARGET
$(DSO_TARGET) : $(SUBDIRS) $(OBJECTS)
$(CC) $(LDFLAGS) -shared -Wl,-soname,$(DSO_TARGET) -o $(DSO_TARGET) \
$(OBJECTS) $(LDLIBS) $(LIB_FOR_BASENAME)
endif
ifdef STATICLIBTARGET
$(STATICLIBTARGET) : $(SUBDIRS) $(OBJECTS)
$(AR) crf $(STATICLIBTARGET) $?
endif
# Suffix rule to support transition for YFILES to OBJECTS
%.tab.h : %.y
$(YACC) -d -b `basename $< .y` $<
%.tab.c : %.y
$(YACC) -d -b `basename $< .y` $<
#
# Rule for C++ files
#
%.o: %.cxx
$(CXX) $(CXXFLAGS) -c $<
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $<
%.o: %.c++
$(CXX) $(CXXFLAGS) -c $<
clean clobber : $(SUBDIRS)
rm -rf $(DIRT)
$(SUBDIRS_MAKERULE)
# Rules for post-processing README, help and other files with pathnames in
# them
%.post: %
sed -e "s;/var/template/pmdas;$(TEMPLATE_PMDAS_DIR);g" \
-e "s;/var/adm/templatelog;$(TEMPLATE_LOG_DIR)/pmcd;g" \
-e "s;/etc/pmcd.conf;$(TEMPLATE_VAR_DIR)/config/pmcd/pmcd.conf;g" \
-e "s;/etc/init.d/template;$(TEMPLATE_RD_DIR)/template;g" $< > $@
#
# Never blow away subdirs
#
ifdef SUBDIRS
.PRECIOUS: $(SUBDIRS)
$(SUBDIRS):
$(SUBDIRS_MAKERULE)
endif
source :
$(SOURCE_MAKERULE)
endif
$(_FORCE):
# The depend target does not depend on any other targets (even though it
# actually depends on CFILES and HFILES). This is because there are several
# places where we generate header files (e.g. domain.h is generated for each
# subdir below src/pmdas, and domain.h in turn depends on src/pmns/stdpmid,
# which itself a generated file ...). As a result, you can't run make
# depend after make clobber, because the generated files will be missing.
#
# So running makedepend is for development use when you change a header
# somewhere and you need to be sure everything that depends on that header
# will be remade properly.
.PHONY : depend
depend :
$(SUBDIRS_MAKERULE)
touch dep
$(MAKEDEPEND) -fdep -- $(CFLAGS) -- $(CFILES)
#
# Create a release number for the ISM.
#
releasenumber:
@ relnum=`$(MKRELNUMF) $(ISM_START_DATE)`; \
echo "$$relnum" > $(_RELNUM_FILE); \
echo "Release $$relnum"
#
# Target to generate the RPM control file.
#
rpmrc:
mkdir -p $(PKG_ROOT)
echo "topdir: $(shell pwd)/$(PKG_ROOT)" > $(_RPMRC_FILE)
echo "buildroot: $(shell pwd)/$(PKG_BUILD_ROOT)" >> $(_RPMRC_FILE)
#
# include dep, but only if it exists
ifeq ($(shell test -f dep && echo dep), dep)
include dep
endif