1#/* Copyright 1988,1990,1993,1994 by Paul Vixie 2# * All rights reserved 3# * 4# * Distribute freely, except: don't remove my name from the source or 5# * documentation (don't take credit for my work), mark your changes (don't 6# * get me blamed for your possible bugs), don't alter or remove this 7# * notice. May be sold if buildable source is provided to buyer. No 8# * warrantee of any kind, express or implied, is included with this 9# * software; use at your own risk, responsibility for damages (if any) to 10# * anyone resulting from the use of this software rests entirely with the 11# * user. 12# * 13# * Send bug reports, bug fixes, enhancements, requests, flames, etc., and 14# * I'll try to keep a version up to date. I can be reached as follows: 15# * Paul Vixie <paul@vix.com> uunet!decwrl!vixie!paul 16# */ 17 18# Makefile for vixie's cron 19# 20# $FreeBSD: src/usr.sbin/cron/doc/Makefile.vixie,v 1.5 1999/08/28 01:15:53 peter Exp $ 21# $DragonFly: src/usr.sbin/cron/doc/Makefile.vixie,v 1.2 2003/06/17 04:29:53 dillon Exp $ 22# 23# vix 03mar88 [moved to RCS, rest of log is in there] 24# vix 30mar87 [goodbye, time.c; hello, getopt] 25# vix 12feb87 [cleanup for distribution] 26# vix 30dec86 [written] 27 28# NOTES: 29# 'make' can be done by anyone 30# 'make install' must be done by root 31# 32# this package needs getopt(3), bitstring(3), and BSD install(8). 33# 34# the configurable stuff in this makefile consists of compilation 35# options (use -O, cron runs forever) and destination directories. 36# SHELL is for the 'augumented make' systems where 'make' imports 37# SHELL from the environment and then uses it to run its commands. 38# if your environment SHELL variable is /bin/csh, make goes real 39# slow and sometimes does the wrong thing. 40# 41# this package needs the 'bitstring macros' library, which is 42# available from me or from the comp.sources.unix archive. if you 43# put 'bitstring.h' in a non-standard place (i.e., not intuited by 44# cc(1)), you will have to define INCLUDE to set the include 45# directory for cc. INCLUDE should be `-Isomethingorother'. 46# 47# there's more configuration info in config.h; edit that first! 48 49#################################### begin configurable stuff 50#<<DESTROOT is assumed to have ./etc, ./bin, and ./man subdirectories>> 51DESTROOT = $(DESTDIR)/usr 52DESTSBIN = $(DESTROOT)/sbin 53DESTBIN = $(DESTROOT)/bin 54DESTMAN = $(DESTROOT)/share/man 55#<<need bitstring.h>> 56INCLUDE = -I. 57#INCLUDE = 58#<<need getopt()>> 59LIBS = 60#<<optimize or debug?>> 61#OPTIM = -O 62OPTIM = -g 63#<<ATT or BSD or POSIX?>> 64# (ATT untested) 65#COMPAT = -DATT 66#(BSD is only needed if <sys/params.h> does not define it, as on ULTRIX) 67#COMPAT = -DBSD 68# (POSIX) 69#COMPAT = -DPOSIX 70#<<lint flags of choice?>> 71LINTFLAGS = -hbxa $(INCLUDE) $(COMPAT) $(DEBUGGING) 72#<<want to use a nonstandard CC?>> 73#CC = vcc 74#<<manifest defines>> 75DEFS = 76#(SGI IRIX systems need this) 77#DEFS = -D_BSD_SIGNALS -Dconst= 78#<<the name of the BSD-like install program>> 79#INSTALL = installbsd 80INSTALL = install 81#<<any special load flags>> 82LDFLAGS = 83#################################### end configurable stuff 84 85SHELL = /bin/sh 86CFLAGS = $(OPTIM) $(INCLUDE) $(COMPAT) $(DEFS) 87 88INFOS = README CHANGES FEATURES INSTALL CONVERSION THANKS MAIL 89MANPAGES = bitstring.3 crontab.5 crontab.1 cron.8 putman.sh 90HEADERS = bitstring.h cron.h config.h pathnames.h \ 91 externs.h compat.h 92SOURCES = cron.c crontab.c database.c do_command.c entry.c \ 93 env.c job.c user.c popen.c misc.c compat.c 94SHAR_SOURCE = $(INFOS) $(MANPAGES) Makefile $(HEADERS) $(SOURCES) 95LINT_CRON = cron.c database.c user.c entry.c compat.c \ 96 misc.c job.c do_command.c env.c popen.c 97LINT_CRONTAB = crontab.c misc.c entry.c env.c compat.c 98CRON_OBJ = cron.o database.o user.o entry.o job.o do_command.o \ 99 misc.o env.o popen.o compat.o 100CRONTAB_OBJ = crontab.o misc.o entry.o env.o compat.o 101 102all : cron crontab 103 104lint : 105 lint $(LINTFLAGS) $(LINT_CRON) $(LIBS) \ 106 |grep -v "constant argument to NOT" 2>&1 107 lint $(LINTFLAGS) $(LINT_CRONTAB) $(LIBS) \ 108 |grep -v "constant argument to NOT" 2>&1 109 110cron : $(CRON_OBJ) 111 $(CC) $(LDFLAGS) -o cron $(CRON_OBJ) $(LIBS) 112 113crontab : $(CRONTAB_OBJ) 114 $(CC) $(LDFLAGS) -o crontab $(CRONTAB_OBJ) $(LIBS) 115 116install : all 117 $(INSTALL) -c -m 111 -o root -s cron $(DESTSBIN)/ 118 $(INSTALL) -c -m 4111 -o root -s crontab $(DESTBIN)/ 119 sh putman.sh crontab.1 $(DESTMAN) 120 sh putman.sh cron.8 $(DESTMAN) 121 sh putman.sh crontab.5 $(DESTMAN) 122 123clean :; rm -f *.o cron crontab a.out core tags *~ #* 124 125kit : $(SHAR_SOURCE) 126 makekit -m -s99k $(SHAR_SOURCE) 127 128$(CRON_OBJ) : cron.h compat.h config.h externs.h pathnames.h Makefile 129$(CRONTAB_OBJ) : cron.h compat.h config.h externs.h pathnames.h Makefile 130