Makefile revision 1
96d3308828b430916b4629d503c4878fad28773dnd#
96d3308828b430916b4629d503c4878fad28773dnd# CDDL HEADER START
96d3308828b430916b4629d503c4878fad28773dnd#
96d3308828b430916b4629d503c4878fad28773dnd# The contents of this file are subject to the terms of the
96d3308828b430916b4629d503c4878fad28773dnd# Common Development and Distribution License (the "License").
96d3308828b430916b4629d503c4878fad28773dnd# You may not use this file except in compliance with the License.
96d3308828b430916b4629d503c4878fad28773dnd#
96d3308828b430916b4629d503c4878fad28773dnd# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96d3308828b430916b4629d503c4878fad28773dnd# or http://www.opensolaris.org/os/licensing.
96d3308828b430916b4629d503c4878fad28773dnd# See the License for the specific language governing permissions
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# and limitations under the License.
2e545ce2450a9953665f701bb05350f0d3f26275nd#
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# When distributing Covered Code, include this CDDL HEADER in each
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
96d3308828b430916b4629d503c4878fad28773dnd# If applicable, add the following below this CDDL HEADER, with the
4eb0f4031876c60c0ba2035666579dac07304b9drbowen# fields enclosed by brackets "[]" replaced with your own identifying
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen# information: Portions Copyright [yyyy] [name of copyright owner]
3f08db06526d6901aa08c110b5bc7dde6bc39905nd#
96d3308828b430916b4629d503c4878fad28773dnd# CDDL HEADER END
96d3308828b430916b4629d503c4878fad28773dnd#
96d3308828b430916b4629d503c4878fad28773dnd
3f08db06526d6901aa08c110b5bc7dde6bc39905nd#
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung#
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd#
4eb0f4031876c60c0ba2035666579dac07304b9drbowen# Note: Hidden command and dependency checking plays havoc with perl module
4eb0f4031876c60c0ba2035666579dac07304b9drbowen# makefiles, so we make sure to always unset the KEEP_STATE and
4eb0f4031876c60c0ba2035666579dac07304b9drbowen# SUNPRO_DEPENDENCIES environment variables before calling any subsidiary makes.
4eb0f4031876c60c0ba2035666579dac07304b9drbowen#
96d3308828b430916b4629d503c4878fad28773dnd
3b3b7fc78d1f5bfc2769903375050048ff41ff26nd.KEEP_STATE:
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung
727872d18412fc021f03969b8641810d8896820bhumbedoohinclude ../../Makefile.cmd
0d0ba3a410038e179b695446bb149cce6264e0abnd
727872d18412fc021f03969b8641810d8896820bhumbedooh# To turn KEEP_STATE off the following two environment variables must be unset.
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohKEEP_STATE_OFF = unset KEEP_STATE SUNPRO_DEPENDENCIES
0d0ba3a410038e179b695446bb149cce6264e0abnd
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh# Configuration files needed from the architecture-specific subdirectories.
727872d18412fc021f03969b8641810d8896820bhumbedoohMACH_CONFIG_FILES = config.sh
0d0ba3a410038e179b695446bb149cce6264e0abnd
0d0ba3a410038e179b695446bb149cce6264e0abnd# Where the configuration files need to be copied to.
0d0ba3a410038e179b695446bb149cce6264e0abndDISTRIB_CONFIG_FILES = $(MACH_CONFIG_FILES:%=distrib/%)
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh
0d0ba3a410038e179b695446bb149cce6264e0abnd# Generated Makefiles, derived from config.sh.
0d0ba3a410038e179b695446bb149cce6264e0abndGEN_MAKEFILES = Makefile.perlcfg distrib/ext/Makefile
0d0ba3a410038e179b695446bb149cce6264e0abnd
727872d18412fc021f03969b8641810d8896820bhumbedoohall := TARGET = all
0d0ba3a410038e179b695446bb149cce6264e0abndinstall := TARGET = install
0d0ba3a410038e179b695446bb149cce6264e0abndclobber := TARGET = clobber
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedoohclean := TARGET = clean
07dc96d063d49299da433f84b5c5681da9bbdf68rbowentest := TARGET = test
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen
0d0ba3a410038e179b695446bb149cce6264e0abnd# Compiler replacement rules
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndSED_CC = -e "s!'cc'!'$(CC) -_gcc=-w'!"
7fec19672a491661b2fe4b29f685bc7f4efa64d4ndSED_CC_E = -e "s!'cc -E'!'$(REAL_CC) -E'!"
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd
96d3308828b430916b4629d503c4878fad28773dnd# distrib holds the perl source, contrib holds the SMI modules.
all clean test: configure FRC
@ cd distrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
@ cd contrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
# ONLY for cleaning Parfait's .bc files from the 5.8.4 proto area
bc-clobber:
find $(ROOT)/usr/perl5/5.8.4 -name "*.bc" -exec rm -f {} \;
install-bits: all
@ cd distrib; pwd; $(KEEP_STATE_OFF); $(MAKE) install_files
# distrib/Makefile copies both distrib and contrib to the proto area.
install: install-bits bc-clobber
configure: $(DISTRIB_CONFIG_FILES) $(GEN_MAKEFILES) get_no_keywords
# Modify config.sh to refer to the compiler used for the build.
distrib/config.sh: $(MACH)/config.sh
$(SED) $(SED_CC) $(SED_CC_E) $(MACH)/config.sh > $@
Makefile.perlcfg: extract_config $(MACH)/config.sh
./extract_config $(MACH)/config.sh > Makefile.perlcfg
distrib/ext/Makefile: extract_makeext $(MACH)/config.sh
./extract_makeext $(MACH)/config.sh > distrib/ext/Makefile
.PARALLEL: extract_config extract_makeext distrib/config.sh Makefile.perlcfg \
distrib/ext/Makefile get_no_keywords
#
# Subsidiary makefiles include the generated Makefiles,
# so make sure they exist first and then delete them afterwards.
#
clobber: $(GEN_MAKEFILES) FRC
@ cd distrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
@ cd contrib; pwd; $(KEEP_STATE_OFF); $(MAKE) $(TARGET)
- $(RM) $(DISTRIB_CONFIG_FILES) $(GEN_MAKEFILES) \
extract_config extract_makeext get_no_keywords
FRC: