Makefile revision 4921
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License (the "License").
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You may not use this file except in compliance with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_ARCHIVE_HASH= sha256:d310903048f3600f93422e5a8c39ddd682511e0849cd9abc5e943f9a10bdd49d
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_ARCHIVE_URL= http://prdownloads.sourceforge.net/hplip/$(COMPONENT_ARCHIVE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_PROJECT_URL= http://hplipopensource.com/hplip-web/index.html
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Enable ASLR for this component
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# We need to be able to return from void functions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCXX += $(studio_FEATURES_EXTENSIONS) $(studio_NORUNPATH) $(studio_CXXLIB_CSTD)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweROOTPPDCACHE = $(PROTO_DIR)/usr/lib/lp/caches/SUNWhpijs.cache
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# common configure options
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS += --localedir=$(CONFIGURE_LOCALEDIR)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS += am_cv_python_pythondir="$(PYTHON_VENDOR_PACKAGES)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS += am_cv_python_pyexecdir="$(PYTHON_VENDOR_PACKAGES)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# We build two variants: for the CUPS/SANE support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and for the HPIJS only support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# use these options for the CUPS/SANE support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/cups/model/SUNWhplip
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-libusb01_build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-fax-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpcups-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-new-hpcups
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-cups-drv-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# use these options for the HPIJS only support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-foomatic-ppd-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --with-hpppddir=/usr/share/ppd/SUNWhpijs/HP
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-cups-drv-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-hpcups-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --disable-doc-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-only-build
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPIJS_VARIANT)/.configured: CONFIGURE_OPTIONS += --enable-hpijs-install
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall: COMPONENT_INSTALL_ENV += halpredir=/etc/hal/fdi/preprobe/10osvendor
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Generate configuration scripts
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(HPLIP_VARIANT)/.built: COMPONENT_PREP_ACTION = \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe$(BUILD_DIR)/.allvariantsinstalled: $(VARIANTS:%=%/.installed)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe PPDSRC="$(PROTO_DIR)/usr/share/ppd/SUNWhpijs" \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe # set version of python interpreter to calm the pkglint
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe /usr/bin/sed -e '1,1s&^#!.*python[:blank:]\{0,\}$$&#!$(PYTHON.$(PYTHON_VERSION))&' \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe find $(PROTO_DIR) -name \*.py.pyverset -print0 | \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(MV) $$file `echo $$file | sed -e 's/[.]pyverset$$//'` ; \
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe $(PYTHON.$(PYTHON_VERSION)) -m compileall $(PROTO_DIR)/usr/share/hplip/
test: $(NO_TESTS)