usr/src/cmd/screen/Makefile.sfw
author Jon Tibble <meths@btinternet.com>
Mon, 04 May 2015 14:04:39 +0100
branchoi_151a
changeset 254 9c2a4ac793f0
parent 0 b34509ac961f
permissions -rw-r--r--
Bash patch catchup including shellshock
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     1
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     2
# CDDL HEADER START
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     3
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     7
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    11
# and limitations under the License.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    12
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    18
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    19
# CDDL HEADER END
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    20
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    21
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    22
# Use is subject to license terms.
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    23
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    24
#ident	"@(#)Makefile.sfw	1.2	08/09/26 SMI"
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    25
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    26
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    27
VER=screen-4.0.3
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    28
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    29
include ../Makefile.cmd
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    30
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    31
# Using some defaults from Makefile.master...
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    32
#
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    33
XSTRCONST = -xstrconst
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    34
ERROFF = -erroff
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    35
CFLAGS += $(XSTRCONST)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    36
CFLAGS += $(ERROFF)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    37
CONFIGURE_OPTIONS += --enable-colors256
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    38
CONFIGURE_OPTIONS += --with-sys-screenrc=/etc/screenrc
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    39
CONFIGURE_OPTIONS += --disable-socket-dir
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    40
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    41
all: $(VER)/config.status $(VER)/terminfo/s/screen
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    42
	 (cd $(VER); env -\
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    43
	    CC=$(CC) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    44
	    "CFLAGS=$(CFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    45
	    LD_OPTIONS="-M $(SRC)/cmd/mapfile_noexstk" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    46
	    PATH=$(SFW_PATH) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    47
	    MAKE=$(CCSMAKE) $(CCSMAKE))
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    48
	@find . -name core -exec rm -f {} \;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    49
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    50
install: all
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    51
	$(SHELL) ./install-sfw
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    52
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    53
$(VER)/config.status: $(VER)/configure
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    54
	(cd $(VER); env -\
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    55
	    CC=$(CC) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    56
	    PATH=$(SFW_PATH) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    57
	    MAKE=$(CCSMAKE) \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    58
	    "CFLAGS=$(CFLAGS)" \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    59
	./configure $(CONFIGURE_OPTIONS))
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    60
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    61
$(VER)/configure: $(VER).tar.gz
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    62
	$(GTAR) zxpf $(VER).tar.gz --no-same-owner
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    63
	(cd $(VER); gpatch -p1 < ../patches/misc.c.patch)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    64
	touch $(VER)/configure
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    65
	find $(VER) -type d -exec /usr/bin/chmod 755 "{}" \;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    66
	find $(VER) -type f -exec /usr/bin/chmod ugo+r "{}" \;
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    67
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    68
$(VER)/terminfo/s/screen: $(VER)/configure
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    69
	( cd $(VER)/terminfo; env -\
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    70
		TERMINFO=$(SRC)/cmd/screen/$(VER)/terminfo \
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    71
		/usr/bin/tic screeninfo.src )
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    72
clean:
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    73
	-rm -rf $(VER)
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    74
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    75
include ../Makefile.targ
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    76
b34509ac961f Import sfw repo b126
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    77
FRC: