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