8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / cmd / fs.d / autofs / Makefile
blob5fd524a0f8dfc22e5c6483bf7486dde689a2b4cb
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
23 # Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2015 RackTop Systems.
27 FSTYPE= autofs
28 AUTO= automount
29 MOUNT= mount
30 VERS= .2
31 DFSHARES= dfshares
32 SHARE= share
33 UNSHARE= unshare
34 LIBPROG= $(AUTO) $(MOUNT) $(DFSHARES) $(SHARE) $(UNSHARE)
35 TYPEPROG= automountd
37 LINKINSTALL= $(ROOTUSRSBIN)/$(AUTO)
38 LINKVALUE= ../lib/fs/$(FSTYPE)/$(AUTO)
39 MAPS= auto_master auto_home
40 MAPINSTALL= $(MAPS:%=$(ROOTETC)/%)
41 AUTOFS= autofs
42 DEFAULTFILES= autofs.dfl
43 SMFMANIFEST= autofs.xml
44 SMFMETHOD= svc-autofs
45 MFSTINSTALL= $(SMFMANIFEST:%=$(ROOTSVCSYSTEM)/filesystem/%)
46 METHODINSTALL= $(SMFMETHOD:%=$(ROOTLIBSVCMETHOD)/%)
48 OTHERINSTALL= $(MAPINSTALL) $(LINKINSTALL) $(ROOTETCDEFAULTFILES) \
49 $(MFSTINSTALL) $(METHODINSTALL)
51 UNCHECKED_HDRS= webnfs.h
53 MANIFEST= autofs.xml
54 SVCMETHOD= svc-autofs
56 include ../Makefile.fstype
58 $(MAPINSTALL) := FILEMODE= 0644
60 $(MFSTINSTALL) := FILEMODE = 0444
62 REAL_COMMON= debug_alloc.o
63 COMMON= ns_generic.o ns_files.o ns_nis.o \
64 ns_ldap.o auto_mnttab.o auto_subr.o $(REAL_COMMON)
66 AUTOOBJS= automount.o $(COMMON) $(FSLIB) smfcfg.o
68 MOUNTOBJS= mount.o $(FSLIB) $(REAL_COMMON)
70 LOCAL= autod_main.o \
71 autod_parse.o autod_mount.o autod_nfs.o nfs_cast.o \
72 autod_autofs.o autod_xdr.o autod_readdir.o autod_lookup.o \
73 smfcfg.o
75 TYPEOBJS= $(LOCAL) $(COMMON) replica.o nfs_sec.o nfs_resolve.o nfs_subr.o \
76 $(FSLIB) webnfs_xdr.o webnfs_client.o selfcheck.o
78 SHAREOBJS= $(SHARESRCS:%.c=%.o)
80 UNSHAREOBJS= $(UNSHARESRCS:%.c=%.o)
82 POFILE= autofs.po
83 GREP= egrep
84 SED= sed
86 $(AUTO) := LDLIBS += -lnsl -lsldap -lscf
87 $(MOUNT):= LDLIBS += -lscf
88 $(TYPEPROG) := LDLIBS += -lrpcsvc -lsocket -lnsl -lsldap -lkstat -lscf
90 CFLAGS += $(CCVERBOSE) -D_FILE_OFFSET_BITS=64
91 CPPFLAGS= -I. -I.. -I../nfs/lib $(CPPFLAGS.master) -D_REENTRANT \
92 $(MALLOC_DEBUG)
94 CERRWARN += -_gcc=-Wno-parentheses
95 CERRWARN += -_gcc=-Wno-unused-variable
96 CERRWARN += -_gcc=-Wno-switch
97 CERRWARN += -_gcc=-Wno-uninitialized
98 CERRWARN += -_gcc=-Wno-unused-label
99 CERRWARN += -_gcc=-Wno-unused-function
101 OBJS= $(AUTOOBJS) $(MOUNTOBJS) $(TYPEOBJS) \
102 $(SHAREOBJS) $(UNSHAREOBJS)
104 AUTOSRCS= automount.c $(COMMON:%.o=%.c) $(FSLIBSRC)
105 MOUNTSRCS= mount.c $(FSLIBSRC)
106 TYPESRCS= $(LOCAL:%.o=%.c) $(COMMON:%.o=%.c) \
107 ../nfs/lib/replica.c ../nfs/lib/nfs_sec.c \
108 ../nfs/lib/nfs_subr.c $(FSLIBSRC) ../nfs/lib/selfcheck.c \
109 ../nfs/lib/nfs_resolve.c ../nfs/lib/smfcfg.c
110 SHARESRCS= $(SHARE:%=%.c)
111 UNSHARESRCS= $(UNSHARE:%=%.c)
112 DFSHARESSRCS= $(DFSHARES:%=%.sh)
113 SRCS= $(OBJS:%.o=%.c)
115 nfs_sec.o := CPPFLAGS += -DWNFS_SEC_NEGO
117 $(AUTO): $(AUTOOBJS)
118 $(LINK.c) -o $@ $(AUTOOBJS) $(LDLIBS)
119 $(POST_PROCESS)
121 $(MOUNT): $(MOUNTOBJS)
122 $(LINK.c) -o $@ $(MOUNTOBJS) $(LDLIBS)
123 $(POST_PROCESS)
125 $(TYPEPROG): webnfs.h $(TYPEOBJS)
126 $(LINK.c) -o $@ $(TYPEOBJS) $(LDLIBS)
127 $(POST_PROCESS)
129 $(SHARE): $(SHAREOBJS)
130 $(LINK.c) -o $@ $(SHAREOBJS) $(LDLIBS)
131 $(POST_PROCESS)
133 $(UNSHARE): $(UNSHAREOBJS)
134 $(LINK.c) -o $@ $(UNSHAREOBJS) $(LDLIBS)
135 $(POST_PROCESS)
137 $(ROOTSVCSYSTEM)/filesystem/%: %
138 $(INS.file)
140 DUMP_PROG=malloc_dump
141 BUILDDIR=tmp
142 DUMP_PROTO=$(BUILDDIR)/$(DUMP_PROG)_client
143 XFILE=$(BUILDDIR)/malloc_dump.x
144 XLINE= "program DUMP { version VERS \
145 { void DUMP_IT(void) = 1000000; } = 2; } = 100099;"
147 $(XFILE): $(BUILDDIR)
148 $(RM) $(XFILE)
149 echo $(XLINE) > $(XFILE)
151 $(BUILDDIR):
152 $(RM) -r $(BUILDDIR)
153 mkdir $(BUILDDIR)
155 $(DUMP_PROTO): $(BUILDDIR) $(XFILE)
156 cd $(BUILDDIR); $(RM) *.[ch] makefile.malloc_dump ; rpcgen -a `basename $(XFILE)
157 cd $(BUILDDIR); $(MAKE) -f makefile.malloc_dump `basename $@`
159 $(DUMP_PROG): $(DUMP_PROTO)
160 $(RM) $@
161 cp $(DUMP_PROTO) $@
163 clean_dump:
164 $(RM) -r $(BUILDDIR)
165 $(RM) $(DUMP_PROG)
166 $(ROOTUSRSBIN)/$(AUTO):
167 $(RM) $@; $(SYMLINK) $(LINKVALUE) $@
169 replica.o: ../nfs/lib/replica.c
170 $(COMPILE.c) ../nfs/lib/replica.c
172 nfs_sec.o: ../nfs/lib/nfs_sec.c
173 $(COMPILE.c) ../nfs/lib/nfs_sec.c
175 nfs_subr.o: ../nfs/lib/nfs_subr.c
176 $(COMPILE.c) ../nfs/lib/nfs_subr.c
178 selfcheck.o: ../nfs/lib/selfcheck.c
179 $(COMPILE.c) ../nfs/lib/selfcheck.c
181 smfcfg.o: ../nfs/lib/smfcfg.c
182 $(COMPILE.c) ../nfs/lib/smfcfg.c
184 nfs_resolve.o: ../nfs/lib/nfs_resolve.c
185 $(COMPILE.c) ../nfs/lib/nfs_resolve.c
187 webnfs_xdr.c: webnfs.x
188 $(RPCGEN) -M -C -c -o $@ webnfs.x
190 webnfs_client.c: webnfs.x
191 $(RPCGEN) -M -C -l -o $@ webnfs.x
193 webnfs.h: webnfs.x
194 $(RPCGEN) -M -C -h -o $@ webnfs.x
196 webnfs.x: ../nfs/lib/webnfs.x
197 $(RM) webnfs.x
198 cp ../nfs/lib/webnfs.x .
200 catalog: $(POFILE)
202 $(POFILE):
203 $(RM) messages.po
204 $(SED) -e 's/pr_msg/gettext/' `$(GREP) -l "pr_msg|gettext" *.[ch]` | \
205 $(XGETTEXT) $(XGETFLAGS) -
206 $(SED) -e '/^# msg/d' -e '/^domain/d' < messages.po > $@
207 $(RM) messages.po
209 lint:
210 $(LINT.c) $(AUTOSRCS)
211 $(LINT.c) $(MOUNTSRCS)
212 $(LINT.c) $(TYPESRCS)
214 clean: clean_dump
215 $(RM) $(OBJS) webnfs_xdr.c webnfs_client.c webnfs.h webnfs.x
217 check: $(CHKMANIFEST)