Makefile.com revision 063ebb387a7ce28909c6b8471f2ef19c5b8f3719
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
.SUFFIXES:
include ../../../Makefile.cmd
CPPFLAGS += -DMMS_OPENSSL
C99MODE= $(C99_ENABLE)
# The mm database schema with database versions
# Generated mm database version header file
# Print last database version found in mms_db
i = 1; \
last = 0; \
while (i <= NR) { \
if (line[i] ~ /^[^\#]/) { \
rec = rec line[i] " " \
} \
if ((i+1 == NR || line[i+1] ~ /^[0-9]/) && length(rec)) { \
n = index(rec, " "); \
if (n == 0) { \
n = index(rec, "\t"); \
} \
n = n - 1; \
if (n < 2) { \
exit 1 \
} \
rev = substr(rec, 0, n); \
ver = substr(rev, 0, n - 1) + 0; \
mod = substr(rev, n, n); \
cmd = substr(rec, n + 1, length(rec)); \
if (mod ~ /u/) { \
last = ver; \
} \
rec = "" \
} \
i = i + 1 \
} \
if (last == 0) { \
exit 1 \
} \
print last \
}'
# Check mm database version header file
if ($$0 ~ /\#define\tMM_DB_VERSION/) { \
ver = $$3 \
}} END { \
if (length(ver) == 0 || ver < 1) { \
exit 1 \
}}'
$(POST_PROCESS)
%.o: ../common/%.c
$(COMPILE.c) $<
$(CTFCONVERT_O)
$(LINT.c) -c $<
$(ROOTLIBSCSI)/%: %
$(INS.file)
include ../../../Makefile.targ
# Generate mm database version header file from mms_db file
echo "#ifndef\t_MM_DB_VERSION_H" > $(DBVER)
echo "#define\t_MM_DB_VERSION_H" >> $(DBVER)
echo >> $(DBVER)
echo "/* Generated Database Version */" >> $(DBVER)
echo >> $(DBVER)
echo "#endif\t\t/* _MM_DB_VERSION_H */" >> $(DBVER)
# Validate mm database version
$(MMPATHS):
$(INS.dir)
$(MMTYPES):
$(INS.dir)
$(MMDB):
$(INS.dir)
$(SSLCONF):
$(INS.dir)
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(INS.file)
$(ETCPWD):
$(INS.dir)
$(VARHDL):
$(INS.dir)
$(LOGAPI):
$(INS.dir)
$(LOGWCR):
$(INS.dir)
$(SSLPUB):
$(INS.dir)
$(LOGDM):
$(INS.dir)
$(LOGLM):
$(INS.dir)
$(LOGMM):
$(INS.dir)
$(VARCORES):
$(INS.dir)