Makefile revision 24fe0b3bf671e123467ce1df0b67cadd3614c8e4
0N/A#
0N/A# CDDL HEADER START
0N/A#
390N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
292N/A# or http://www.opensolaris.org/os/licensing.
292N/A# See the License for the specific language governing permissions
292N/A# and limitations under the License.
292N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
292N/A# fields enclosed by brackets "[]" replaced with your own identifying
292N/A# information: Portions Copyright [yyyy] [name of copyright owner]
292N/A#
292N/A# CDDL HEADER END
292N/A#
292N/A#
292N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
292N/A# Use is subject to license terms.
292N/A#
292N/A
292N/APROG= acctcms acctcom acctcon acctcon1 acctcon2 \
0N/A acctdisk acctdusg acctmerg accton acctprc acctprc1 \
0N/A acctprc2 acctwtmp closewtmp fwtmp \
0N/A wtmpfix utmp2wtmp
0N/ASHFILE1= acct chargefee ckpacct dodisk lastlogin\
0N/A monacct nulladm prctmp prdaily prtacct \
0N/A remove runacct shutacct startup turnacct
0N/ASHFILE2= ptecms.awk ptelus.awk
0N/ASUBDIRS= lib
0N/AALL= $(PROG) $(SHFILE1) $(SHFILE2) holidays
0N/A
0N/ASRCS= $(PROG:%=%.c)
0N/ASHFILE1SRCS= $(SHFILE1:%=%.sh)
0N/A
0N/ATXTS= diskusg.c
0N/A
0N/ABINPROG= acctcom
0N/ALIBPROG= acctcms acctcon acctcon1 acctcon2 acctdisk \
0N/A acctdusg acctmerg accton acctprc acctprc1 acctprc2 \
0N/A acctwtmp closewtmp fwtmp utmp2wtmp \
0N/A wtmpfix chargefee ckpacct dodisk monacct \
0N/A lastlogin nulladm prctmp prdaily prtacct \
0N/A remove runacct shutacct startup turnacct \
0N/A ptecms.awk ptelus.awk
0N/AETCPROG= holidays
0N/AINITPROG= acct
0N/A
0N/Ainclude ../Makefile.cmd
0N/A
0N/Aall:= TARGET= all
0N/Ainstall:= TARGET= install
390N/Aclean:= TARGET= clean
390N/Aclobber:= TARGET= clobber
0N/Alint:= TARGET= lint
0N/A
0N/Aacctcom := LDLIBS += lib/a.a
0N/Aacctcms acctcon acctcon1 acctmerg acctprc1 acctprc := LDLIBS += lib/a.a
0N/A
0N/Aacctdusg:= CPPFLAGS += -D_FILE_OFFSET_BITS=64
0N/Aacctdusg:= LDLIBS += -lcmdutils
0N/A
0N/ALIBACCTD= $(ROOTLIB)/acct
0N/AETCACCTD= $(ROOTETC)/acct
0N/AETCINITD= $(ROOTETC)/init.d
0N/AVARADMD= $(ROOT)/var/adm
0N/AACCTDIR= $(VARADMD)/acct
0N/AACCTSUBDIRS= $(ACCTDIR)/nite $(ACCTDIR)/fiscal $(ACCTDIR)/sum
0N/AWKDIRS= $(ACCTDIR) $(ACCTSUBDIRS)
0N/A
0N/A# DIRS is directories to create. $(ETCINITD) [aka: /etc/init.d] is created
0N/A# in /usr/src/Targetdirs and hence should be assumed to exist.
0N/ADIRS= $(LIBACCTD) $(ETCACCTD) $(WKDIRS)
0N/A
0N/AUSRBINPROG= $(BINPROG:%=$(ROOTBIN)/%)
0N/ALIBACCTPROG= $(LIBPROG:%=$(LIBACCTD)/%)
0N/AETCACCTPROG= $(ETCPROG:%=$(ETCACCTD)/%)
0N/AETCINITPROG= $(INITPROG:%=$(ETCINITD)/%)
0N/A
$(LIBACCTD) := DIRMODE= 755
$(ETCACCTD) := DIRMODE= 755
$(WKDIRS) := DIRMODE= 775
$(LIBACCTD)/accton := FILEMODE= 04755
$(ETCINITPROG) := FILEMODE= 0744
$(ETCACCTPROG) := FILEMODE= 0644
.KEEP_STATE:
.PARALLEL: $(ALL)
all: $(SUBDIRS) .WAIT $(ALL) $(TXTS)
install: all .WAIT $(DIRS) .WAIT $(USRBINPROG) $(LIBACCTPROG) $(ETCACCTPROG) \
$(ETCINITPROG)
THIS_YEAR:sh= date +%Y
holidays: FRC
@if grep $(THIS_YEAR) holidays > /dev/null 2>&1;\
then \
:;\
else \
$(ECHO) "building holidays";\
( \
$(ECHO) "* @(#)holidays\tJanuary 1, `date +%Y`";\
$(ECHO) "*";\
$(ECHO) "* Prime/Nonprime Table for UNIX Accounting System";\
$(ECHO) "*";\
$(ECHO) "* Curr\tPrime\tNon-Prime";\
$(ECHO) "* Year\tStart\tStart";\
$(ECHO) "*";\
$(ECHO) " `date +%Y`\t0800\t1800";\
$(ECHO) "*";\
$(ECHO) "* only the first column (month/day) is significiant.";\
$(ECHO) "*";\
$(ECHO) "* month/day\tCompany";\
$(ECHO) "* \t\tHoliday";\
$(ECHO) "*";\
$(ECHO) "1/1\t\tNew Years Day";\
$(ECHO) "7/4\t\tIndep. Day";\
$(ECHO) "12/25\t\tChristmas" ) > holidays;\
fi
$(DIRS):
$(INS.dir)
$(LIBACCTD)/% : %
$(INS.file)
$(ETCACCTD)/% : %
$(INS.file)
$(ETCINITD)/% : %
$(INS.file)
$(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
FRC:
clean: $(SUBDIRS)
clobber: $(SUBDIRS)
$(RM) $(PROG) $(SHFILE1) holidays
lint: $(SUBDIRS)
$(LINT.c) $(SRCS)