xref: /illumos-gate/usr/src/cmd/lp/Makefile (revision 0aaef2f550fa500248f59b0b8a14225b5afbd198)
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#
23# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# Copyright 2011 Nexenta Systems, Inc. All rights reserved.
27#
28
29include 	./Makefile.lp
30
31SUBDIRS =	filter crontab lib cmd model
32
33MSGSUBDIRS =	filter lib cmd model
34
35ROOTDIRS =					\
36		$(ROOTLIBLP)			\
37		$(ROOTLIBLP)/bin		\
38		$(ROOTLIBLP)/model		\
39		$(ROOTLIBLPLOCL)		\
40		$(ROOTLIB)/print		\
41		$(LPOWNSDIRS)
42LPOWNSDIRS =					\
43		$(ROOTETCLP)			\
44		$(ROOTETCLP)/classes		\
45		$(ROOTETCLP)/forms		\
46		$(ROOTETCLP)/interfaces		\
47		$(ROOTETCLP)/printers		\
48		$(ROOTETCLP)/pwheels		\
49		$(ROOTETCLP)/ppd		\
50		$(ROOTVAR)/lp			\
51		$(ROOTVAR)/lp/logs		\
52		$(ROOTVARSP)/lp			\
53		$(ROOTVARSP)/lp/admins		\
54		$(ROOTVARSP)/lp/requests 	\
55		$(ROOTVARSP)/lp/system
56
57SYMDIR1 =	$(ROOTVARSP)/lp/admins/lp
58SYMDIR2 =	$(ROOTVARSP)/lp/bin
59SYMDIR3 =	$(ROOTVARSP)/lp/logs
60SYMDIR4 =	$(ROOTETCLP)/logs
61SYMDIR5 =	$(ROOTVARSP)/lp/model
62
63$(SYMDIR1) :=	SYMLNKDEST =	../../../../etc/lp
64$(SYMDIR2) :=	SYMLNKDEST =	../../../usr/lib/lp/bin
65$(SYMDIR3) :=	SYMLNKDEST =	../../lp/logs
66$(SYMDIR4) :=	SYMLNKDEST =	../../var/lp/logs
67$(SYMDIR5) :=	SYMLNKDEST =	../../../usr/lib/lp/model
68
69ROOTSYMLINKDIRS =	$(SYMDIR1) $(SYMDIR2) $(SYMDIR3) $(SYMDIR4) $(SYMDIR5)
70
71$(ROOTVAR)/lp :=		DIRMODE = 775
72$(ROOTVAR)/lp/logs :=		DIRMODE = 775
73$(ROOTETCLP) :=			DIRMODE = 775
74$(ROOTETCLP)/classes :=		DIRMODE = 775
75$(ROOTETCLP)/forms :=		DIRMODE = 775
76$(ROOTETCLP)/interfaces :=	DIRMODE = 775
77$(ROOTETCLP)/printers :=	DIRMODE = 775
78$(ROOTETCLP)/pwheels :=		DIRMODE = 775
79$(ROOTETCLP)/ppd :=		DIRMODE = 775
80$(ROOTVARSP)/lp :=		DIRMODE = 775
81$(ROOTVARSP)/lp/admins :=	DIRMODE = 775
82$(ROOTVARSP)/lp/requests :=	DIRMODE = 775
83$(ROOTVARSP)/lp/system :=	DIRMODE = 775
84$(ROOTLIB)/print :=		DIRMODE = 0755
85
86POFILE= lp.po
87POFILES= lp_*.po
88
89.KEEP_STATE:
90
91all:	$(TXTS) $(SUBDIRS)
92
93#
94# Each message catalog file is generated in each sub
95# directory and copied to the usr/src/cmd/lp/ directory.
96# Those message catalog files are consolidated into one
97# message catalog file.  The consolidated one will be copied
98# into the $(ROOT)/catalog/SUNW_OST_OSCMD/ directory.
99#
100
101_msg:	$(MSGDOMAINPOFILE)
102
103$(POFILE):	$(MSGSUBDIRS) pofile_POFILES
104
105install: $(ROOTDIRS) $(ROOTSYMLINKDIRS) $(SUBDIRS)
106
107clean strip lint: $(SUBDIRS)
108
109clobber: $(SUBDIRS) local_clobber
110
111local_clobber:
112	$(RM) $(CLOBBERFILES)
113
114$(ROOTDIRS) :
115	$(INS.dir)
116
117$(ROOTSYMLINKDIRS) :
118	-$(RM) $@; $(SYMLINK) $(SYMLNKDEST) $@
119
120$(SUBDIRS):	FRC
121	@cd $@; pwd; $(MAKE) $(TARGET)
122
123FRC:
124
125include $(SRC)/Makefile.msg.targ
126