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 2015 Gary Mills
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26
27 PROG= acctcms acctcom acctcon acctcon1 acctcon2 \
28 acctdisk acctdusg acctmerg accton acctprc acctprc1 \
29 acctprc2 acctwtmp closewtmp fwtmp \
30 wtmpfix utmp2wtmp
31 SHFILE1= acct chargefee ckpacct dodisk lastlogin\
32 monacct nulladm prctmp prdaily prtacct \
33 remove runacct shutacct startup turnacct
34 SHFILE2= ptecms.awk ptelus.awk
35 SUBDIRS= lib
36 ALL= $(PROG) $(SHFILE1) $(SHFILE2) holidays
37
38 SRCS= $(PROG:%=%.c)
39 SHFILE1SRCS= $(SHFILE1:%=%.sh)
40
41 BINPROG= acctcom
42 LIBPROG= acctcms acctcon acctcon1 acctcon2 acctdisk \
43 acctdusg acctmerg accton acctprc acctprc1 acctprc2 \
44 acctwtmp closewtmp fwtmp utmp2wtmp \
45 wtmpfix chargefee ckpacct dodisk monacct \
75 # in /usr/src/Targetdirs and hence should be assumed to exist.
76 DIRS= $(LIBACCTD) $(ETCACCTD) $(WKDIRS)
77
78 USRBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
79 LIBACCTPROG= $(LIBPROG:%=$(LIBACCTD)/%)
80 ETCACCTPROG= $(ETCPROG:%=$(ETCACCTD)/%)
81 ETCINITPROG= $(INITPROG:%=$(ETCINITD)/%)
82
83 $(LIBACCTD) := DIRMODE= 755
84 $(ETCACCTD) := DIRMODE= 755
85 $(WKDIRS) := DIRMODE= 775
86 $(LIBACCTD)/accton := FILEMODE= 04755
87 $(ETCINITPROG) := FILEMODE= 0744
88 $(ETCACCTPROG) := FILEMODE= 0644
89
90 CERRWARN += -_gcc=-Wno-implicit-function-declaration
91 CERRWARN += -_gcc=-Wno-parentheses
92 CERRWARN += -_gcc=-Wno-unused-variable
93 CERRWARN += -_gcc=-Wno-address
94
95 .KEEP_STATE:
96
97 .PARALLEL: $(ALL)
98
99 all: $(SUBDIRS) .WAIT $(ALL)
100
101 install: all .WAIT $(DIRS) .WAIT $(USRBINPROG) $(LIBACCTPROG) $(ETCACCTPROG) \
102 $(ETCINITPROG)
103
104 THIS_YEAR:sh= date +%Y
105
106 holidays: FRC
107 @if grep $(THIS_YEAR) holidays > /dev/null 2>&1;\
108 then \
109 :;\
110 else \
111 $(ECHO) "building holidays";\
112 ( \
113 $(ECHO) "* @(#)holidays\tJanuary 1, `date +%Y`";\
114 $(ECHO) "*";\
|
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 2015 Gary Mills
23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
25 #
26 # Copyright (c) 2018, Joyent, Inc.
27
28 PROG= acctcms acctcom acctcon acctcon1 acctcon2 \
29 acctdisk acctdusg acctmerg accton acctprc acctprc1 \
30 acctprc2 acctwtmp closewtmp fwtmp \
31 wtmpfix utmp2wtmp
32 SHFILE1= acct chargefee ckpacct dodisk lastlogin\
33 monacct nulladm prctmp prdaily prtacct \
34 remove runacct shutacct startup turnacct
35 SHFILE2= ptecms.awk ptelus.awk
36 SUBDIRS= lib
37 ALL= $(PROG) $(SHFILE1) $(SHFILE2) holidays
38
39 SRCS= $(PROG:%=%.c)
40 SHFILE1SRCS= $(SHFILE1:%=%.sh)
41
42 BINPROG= acctcom
43 LIBPROG= acctcms acctcon acctcon1 acctcon2 acctdisk \
44 acctdusg acctmerg accton acctprc acctprc1 acctprc2 \
45 acctwtmp closewtmp fwtmp utmp2wtmp \
46 wtmpfix chargefee ckpacct dodisk monacct \
76 # in /usr/src/Targetdirs and hence should be assumed to exist.
77 DIRS= $(LIBACCTD) $(ETCACCTD) $(WKDIRS)
78
79 USRBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
80 LIBACCTPROG= $(LIBPROG:%=$(LIBACCTD)/%)
81 ETCACCTPROG= $(ETCPROG:%=$(ETCACCTD)/%)
82 ETCINITPROG= $(INITPROG:%=$(ETCINITD)/%)
83
84 $(LIBACCTD) := DIRMODE= 755
85 $(ETCACCTD) := DIRMODE= 755
86 $(WKDIRS) := DIRMODE= 775
87 $(LIBACCTD)/accton := FILEMODE= 04755
88 $(ETCINITPROG) := FILEMODE= 0744
89 $(ETCACCTPROG) := FILEMODE= 0644
90
91 CERRWARN += -_gcc=-Wno-implicit-function-declaration
92 CERRWARN += -_gcc=-Wno-parentheses
93 CERRWARN += -_gcc=-Wno-unused-variable
94 CERRWARN += -_gcc=-Wno-address
95
96 # not linted
97 SMATCH=off
98
99 .KEEP_STATE:
100
101 .PARALLEL: $(ALL)
102
103 all: $(SUBDIRS) .WAIT $(ALL)
104
105 install: all .WAIT $(DIRS) .WAIT $(USRBINPROG) $(LIBACCTPROG) $(ETCACCTPROG) \
106 $(ETCINITPROG)
107
108 THIS_YEAR:sh= date +%Y
109
110 holidays: FRC
111 @if grep $(THIS_YEAR) holidays > /dev/null 2>&1;\
112 then \
113 :;\
114 else \
115 $(ECHO) "building holidays";\
116 ( \
117 $(ECHO) "* @(#)holidays\tJanuary 1, `date +%Y`";\
118 $(ECHO) "*";\
|