xref: /onnv-gate/usr/src/cmd/print/scripts/Makefile (revision 10207:87c40ea3fc4b)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
52264Sjacobs# Common Development and Distribution License (the "License").
62264Sjacobs# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*10207SJames.McPherson@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate
260Sstevel@tonic-gateinclude			../Makefile.sp
270Sstevel@tonic-gate
280Sstevel@tonic-gateROOTPRINTLIB = 		$(ROOTLIB)/print
290Sstevel@tonic-gateROOTLIBLPBIN =		$(ROOTLIBLP)/bin
303781SceasthaROOTVARLP =		$(ROOTVAR)/lp
313781SceasthaROOTVARLPPPD =		$(ROOTVARLP)/ppd
320Sstevel@tonic-gate
333781Sceastha$(ROOTVARLP)		:= DIRMODE=0775
340Sstevel@tonic-gate
350Sstevel@tonic-gateFILEMODE =		0755
360Sstevel@tonic-gate
373781SceasthaMSGFILES =              lpadmin ppdmgr
380Sstevel@tonic-gatePOFILE =                scripts.po
390Sstevel@tonic-gate
400Sstevel@tonic-gatePROG =			conv_lp conv_lpd Makefile.yp
410Sstevel@tonic-gateROOTLIBPRINTPROG=	$(PROG:%=$(ROOTPRINTLIB)/%)
420Sstevel@tonic-gate$(ROOTLIBPRINTPROG)	:= FILEMODE=0555
430Sstevel@tonic-gate$(ROOTPRINTLIB)/Makefile.yp		:= FILEMODE=0444
440Sstevel@tonic-gate
456237SjacobsUSRSBINPROG=		lpsystem ppdmgr
460Sstevel@tonic-gateROOTUSRSBINPROG=	$(USRSBINPROG:%=$(ROOTUSRSBIN)/%)
470Sstevel@tonic-gate$(ROOTUSRSBINPROG)		:= FILEMODE=555
480Sstevel@tonic-gate
490Sstevel@tonic-gatePCONF=	 		printers.conf
500Sstevel@tonic-gateROOTPCONF=		$(PCONF:%=$(ROOTETC)/%)
510Sstevel@tonic-gate$(ROOTPCONF)		:= FILEMODE=644
520Sstevel@tonic-gate
533781SceasthaMANUFALIASES= 		manufaliases
543781SceasthaROOTMANUFALIASES=	$(MANUFALIASES:%=$(ROOTVARLPPPD)/%)
553781Sceastha$(ROOTMANUFALIASES)	:= FILEMODE=444
563781Sceastha
576237SjacobsLIBLPPROGS=	 	getmakes getmodels getppdfile getppds ppdfilename2mmp \
587454SNorm.Jacobs@Sun.COM			lpadmin \
597454SNorm.Jacobs@Sun.COM			desktop-print-management \
607454SNorm.Jacobs@Sun.COM			desktop-print-management-applet \
617454SNorm.Jacobs@Sun.COM			desktop-print-management-prefs
627454SNorm.Jacobs@Sun.COM
636237SjacobsROOTLIBLPPROGS=		$(LIBLPPROGS:%=$(ROOTLIBLPBIN)/%)
646237Sjacobs$(ROOTLIBLPPROGS)		:= FILEMODE=555
650Sstevel@tonic-gate
660Sstevel@tonic-gateLIBLINKS=		$(ROOTLIB)/lpadmin $(ROOTLIB)/lpsystem
670Sstevel@tonic-gate
687454SNorm.Jacobs@Sun.COMAPPFILES =	desktop-print-management.desktop
697454SNorm.Jacobs@Sun.COMAPPFILES +=	desktop-print-management-prefs.desktop
707454SNorm.Jacobs@Sun.COMAUTOFILES =	desktop-print-management-applet.desktop
717454SNorm.Jacobs@Sun.COM
727454SNorm.Jacobs@Sun.COMROOTAPPDIR =		$(ROOT)/usr/share/applications
737454SNorm.Jacobs@Sun.COMROOTAUTODIR =		$(ROOT)/usr/share/gnome/autostart
747454SNorm.Jacobs@Sun.COMROOTAPPFILES =		$(APPFILES:%=$(ROOTAPPDIR)/%)
757454SNorm.Jacobs@Sun.COMROOTAUTOFILES =		$(AUTOFILES:%=$(ROOTAUTODIR)/%)
767454SNorm.Jacobs@Sun.COM
777454SNorm.Jacobs@Sun.COM$(ROOTAPPFILES)		:= FILEMODE = 444
787454SNorm.Jacobs@Sun.COM$(ROOTAUTOFILES)	:= FILEMODE = 444
797454SNorm.Jacobs@Sun.COM
800Sstevel@tonic-gate
810Sstevel@tonic-gate.KEEP_STATE:
820Sstevel@tonic-gate
830Sstevel@tonic-gateall :			$(PROG)
840Sstevel@tonic-gate
853781Sceastha$(ROOTLIB)/print/%:	%
860Sstevel@tonic-gate	$(INS.file)
870Sstevel@tonic-gate
880Sstevel@tonic-gate$(ROOTLIBLPBIN)/%: %
890Sstevel@tonic-gate	$(INS.file)
900Sstevel@tonic-gate
913781Sceastha$(ROOTVARLPPPD)/%: %
923781Sceastha	$(INS.file)
933781Sceastha
947454SNorm.Jacobs@Sun.COM$(ROOTAPPDIR)/%:	%
957454SNorm.Jacobs@Sun.COM	$(INS.file)
967454SNorm.Jacobs@Sun.COM
977454SNorm.Jacobs@Sun.COM$(ROOTAUTODIR)/%:	%
987454SNorm.Jacobs@Sun.COM	$(INS.file)
997454SNorm.Jacobs@Sun.COM
1003781Sceastha$(ROOTUSRSBIN) $(ROOTVARSPOOLPRINT) $(ROOTVARLP) $(ROOTVARLPPPD):
1010Sstevel@tonic-gate	$(INS.dir)
1020Sstevel@tonic-gate
1030Sstevel@tonic-gate$(ROOTLIB)/lpadmin:
1040Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../sbin/lpadmin $@
1050Sstevel@tonic-gate
1060Sstevel@tonic-gate$(ROOTLIB)/lpsystem:
1070Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../sbin/lpsystem $@
1080Sstevel@tonic-gate
1090Sstevel@tonic-gate$(ROOTLNKPROGS) :	$(ROOTSTARTPROG)
1100Sstevel@tonic-gate			$(RM) $@; $(LN) $(ROOTSTARTPROG) $@
1110Sstevel@tonic-gate
1120Sstevel@tonic-gate_msg:   $(POFILE)
1130Sstevel@tonic-gate
1140Sstevel@tonic-gate$(POFILE): $(MSGFILES)
1150Sstevel@tonic-gate	grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/"  > $(POFILE).i
1160Sstevel@tonic-gate	$(XGETTEXT) -s $(POFILE).i
1170Sstevel@tonic-gate	$(RM) $@ $(POFILE).i
1180Sstevel@tonic-gate	mv messages.po $(POFILE)
1190Sstevel@tonic-gate
1200Sstevel@tonic-gate#
1210Sstevel@tonic-gate# Create a message file to test with
1220Sstevel@tonic-gate#
1230Sstevel@tonic-gate_msg_test:
1240Sstevel@tonic-gate	grep gettext $(MSGFILES) | tr '`' ' ' | sed -e "s/gettext \"/gettext \(\"/" | sed -e "s/$$/);/"  > $(POFILE).i
1250Sstevel@tonic-gate	$(XGETTEXT) -s -m "xxx" $(POFILE).i
1260Sstevel@tonic-gate	$(RM) $@ $(POFILE).i
1270Sstevel@tonic-gate	mv messages.po $(POFILE)
1280Sstevel@tonic-gate
1293781Sceasthainstall:		$(ROOTLNKPROGS) \
1300Sstevel@tonic-gate			$(ROOTLIBPRINTPROG) $(ROOTSTARTPROG) \
1310Sstevel@tonic-gate			$(ROOTUSRSBIN) $(ROOTUSRSBINPROG) \
1320Sstevel@tonic-gate			$(ROOTVARSPOOLPRINT) $(ROOTPCONF) \
1336237Sjacobs			$(ROOTLIBLPPROGS) $(LIBLINKS) \
1343781Sceastha			$(ROOTVARLP) $(ROOTVARLPPPD) \
1357454SNorm.Jacobs@Sun.COM			$(ROOTMANUFALIASES) \
1367454SNorm.Jacobs@Sun.COM			$(ROOTAPPFILES) $(ROOTAUTOFILES)
1370Sstevel@tonic-gate
1380Sstevel@tonic-gate$(SYMLINKS1):
1390Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG1) $@
1400Sstevel@tonic-gate
1410Sstevel@tonic-gate$(SYMLINKS2):
1420Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../sbin/$(SBINPROG2) $@
1430Sstevel@tonic-gate
1440Sstevel@tonic-gateclean:
1450Sstevel@tonic-gate	$(RM) $(POFILE)
1460Sstevel@tonic-gate
1470Sstevel@tonic-gateclobber: clean
1480Sstevel@tonic-gate
1490Sstevel@tonic-gatestrip lint:
150