## Makefile for the toplevel directory of mcron. ## Copyright (C) 2003 Dale Mellor ## # This file is part of GNU mcron. # # GNU mcron is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) # any later version. # # GNU mcron is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # more details. # # You should have received a copy of the GNU General Public License along # with GNU mcron. If not, see . ## Process this file with automake to produce Makefile.in ED = @ED@ # !!!! Are these needed? CP = @CP@ MAINTAINERCLEANFILES = configure makefile makefile.in config.guess config.sub \ install-sh missing texinfo.tex INSTALL \ aclocal.m4 compile depcomp CLEANFILES = mcron.c core.scm EXTRA_DIST = makefile.ed main.scm mcron-core.scm vixie-specification.scm \ crontab.scm environment.scm job-specifier.scm redirect.scm \ vixie-time.scm mcron.c.template BUGS AM_LDFLAGS = @GUILE_LDFLAGS@ AM_CFLAGS = @GUILE_CFLAGS@ -DGUILE_LOAD_PATH=\"$(datadir)\" info_TEXINFOS = mcron.texinfo dist_man1_MANS = mcron.1 bin_PROGRAMS = mcron mcron_SOURCES = mcron.c pkgdata_DATA = core.scm environment.scm job-specifier.scm redirect.scm \ vixie-time.scm vixie-specification.scm config.scm # If you're wondering, the configure script keeps deleting all files with a name # like core.*, so we have to keep re-making it (I lost a good day's work because # of this). mcron : mcron.c $(CC) $(AM_CFLAGS) mcron.c -o mcron $(AM_LDFLAGS) core.scm : mcron-core.scm $(CP) mcron-core.scm core.scm mcron.c : main.scm crontab.scm makefile.ed mcron.c.template @echo 'Building mcron.c...' @$(ED) < makefile.ed > /dev/null 2>&1 @rm -f mcron.escaped.scm > /dev/null 2>&1 #full program prefix fpp = $(DESTDIR)$(bindir)/@real_program_prefix@ install-exec-hook: @if [ "x@NO_VIXIE_CLOBBER@" != "xyes" -a "`id -u`" -eq "0" ]; then \ rm -f $(fpp)cron$(EXEEXT) > /dev/null 2>&1; \ $(INSTALL) --mode='u=rwx' mcron$(EXEEXT) $(fpp)cron$(EXEEXT); \ rm -f $(fpp)crontab$(EXEEXT) > /dev/null 2>&1; \ $(INSTALL) --mode='u=rwxs,og=rx' mcron$(EXEEXT) $(fpp)crontab$(EXEEXT); \ $(INSTALL) -d --mode='u=rwx' $(DESTDIR)/var/cron; \ $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)/var/run; \ $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)@GUILE_SITE@; \ $(INSTALL) -d --mode='u=rwx,og=rx' $(DESTDIR)@GUILE_SITE@/mcron; \ elif [ "x@NO_VIXIE_CLOBBER@" = "xyes" ]; then \ echo "Not installing Vixie-style programs"; \ else \ echo "+++ WARNING: NON-ROOT INSTALL: ONLY mcron WILL BE INSTALLED, NOT ANY OF THE VIXIE REPLACEMENT PROGRAMS"; \ fi @echo @echo " AFTER INSTALLATION, CONSIDER RUNNING make cook-up-man" @echo uninstall-hook: if [ "`id -u`" -eq "0" ]; then \ rm -f $(fpp){cron,crontab}$(EXEEXT); \ fi # Not part of formal package building, but a rule for manual use to get the # elemental man page. Will only work once the mcron program is installed. cook-up-man: help2man -n 'a program to run tasks at regular (or not) intervals' \ $(fpp)mcron > mcron.1 $(MAKE) install