xref: /titanic_44/usr/src/cmd/print/scripts/Makefile (revision 18c2aff776a775d34a4c9893a4c72e0434d68e36)
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# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25#ident	"%Z%%M%	%I%	%E% SMI"
26#
27# cmd/lp/etc/Makefile
28#
29
30include			../Makefile.sp
31
32ROOTPRINTLIB = 		$(ROOTLIB)/print
33ROOTLIBLPBIN =		$(ROOTLIBLP)/bin
34
35$(ROOTVARSPOOLPRINT)	:= OWNER=root
36
37OWNER =			root
38GROUP =			lp
39FILEMODE =		0755
40
41MSGFILES =              lpadmin
42POFILE =                scripts.po
43
44PROG =			conv_lp conv_lpd Makefile.yp
45ROOTLIBPRINTPROG=	$(PROG:%=$(ROOTPRINTLIB)/%)
46$(ROOTLIBPRINTPROG)	:= FILEMODE=0555
47$(ROOTPRINTLIB)/Makefile.yp		:= FILEMODE=0444
48
49USRSBINPROG=		lpsystem lpadmin
50ROOTUSRSBINPROG=	$(USRSBINPROG:%=$(ROOTUSRSBIN)/%)
51$(ROOTUSRSBINPROG)		:= FILEMODE=555
52
53PCONF=	 		printers.conf
54ROOTPCONF=		$(PCONF:%=$(ROOTETC)/%)
55$(ROOTPCONF)		:= OWNER=root
56$(ROOTPCONF)		:= GROUP=sys
57$(ROOTPCONF)		:= FILEMODE=644
58
59PPDPROGS=	 	getmakes getmodels getppdfile getppds ppdfilename2mmp
60ROOTPPDPROGS=		$(PPDPROGS:%=$(ROOTLIBLPBIN)/%)
61$(ROOTPPDPROGS)		:= OWNER=root
62$(ROOTPPDPROGS)		:= GROUP=lp
63$(ROOTPPDPROGS)		:= FILEMODE=555
64
65LIBLINKS=		$(ROOTLIB)/lpadmin $(ROOTLIB)/lpsystem
66
67
68.KEEP_STATE:
69
70all :			$(PROG)
71
72$(ROOTLIB)/print/% $(ROOTINIT_D)/%:	%
73	$(INS.file)
74
75$(ROOTLIBLPBIN)/%: %
76	$(INS.file)
77
78$(ROOTINIT_D) $(ROOTUSRSBIN) $(ROOTVARSPOOLPRINT):
79	$(INS.dir)
80
81$(ROOTLIB)/lpadmin:
82	$(RM) $@; $(SYMLINK) ../sbin/lpadmin $@
83
84$(ROOTLIB)/lpsystem:
85	$(RM) $@; $(SYMLINK) ../sbin/lpsystem $@
86
87$(ROOTLNKPROGS) :	$(ROOTSTARTPROG)
88			$(RM) $@; $(LN) $(ROOTSTARTPROG) $@
89
90_msg:   $(POFILE)
91
92$(POFILE): $(MSGFILES)
93	grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/"  > $(POFILE).i
94	$(XGETTEXT) -s $(POFILE).i
95	$(RM) $@ $(POFILE).i
96	mv messages.po $(POFILE)
97
98#
99# Create a message file to test with
100#
101_msg_test:
102	grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/"  > $(POFILE).i
103	$(XGETTEXT) -s -m "xxx" $(POFILE).i
104	$(RM) $@ $(POFILE).i
105	mv messages.po $(POFILE)
106
107install:		$(ROOTINIT_D) $(ROOTLNKPROGS) \
108			$(ROOTLIBPRINTPROG) $(ROOTSTARTPROG) \
109			$(ROOTUSRSBIN) $(ROOTUSRSBINPROG) \
110			$(ROOTVARSPOOLPRINT) $(ROOTPCONF) \
111			$(ROOTPPDPROGS) $(LIBLINKS)
112
113$(SYMLINKS1):
114	$(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG1) $@
115
116$(SYMLINKS2):
117	$(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG2) $@
118
119clean:
120	$(RM) $(POFILE)
121
122clobber: clean
123
124strip lint:
125