Print this page
6574 Package print/lp/ipp/ipp-listener disappears when ENABLE_IPP_PRINTING is undefined

Split Close
Expand all
Collapse all
          --- old/usr/src/pkg/Makefile
          +++ new/usr/src/pkg/Makefile
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15  # If applicable, add the following below this CDDL HEADER, with the
  16   16  # fields enclosed by brackets "[]" replaced with your own identifying
  17   17  # information: Portions Copyright [yyyy] [name of copyright owner]
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  
  22   22  #
  23   23  # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
  24   24  # Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
       25 +# Copyright 2016 Gary Mills
  25   26  #
  26   27  
  27   28  include $(SRC)/Makefile.master
  28   29  include $(SRC)/Makefile.buildnum
  29   30  
  30   31  #
  31   32  # Make sure we're getting a consistent execution environment for the
  32   33  # embedded scripts.
  33   34  #
  34   35  SHELL= /usr/bin/ksh93
↓ open down ↓ 168 lines elided ↑ open up ↑
 203  204  $(PDIR)/osnet-incorporation.mog:= PKGDEP_TYPE= incorporate
 204  205  
 205  206  PKGDEP_INCORP= \
 206  207          depend fmri=consolidation/osnet/osnet-incorporation type=require
 207  208  
 208  209  #
 209  210  # All packaging build products should go into $(PDIR), so they don't
 210  211  # need to be included separately in CLOBBERFILES.
 211  212  #
 212  213  CLOBBERFILES= $(PDIR) proto_list_$(PKGMACH) install-$(PKGMACH).out \
 213      -        license-list
      214 +        $(DYN_MANI) license-list
 214  215  
 215  216  #
 216  217  # By default, PKGS will list all manifests.  To build and/or publish a
 217  218  # subset of packages, override this on the command line or in the
 218  219  # build environment and then reference (implicitly or explicitly) the all
 219  220  # or install targets.  Using ls -1 (that's a one) or print or echo to
 220  221  # get the list of manifests is a little hackish, but avoids having a
 221  222  # 900+ line file to explicitly list them all.
 222  223  #
 223      -# We want some manifests to optionally built based on environment
 224      -# options, so those are excluded and optionally added back in.
 225      -# We also want a relatively easy way to add files to the list of
 226      -# manifests given special treatment.  Add any other special ones
 227      -# to the SPECIAL_MANIFESTS vaiable.  It can contain wildcards in
 228      -# regexp form, i.e. SUNW.* as one useful example.
      224 +
 229  225  #
 230      -SPECIAL_MANIFESTS = print-lp-ipp-ipp-listener.mf
      226 +# Special manifests are symbolic links to real manifests with
      227 +# either *.mf.obs or *.mf.cur names, depending on the value of
      228 +# the ENABLE_IPP_PRINTING macro.  They are excluded from the
      229 +# MANIFESTS macro because they may not exist when it is set,
      230 +# but are added unconditionally on the next line.
      231 +#
      232 +
      233 +SPECIAL_MANIFESTS = SUNWippl.mf print-lp-ipp-ipp-listener.mf
      234 +DYN_MANI = $(SPECIAL_MANIFESTS:%=manifests/%)
 231  235  LIST_MANIFESTS_CMD = (cd manifests ; /usr/bin/ls -1 *.mf |\
 232  236          $(SED) $(SPECIAL_MANIFESTS:%=-e '/^%$$/d') )
 233  237  MANIFESTS = $(LIST_MANIFESTS_CMD:sh)
      238 +MANIFESTS += $(SPECIAL_MANIFESTS)
 234  239  
 235      -# Conditionally add back lp-ipp
 236      -$(ENABLE_IPP_PRINTING) MANIFESTS += print-lp-ipp-ipp-listener.mf
 237      -
 238  240  PKGS= $(MANIFESTS:%.mf=%)
 239  241  DEP_PKGS= $(PKGS:%=$(PDIR)/%.dep)
 240  242  PROC_PKGS= $(PKGS:%=$(PDIR)/%.mog)
 241  243  
 242  244  #
 243  245  # Track the synthetic manifests separately so we can properly express
 244  246  # build rules and dependencies.  The synthetic and real packages use
 245  247  # different sets of transforms and macros for pkgmogrify.
 246  248  #
 247  249  SYNTH_PKGS= osnet-incorporation osnet-redist
↓ open down ↓ 110 lines elided ↑ open up ↑
 358  360  #                |                      |
 359  361  # pkgsend        |                      | pkgdepend resolve
 360  362  # create-repository                     |
 361  363  #                |              generated dependencies
 362  364  #        repo directories               |
 363  365  #                                       | pkgdepend
 364  366  #                                       |
 365  367  #                               processed manifests
 366  368  # 
 367  369  
 368      -ALL_TARGETS= $(PROC_SYNTH_PKGS) proto_list_$(PKGMACH)
      370 +ALL_TARGETS= $(DYN_MANI) $(PROC_SYNTH_PKGS) proto_list_$(PKGMACH)
 369  371  
 370  372  all: $(ALL_TARGETS)
 371  373  
 372  374  #
      375 +# Rule to create symlinks to *.mf.obs or *.mf.cur for special manifests
      376 +# Also removes the previous special manifest
      377 +#
      378 +DYN_TYP = obs
      379 +$(ENABLE_IPP_PRINTING) DYN_TYP = cur
      380 +$(DYN_MANI): $$(@).$(DYN_TYP)
      381 +        $(RM) $(@)
      382 +        $(SYMLINK) $(@F).$(DYN_TYP) $(@)
      383 +
      384 +#
 373  385  # This will build the directory to contain the processed manifests
 374  386  # and the metadata symlinks.
 375  387  #
 376  388  $(PDIR):
 377  389          @print "Creating $(@)"
 378  390          $(PKGDEBUG)$(INS.dir)
 379  391  
 380  392  #
 381  393  # This rule resolves dependencies across all published manifests.
 382  394  #
↓ open down ↓ 357 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX