8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / print / scripts / Makefile
blob7dfa94546ecffd0944698659105dff6c72d2d3d0
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 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
26 include ../Makefile.sp
28 ROOTPRINTLIB = $(ROOTLIB)/print
29 ROOTLIBLPBIN = $(ROOTLIBLP)/bin
30 ROOTVARLP = $(ROOTVAR)/lp
31 ROOTVARLPPPD = $(ROOTVARLP)/ppd
33 $(ROOTVARLP) := DIRMODE=0775
35 FILEMODE = 0755
37 MSGFILES = lpadmin ppdmgr
38 POFILE = scripts.po
40 PROG = conv_lp conv_lpd Makefile.yp
41 ROOTLIBPRINTPROG= $(PROG:%=$(ROOTPRINTLIB)/%)
42 $(ROOTLIBPRINTPROG) := FILEMODE=0555
43 $(ROOTPRINTLIB)/Makefile.yp := FILEMODE=0444
45 USRSBINPROG= lpsystem ppdmgr
46 ROOTUSRSBINPROG= $(USRSBINPROG:%=$(ROOTUSRSBIN)/%)
47 $(ROOTUSRSBINPROG) := FILEMODE=555
49 PCONF= printers.conf
50 ROOTPCONF= $(PCONF:%=$(ROOTETC)/%)
51 $(ROOTPCONF) := FILEMODE=644
53 MANUFALIASES= manufaliases
54 ROOTMANUFALIASES= $(MANUFALIASES:%=$(ROOTVARLPPPD)/%)
55 $(ROOTMANUFALIASES) := FILEMODE=444
57 LIBLPPROGS= getmakes getmodels getppdfile getppds ppdfilename2mmp \
58 lpadmin \
59 desktop-print-management \
60 desktop-print-management-applet \
61 desktop-print-management-prefs
63 ROOTLIBLPPROGS= $(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%)
64 $(ROOTLIBLPPROGS) := FILEMODE=555
66 LIBLINKS= $(ROOTLIB)/lpadmin $(ROOTLIB)/lpsystem
68 APPFILES = desktop-print-management.desktop
69 APPFILES += desktop-print-management-prefs.desktop
70 AUTOFILES = desktop-print-management-applet.desktop
72 ROOTAPPDIR = $(ROOT)/usr/share/applications
73 ROOTAUTODIR = $(ROOT)/usr/share/gnome/autostart
74 ROOTAPPFILES = $(APPFILES:%=$(ROOTAPPDIR)/%)
75 ROOTAUTOFILES = $(AUTOFILES:%=$(ROOTAUTODIR)/%)
77 $(ROOTAPPFILES) := FILEMODE = 444
78 $(ROOTAUTOFILES) := FILEMODE = 444
81 .KEEP_STATE:
83 all : $(PROG)
85 $(ROOTLIB)/print/%: %
86 $(INS.file)
88 $(ROOTLIBLPBIN)/%: %
89 $(INS.file)
91 $(ROOTVARLPPPD)/%: %
92 $(INS.file)
94 $(ROOTAPPDIR)/%: %
95 $(INS.file)
97 $(ROOTAUTODIR)/%: %
98 $(INS.file)
100 $(ROOTUSRSBIN) $(ROOTVARSPOOLPRINT) $(ROOTVARLP) $(ROOTVARLPPPD):
101 $(INS.dir)
103 $(ROOTLIB)/lpadmin:
104 $(RM) $@; $(SYMLINK) ../sbin/lpadmin $@
106 $(ROOTLIB)/lpsystem:
107 $(RM) $@; $(SYMLINK) ../sbin/lpsystem $@
109 $(ROOTLNKPROGS) : $(ROOTSTARTPROG)
110 $(RM) $@; $(LN) $(ROOTSTARTPROG) $@
112 _msg: $(POFILE)
114 $(POFILE): $(MSGFILES)
115 grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/" > $(POFILE).i
116 $(XGETTEXT) -s $(POFILE).i
117 $(RM) $@ $(POFILE).i
118 mv messages.po $(POFILE)
121 # Create a message file to test with
123 _msg_test:
124 grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/" > $(POFILE).i
125 $(XGETTEXT) -s -m "xxx" $(POFILE).i
126 $(RM) $@ $(POFILE).i
127 mv messages.po $(POFILE)
129 install: $(ROOTLNKPROGS) \
130 $(ROOTLIBPRINTPROG) $(ROOTSTARTPROG) \
131 $(ROOTUSRSBIN) $(ROOTUSRSBINPROG) \
132 $(ROOTVARSPOOLPRINT) $(ROOTPCONF) \
133 $(ROOTLIBLPPROGS) $(LIBLINKS) \
134 $(ROOTVARLP) $(ROOTVARLPPPD) \
135 $(ROOTMANUFALIASES) \
136 $(ROOTAPPFILES) $(ROOTAUTOFILES)
138 $(SYMLINKS1):
139 $(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG1) $@
141 $(SYMLINKS2):
142 $(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG2) $@
144 clean:
145 $(RM) $(POFILE)
147 clobber: clean
149 strip lint: