usr/src/cmd/mutt/Makefile.sfw
changeset 0 b34509ac961f
child 1 37d545eabfea
equal deleted inserted replaced
-1:000000000000 0:b34509ac961f
       
     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 
       
    27 #ident	"@(#)Makefile.sfw	1.6	09/02/19 SMI"
       
    28 
       
    29 include ../Makefile.cmd
       
    30 
       
    31 #
       
    32 # Macros
       
    33 #
       
    34 
       
    35 VER = $(COMPONENT_VERSION:sh)
       
    36 PROJECT = $(COMPONENT_NAME:sh)
       
    37 PROD = $(PROJECT)-$(VER)
       
    38 PKG = SUNW$(PROJECT)
       
    39 GZFILE = $(PROD).tar.gz
       
    40 DOCDIR=$(CFGDOC)/$(PROJECT)
       
    41 
       
    42 CFLAGS += -I$(ROOT)/usr/include/idn -I/usr/include/idn
       
    43 
       
    44 LDFLAGS += \
       
    45     -L$(ROOT)/usr/lib \
       
    46     -M $(SRC)/cmd/mapfile_noexstk \
       
    47     -z ignore
       
    48 
       
    49 POST_PROCESS_BIN = $(SRC)/tools/post_process \
       
    50 	$(ROOTBIN)/mutt \
       
    51 	$(ROOTBIN)/pgpewrap \
       
    52 	$(ROOTBIN)/pgpring
       
    53 
       
    54 MANFILES_STUBBED = \
       
    55 	$(ROOTMAN1)/pgpewrap.1 \
       
    56 	$(ROOTMAN1)/pgpring.1 \
       
    57 	$(ROOTMAN1)/smime_keys.1
       
    58 
       
    59 # Command to create stubbed man pages
       
    60 STUB_MAN = \
       
    61 	for f in $(MANFILES_STUBBED); \
       
    62 	do \
       
    63 	    command="`$(ECHO) "$$f" | $(SED) 's@.*/@@; s@\\..*@@'`"; \
       
    64 	    section="`$(ECHO) "$$f" | $(SED) 's@.*\\.@@'`"; \
       
    65 	    $(SH) ./stubman.sh "$$command" "$$section" $(DOCDIR) > "$$f"; \
       
    66 	done; echo
       
    67 
       
    68 POST_PROCESS_MAN = $(SRC)/tools/sunman -n "$(PROJECT)" -p "$(PKG)" \
       
    69 	-s Uncommitted	$(ROOTMAN1)/flea.1 \
       
    70 	-s Uncommitted	$(ROOTMAN1)/mutt.1 \
       
    71 	-s Uncommitted	$(ROOTMAN1)/muttbug.1 \
       
    72 	-s Volatile	$(ROOTMAN1)/pgpewrap.1 \
       
    73 	-s Volatile	$(ROOTMAN1)/pgpring.1 \
       
    74 	-s Volatile	$(ROOTMAN1)/smime_keys.1 \
       
    75 	-s Committed	$(ROOTMAN5)/mbox.5 \
       
    76 	-s Committed	$(ROOTMAN5)/mmdf.5 \
       
    77 	-s Volatile	$(ROOTMAN5)/muttrc.5
       
    78 
       
    79 # Options for configure script
       
    80 CONFIGURE_OPTIONS += --sysconfdir=$(CFGETC)/mutt
       
    81 CONFIGURE_OPTIONS += --enable-pop
       
    82 CONFIGURE_OPTIONS += --enable-imap
       
    83 CONFIGURE_OPTIONS += --enable-smtp
       
    84 CONFIGURE_OPTIONS += --with-regex
       
    85 CONFIGURE_OPTIONS += --with-slang=$(ROOT)/usr
       
    86 CONFIGURE_OPTIONS += --with-ssl
       
    87 
       
    88 #
       
    89 # Targets
       
    90 #
       
    91 
       
    92 all: $(PROD)/config.status
       
    93 	(cd $(PROD); env - $(CCSMAKE) MAKE=$(CCSMAKE))
       
    94 
       
    95 install: all stubman.sh
       
    96 	(cd $(PROD); env - $(CCSMAKE) install \
       
    97 	    MAKE=$(CCSMAKE) \
       
    98 	    DESTDIR="$(ROOT)")
       
    99 	$(RM) $(ROOT)/etc/mutt/*.dist
       
   100 	$(STUB_MAN)
       
   101 	$(POST_PROCESS_BIN)
       
   102 	$(POST_PROCESS_MAN)
       
   103 
       
   104 $(PROD)/configure: $(GZFILE)
       
   105 	/usr/bin/gzcat $^ | $(TAR) xopf -
       
   106 	$(TOUCH) $@
       
   107 
       
   108 $(PROD)/config.status: $(PROD)/configure
       
   109 	(cd $(PROD); env - ./configure \
       
   110 	    $(CONFIGURE_OPTIONS) \
       
   111 	    CC="$(CC)" \
       
   112 	    CFLAGS="$(CFLAGS)" \
       
   113 	    LDFLAGS="$(LDFLAGS)" \
       
   114 	    INSTALL="$(INSTALL_PROTO) -m 755 " \
       
   115 	    MAKE=$(CCSMAKE))
       
   116 
       
   117 clean:
       
   118 	-rm -rf $(PROD)
       
   119 
       
   120 install_h:
       
   121 
       
   122 include ../Makefile.targ