8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / print / Makefile
blobd8c55ef13ab3c34ecb991390324e41580bde2512
2 # CDDL HEADER START
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.
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.
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]
19 # CDDL HEADER END
22 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 # cmd/print/Makefile
29 include ../Makefile.cmd
31 JAVA_SUBDIRS = printmgr
33 PRINT_SUBDIRS = \
34 scripts \
35 lpget \
36 lpset \
37 conv_fix \
38 printer-info \
39 ppdmgr \
40 selector \
41 bsd-sysv-commands
43 SUBDIRS = $(PRINT_SUBDIRS) $(JAVA_SUBDIRS)
45 ROOTDIRS = $(ROOTLIB)/print
47 all := TARGET= all
48 install := TARGET= install
49 clean := TARGET= clean
50 clobber := TARGET= clobber
51 lint := TARGET= lint
52 strip := TARGET= strip
53 _msg := TARGET = _msg
55 # For testing message catalogs
56 _msg_test:= TARGET = _msg_test
58 POFILE= print.po
60 .KEEP_STATE:
62 all install: $(ROOTDIRS) $(SUBDIRS)
65 # We define our own definition for _msg here because most of these
66 # commands have the same PROG names as their counterparts in
67 # cmd/lp. Using the _msg rule defined in Makefile.cmd would
68 # result in clobbering the cmd/lp message files.
69 # To get around this we will define one message file "print.po"
70 # for these commands (except java printmgr). To build
71 # this file we find all of the .c files and run xgettext on them.
72 # Then concatenate this with the scripts.po file.
74 _msg: $(MSGDOMAIN) scripts $(JAVA_SUBDIRS)
75 @$(RM) $(POFILE)
76 $(XGETTEXT) -s `/bin/find . -type d -name SCCS -prune -o -type f -name '*.c' -print`
77 @/bin/cat messages.po scripts/scripts.po | sed '/domain/d' > $(POFILE)
78 @$(RM) messages.po
79 $(RM) $(MSGDOMAIN)/$(POFILE)
80 /bin/cp $(POFILE) $(MSGDOMAIN)
83 # Create a message file to test with.
85 _msg_test: scripts
86 @$(RM) $(POFILE)
87 $(XGETTEXT) -s -m "xxx" `/bin/find . -print | grep '\.c$$' | sed '/SCCS/d'`
88 @/bin/cat messages.po scripts/scripts.po | sed '/domain/d' > $(POFILE)
89 echo 'domain "SUNW_OST_OSCMD"' > SUNW_OST_OSCMD.po
90 cat $(POFILE) >> SUNW_OST_OSCMD.po
91 $(MSGFMT) SUNW_OST_OSCMD.po
92 @$(RM) messages.po $(POFILE) SUNW_OST_OSCMD.po
94 clean strip cstyle lint: $(SUBDIRS)
96 clobber: $(SUBDIRS)
97 $(RM) $(POFILE) $(CLOBBERFILES)
99 $(ROOTDIRS) $(MSGDOMAIN):
100 $(INS.dir)
102 $(SUBDIRS): FRC
103 @cd $@; pwd; $(MAKE) $(TARGET)
105 FRC: