Makefile revision 100
4506N/A#
4506N/A# CDDL HEADER START
4506N/A#
4506N/A# The contents of this file are subject to the terms of the
4506N/A# Common Development and Distribution License (the "License").
4506N/A# You may not use this file except in compliance with the License.
4506N/A#
4506N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4506N/A# or http://www.opensolaris.org/os/licensing.
4506N/A# See the License for the specific language governing permissions
4506N/A# and limitations under the License.
4506N/A#
4506N/A# When distributing Covered Code, include this CDDL HEADER in each
4506N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4506N/A# If applicable, add the following below this CDDL HEADER, with the
4506N/A# fields enclosed by brackets "[]" replaced with your own identifying
4506N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4506N/A#
4506N/A# CDDL HEADER END
4506N/A#
4506N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
4506N/A#
4506N/Ainclude ../../make-rules/shared-macros.mk
4506N/A
4506N/ACOMPONENT_NAME= coreutils
4506N/ACOMPONENT_VERSION= 8.5
4506N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4506N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
4506N/ACOMPONENT_ARCHIVE_HASH= sha1:939144f16d05691753a87134436dd2bb8ea89851
4506N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/coreutils/$(COMPONENT_ARCHIVE)
4506N/A
4506N/Ainclude ../../make-rules/prep.mk
4506N/Ainclude ../../make-rules/configure.mk
4506N/Ainclude ../../make-rules/ips.mk
4506N/A
4506N/ACONFIGURE_PREFIX = /usr/gnu
4506N/ACONFIGURE_OPTIONS += --libdir=/usr/lib
4506N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
4506N/ACONFIGURE_OPTIONS += CPPFLAGS=-I/usr/include/gmp
4506N/ACONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
4506N/A
4506N/Ainclude ../../make-rules/shared-targets.mk
4506N/A
4506N/A# common targets
4506N/Abuild: $(BUILD_32)
4506N/A
4506N/ACMDS_NONCONFLICTING=\[ base64 dir dircolors md5sum nproc pinky \
4506N/Aprintenv ptx readlink seq sha1sum sha224sum sha256sum sha384sum sha512sum \
4506N/Ashred shuf stat stdbuf tac timeout truncate users vdir whoami
4506N/A
4506N/AMANS_NONCONFLICTING=base64.1 dir.1 dircolors.1 md5sum.1 nproc.1 pinky.1 \
4506N/Aprintenv.1 ptx.1 readlink.1 seq.1 sha1sum.1 sha224sum.1 sha256sum.1 \
4506N/Asha384sum.1 sha512sum.1 shred.1 shuf.1 stat.1 stdbuf.1 tac.1 \
4506N/Atimeout.1 truncate.1 users.1 vdir.1 whoami.1
4506N/A
4506N/ANEEDMV=if [ -e $(1) ]; then $(RM) $(2); /usr/bin/mv $(1) $(2); fi
4506N/ARMDIR=/usr/bin/rmdir
install: $(PROTOUSRBINDIR) $(PROTOUSRSHAREMAN1DIR) $(INSTALL_32)
for command in $(CMDS_NONCONFLICTING); do \
$(call NEEDMV,$(PROTOGNUBIN)/$$command,\
$(PROTOUSRBINDIR)/$$command) \
done
for manpage in $(COMPONENT_SRC)/man/*.1; do \
sed -f oracleman-stability $$manpage > \
$(PROTO_DIR)/$(GNUSHAREMAN1)/`basename $$manpage`; \
done
for manpage in $(MANS_NONCONFLICTING); do \
$(call NEEDMV,$(PROTOGNUSHAREMAN1)/$$manpage,\
$(PROTOUSRSHAREMAN1DIR)/$$manpage); \
done
#
# whoami is in both /usr/bin and /usr/gnu/bin; mistake?
#
$(CP) $(PROTOUSRBINDIR)/whoami $(PROTOGNUBIN)/whoami
$(CP) $(PROTOUSRSHAREMAN1DIR)/whoami.1 $(PROTOGNUSHAREMAN1)/whoami.1
$(call NEEDMV,$(PROTOGNUBIN)/install,$(PROTOUSRBINDIR)/ginstall)
$(call NEEDMV,$(PROTOGNUSHAREMAN1)/install.1,\
$(PROTOUSRSHAREMAN1DIR)/ginstall.1)
$(call NEEDMV,$(PROTOUSRLIBDIR)/coreutils/libstdbuf.so,\
$(PROTOUSRLIBDIR)/libstdbuf.so)
-$(RMDIR) $(PROTOUSRLIBDIR)/coreutils
$(RM) $(PROTOGNUBIN)/chcon
$(RM) $(PROTOGNUBIN)/runcon
$(RM) $(PROTOGNUSHAREMAN1)/chcon.1
$(RM) $(PROTOGNUSHAREMAN1)/runcon.1
$(RM) $(PROTOUSRLIBDIR)/charset.alias
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
test: build
@cd $(BUILD_DIR_32); $(MAKE) check
include ../../make-rules/depend.mk