Makefile revision 9622934a862fa39a8e90c816c4136e293d75629d
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER START
71cef386fae61275b03e203825680b39fedaa8c6Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# or http://www.opensolaris.org/os/licensing.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User#
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# fields enclosed by brackets "[]" replaced with your own identifying
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Use is subject to license terms.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# ident "%Z%%M% %I% %E% SMI"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# cmd/print/Makefile
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude ../Makefile.cmd
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinJAVA_SUBDIRS = printmgr
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserPRINT_SUBDIRS = \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User scripts \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt lpget \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt lpset \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User conv_fix \
0b89eee6167201843c9a46b7e7c63cb1e4e09ba3Tinderbox User printer-info \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt ppdmgr \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt selector \
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt bsd-sysv-commands
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User
a1ff871f78b7d907d6fc3a382beea2a640fe8423Tinderbox UserSUBDIRS = $(PRINT_SUBDIRS) $(JAVA_SUBDIRS)
3ca1a32241189d1e02e59f6b56399eb9b40f2aafTinderbox User
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntROOTDIRS = $(ROOTLIB)/print
d253648fe3331622cebea02d60aaecca3082d78dTinderbox User
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox Userall := TARGET= all
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntinstall := TARGET= install
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntclean := TARGET= clean
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntclobber := TARGET= clobber
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntlint := TARGET= lint
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Huntstrip := TARGET= strip
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt_msg := TARGET = _msg
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# For testing message catalogs
f9ce6280cec79deb16ff6d9807aa493ff23e10d9Tinderbox User_msg_test:= TARGET = _msg_test
0b89eee6167201843c9a46b7e7c63cb1e4e09ba3Tinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserPOFILE= print.po
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt.KEEP_STATE:
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userall install: $(ROOTDIRS) $(SUBDIRS)
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User#
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User# We define our own definition for _msg here because most of these
0da02c26a6631c25f075a8e4ac6de9e58f49a0c2Tinderbox User# commands have the same PROG names as their counterparts in
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# cmd/lp. Using the _msg rule defined in Makefile.cmd would
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# result in clobbering the cmd/lp message files.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# To get around this we will define one message file "print.po"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# for these commands (except java printmgr). To build
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# this file we find all of the .c files and run xgettext on them.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Then concatenate this with the scripts.po file.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt_msg: $(MSGDOMAIN) scripts $(JAVA_SUBDIRS)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User @$(RM) $(POFILE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt $(XGETTEXT) -s `/bin/find . -type d -name SCCS -prune -o -type f -name '*.c' -print`
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt @/bin/cat messages.po scripts/scripts.po | sed '/domain/d' > $(POFILE)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt @$(RM) messages.po
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt $(RM) $(MSGDOMAIN)/$(POFILE)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User /bin/cp $(POFILE) $(MSGDOMAIN)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User#
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Create a message file to test with.
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User#
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User_msg_test: scripts
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User @$(RM) $(POFILE)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User $(XGETTEXT) -s -m "xxx" `/bin/find . -print | grep '\.c$$' | sed '/SCCS/d'`
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User @/bin/cat messages.po scripts/scripts.po | sed '/domain/d' > $(POFILE)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User echo 'domain "SUNW_OST_OSCMD"' > SUNW_OST_OSCMD.po
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User cat $(POFILE) >> SUNW_OST_OSCMD.po
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User msgfmt SUNW_OST_OSCMD.po
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User @$(RM) messages.po $(POFILE) SUNW_OST_OSCMD.po
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox Userclean strip cstyle lint: $(SUBDIRS)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox Userclobber: $(SUBDIRS)
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User $(RM) $(POFILE) $(CLOBBERFILES)
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User
363b21045b718d06d414784c96193dc9a233e8c5Tinderbox User$(ROOTDIRS) $(MSGDOMAIN):
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User $(INS.dir)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User$(SUBDIRS): FRC
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User @cd $@; pwd; $(MAKE) $(TARGET)
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox UserFRC:
33c9436ef1a43d3c0fc3d9be9b4b0509daa83223Tinderbox User