Home | History | Annotate | Download | only in gtar
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 
     22 #
     23 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #ident	"@(#)Makefile.sfw	1.13	09/05/05 SMI"
     27 #
     28 
     29 include ../Makefile.cmd
     30 
     31 VER =		$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
     32 TARBALL =	$(VER).tar.bz2
     33 
     34 #       configure(1) options to use
     35 # a default --prefix and --mandir are set in Makefile.master
     36 CONFIGURE_OPTIONS +=	--with-rmt=/usr/sbin/rmt
     37 CONFIGURE_OPTIONS +=	--libexecdir=/usr/sbin
     38 CONFIGURE_OPTIONS +=	--program-prefix=g
     39 
     40 SFW_PATH="$(SPRO_VROOT)/bin:/usr/perl5/bin:$(PATH)"
     41 
     42 TARGET_ENV +=   CC="$(CC)"
     43 TARGET_ENV +=   PATH="$(SFW_PATH)"
     44 TARGET_ENV +=   CFLAGS="$(CFLAGS)"
     45 TARGET_ENV +=   LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk"
     46 TARGET_ENV +=   MAKE="$(CCSMAKE)"
     47 TARGET_ENV +=	INSTALL="$(INSTALL_PROTO)"
     48 
     49 all:=		TARGET = all
     50 install:=	TARGET = install
     51 install:=	TARGET_ENV += DESTDIR=$(ROOT)
     52 install:=	TARGET_ENV += localedir="$(CFGLOCALE)"
     53 
     54 all: $(VER)/config.status
     55 	(cd $(VER); env - $(CCSMAKE) $(TARGET) $(TARGET_ENV))
     56 
     57 install: install-protofix
     58 
     59 install-target: $(VER)/config.status
     60 	(cd $(VER); env - $(CCSMAKE) $(TARGET) $(TARGET_ENV))
     61 	MANSCRIPT=sunman-stability $(INSTALL_PROTO) gtar.1.sunman $(ROOTMAN1)/gtar.1
     62 	$(RM) $(ROOTGNUBIN)/tar $(ROOTSFWBIN)/gtar $(ROOTGNUMAN1)/tar.1
     63 	(cd $(ROOTGNUBIN) ; $(SYMLINK) ../../bin/gtar tar)
     64 	(cd $(ROOTSFWBIN) ; $(SYMLINK) ../../bin/gtar gtar)
     65 	(cd $(ROOTGNUMAN1); $(SYMLINK) ../../../../share/man/man1/gtar.1 tar.1)
     66 	# charset.alias is delivered by JDS (SUNWgnome-base-libs)
     67 	$(RM) $(ROOTLIB)/charset.alias
     68 
     69 install-protofix: install-target
     70 	for pkg in $(COMPONENT_PACKAGES:sh) ; do \
     71 		$(SRC)/tools/protofix --pkg $$pkg --perm ; \
     72 	done
     73 	
     74 $(VER)/config.status: $(VER)/.patched
     75 	(cd $(VER) ; env - ./configure $(CONFIGURE_OPTIONS) $(TARGET_ENV))
     76 
     77 clean:
     78 	-rm -rf $(VER)
     79 
     80 include ../Makefile.targ
     81 
     82 FRC:
     83