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