]> granicus.if.org Git - cronie/commitdiff
Anacron makefile was rewritten according to the rest of autotools
authorMarcela Mašláňová <mmaslano@redhat.com>
Tue, 14 Jul 2009 07:32:51 +0000 (09:32 +0200)
committerMarcela Mašláňová <mmaslano@redhat.com>
Tue, 14 Jul 2009 07:32:51 +0000 (09:32 +0200)
makefiles in this project.

Makefile.am
anacron/Makefile
anacron/Makefile.am [new file with mode: 0644]
anacron/global.h
anacron/main.c
configure.ac
regularly-jobs [new file with mode: 0644]

index 3349ed5a60a207edee696f66ab47b70bbad4eef9..e7199a3cdf3f39996a1cd13f2637e06266cc776a 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = src man
+SUBDIRS = src man anacron
 
 if PAM
 pamdir = $(sysconfdir)/pam.d
@@ -9,5 +9,5 @@ endif
 
 #init_SCRIPTS = cronie.init
 
-EXTRA_DIST = cronie.init crond.sysconfig
+EXTRA_DIST = cronie.init crond.sysconfig regularly-jobs
 
index 555e524cf0ef4db04e0d85ba20c4c4ace5c6d580..7744d322850ac893b05afc43fbe03c650cd3fb73 100644 (file)
-#   Anacron - run commands periodically
-#   Copyright (C) 1998  Itai Tzur <itzur@actcom.co.il>
-#
-#   This program 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 2 of the License, or
-#   (at your option) any later version.
-#
-#   This program 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 this program; if not, write to the Free Software
-#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-#
-#   The GNU General Public License can also be found in the file
-#   `COPYING' that comes with the Anacron source distribution.
-
-
-PREFIX = 
-BINDIR = $(PREFIX)/usr/sbin
-MANDIR = $(PREFIX)/usr/man
-CFLAGS = -Wall -pedantic -O2
-#CFLAGS = -Wall -O2 -g -DDEBUG
-
-# If you change these, please update the man-pages too
-# Only absolute paths here, please
-SPOOLDIR = /var/spool/anacron
-ANACRONTAB = /etc/anacrontab
-
-RELEASE = 2.3
-package_name = anacron-$(RELEASE)
-distfiles = ChangeLog COPYING README TODO anacron.8 anacrontab.5 Makefile *.h *.c
+# Makefile.in generated by automake 1.11 from Makefile.am.
+# anacron/Makefile.  Generated from Makefile.in by configure.
 
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Makefile.am - two binaries crond and crontab
+
+
+pkgdatadir = $(datadir)/cronie
+pkgincludedir = $(includedir)/cronie
+pkglibdir = $(libdir)/cronie
+pkglibexecdir = $(libexecdir)/cronie
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-unknown-linux-gnu
+host_triplet = x86_64-unknown-linux-gnu
+bin_PROGRAMS = anacron$(EXEEXT)
+subdir = anacron
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+       COPYING ChangeLog TODO
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am__objects_1 =
+am_anacron_OBJECTS = gregor.$(OBJEXT) lock.$(OBJEXT) log.$(OBJEXT) \
+       main.$(OBJEXT) matchrx.$(OBJEXT) readtab.$(OBJEXT) \
+       runjob.$(OBJEXT) $(am__objects_1)
+nodist_anacron_OBJECTS = $(am__objects_1)
+anacron_OBJECTS = $(am_anacron_OBJECTS) $(nodist_anacron_OBJECTS)
+anacron_LDADD = $(LDADD)
+am__DEPENDENCIES_1 =
+anacron_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+SOURCES = $(anacron_SOURCES) $(nodist_anacron_SOURCES)
+DIST_SOURCES = $(anacron_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/marca/Development/work/cronie/missing --run aclocal-1.11
+AMTAR = ${SHELL} /home/marca/Development/work/cronie/missing --run tar
+ANACRONTAB = ${sysconfdir}/regularly-jobs
+ANACRON_SPOOL_DIR = ${localstatedir}/spool/anacron
+AUTOCONF = ${SHELL} /home/marca/Development/work/cronie/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/marca/Development/work/cronie/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/marca/Development/work/cronie/missing --run automake-1.11
+AWK = gawk
+CC = gcc
+CCDEPMODE = depmode=gcc3
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS = 
+CYGPATH_W = echo
+DAEMON_GROUPNAME = daemon
+DAEMON_USERNAME = daemon
+DEFS = -DHAVE_CONFIG_H
+DEPDIR = .deps
+ECHO_C = 
+ECHO_N = -n
+ECHO_T = 
+EGREP = /bin/grep -E
+EXEEXT = 
+GREP = /bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LDFLAGS = 
+LIBAUDIT = 
+LIBOBJS = 
+LIBPAM = -lpam -lpam_misc -ldl
+LIBS =  -lselinux 
+LIBSELINUX = -lselinux
+LN_S = ln -s
+LTLIBOBJS = 
+MAKEINFO = ${SHELL} /home/marca/Development/work/cronie/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+OBJEXT = o
+PACKAGE = cronie
+PACKAGE_BUGREPORT = mmaslano@redhat.com
+PACKAGE_NAME = cronie
+PACKAGE_STRING = cronie 1.3
+PACKAGE_TARNAME = cronie
+PACKAGE_VERSION = 1.3
+PATH_SEPARATOR = :
+SET_MAKE = 
 SHELL = /bin/sh
-INSTALL = install
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL)
-INSTALL_DIR = $(INSTALL) -d
-GZIP = gzip -9 -f
-ALL_CPPFLAGS = -DSPOOLDIR=\"$(SPOOLDIR)\" -DRELEASE=\"$(RELEASE)\" \
-       -DANACRONTAB=\"$(ANACRONTAB)\" $(CPPFLAGS)
+SPOOL_DIR = ${localstatedir}/spool/cron
+STRIP = 
+SYSCRONTAB = ${sysconfdir}/crontab
+SYS_CROND_DIR = ${sysconfdir}/cron.d
+VERSION = 1.3
+abs_builddir = /home/marca/Development/work/cronie/anacron
+abs_srcdir = /home/marca/Development/work/cronie/anacron
+abs_top_builddir = /home/marca/Development/work/cronie
+abs_top_srcdir = /home/marca/Development/work/cronie
+ac_ct_CC = gcc
+am__include = include
+am__leading_dot = .
+am__quote = 
+am__tar = ${AMTAR} chof - "$$tardir"
+am__untar = ${AMTAR} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-unknown-linux-gnu
+build_alias = 
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = unknown
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-unknown-linux-gnu
+host_alias = 
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = unknown
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/marca/Development/work/cronie/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias = 
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+anacron_SOURCES = \
+       gregor.c lock.c log.c main.c matchrx.c readtab.c runjob.c \
+       $(common_src)
+
+common_src = global.h gregor.h matchrx.h
+common_nodist = anacron-paths.h
+nodist_anacron_SOURCES = $(common_nodist)
+BUILT_SOURCES = $(common_nodist)
+LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
+all: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu anacron/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu anacron/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p; \
+         then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+             echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+             $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+anacron$(EXEEXT): $(anacron_OBJECTS) $(anacron_DEPENDENCIES) 
+       @rm -f anacron$(EXEEXT)
+       $(LINK) $(anacron_OBJECTS) $(anacron_LDADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
 
-csources := $(wildcard *.c)
-objects = $(csources:.c=.o)
+include ./$(DEPDIR)/gregor.Po
+include ./$(DEPDIR)/lock.Po
+include ./$(DEPDIR)/log.Po
+include ./$(DEPDIR)/main.Po
+include ./$(DEPDIR)/matchrx.Po
+include ./$(DEPDIR)/readtab.Po
+include ./$(DEPDIR)/runjob.Po
 
-.PHONY: all
-all: anacron
+.c.o:
+       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+       $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#      source='$<' object='$@' libtool=no \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(COMPILE) -c $<
 
-# This makefile generates header file dependencies auto-magically
-%.d: %.c
-       $(SHELL) -ec "$(CC) -MM $(ALL_CPPFLAGS) $< \
-       | sed '1s/^\(.*\)\.o[ :]*/\1.d &/1' > $@"
+.c.obj:
+       $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+       $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+#      source='$<' object='$@' libtool=no \
+#      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \
+#      $(COMPILE) -c `$(CYGPATH_W) '$<'`
 
-include $(csources:.c=.d)
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
 
-anacron: $(objects)
-       $(CC) $(LDFLAGS) $^ $(LOADLIBES) -o $@
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
 
-%.o : %.c
-       $(CC) -c $(ALL_CPPFLAGS) $(CFLAGS) $< -o $@
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
 
-.PHONY: installdirs
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(PROGRAMS)
 installdirs:
-       $(INSTALL_DIR) $(BINDIR) $(PREFIX)$(SPOOLDIR) \
-               $(MANDIR)/man5 $(MANDIR)/man8
-
-.PHONY: install
-install: installdirs
-       $(INSTALL_PROGRAM) anacron $(BINDIR)/anacron
-       $(INSTALL_DATA) anacrontab.5 $(MANDIR)/man5/anacrontab.5
-       $(INSTALL_DATA) anacron.8 $(MANDIR)/man8/anacron.8
-
-.PHONY: clean
-clean:
-       rm -f *.o *.d anacron
-
-distclean: clean
-       rm -f *~
-
-.PHONY: dist
-dist: $(package_name).tar.gz
-
-$(package_name).tar.gz: $(distfiles)
-       mkdir $(package_name)
-       ln $(distfiles) $(package_name)
-       chmod 0644 $(package_name)/*
-       chmod 0755 $(package_name)
-       tar cf $(package_name).tar $(package_name)
-       $(GZIP) $(package_name).tar
-       rm -r $(package_name)
-
-release: distclean $(package_name).tar.gz
+       for dir in "$(DESTDIR)$(bindir)"; do \
+         test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+       done
+install: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+       clean-generic ctags distclean distclean-compile \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-binPROGRAMS \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-compile \
+       mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
+       uninstall-am uninstall-binPROGRAMS
+
+
+# This header contains all the paths.
+# If they are configurable, they are declared in configure script.
+# Depends on this Makefile, because it uses make variables.
+anacron-paths.h: Makefile
+       @echo 'creating $@'
+       @sed >$@ 's/ *\\$$//' <<\END #\
+       /* This file has been automatically generated.  Do not edit. */ \
+       \
+       #ifndef _ANACRON_PATHS_H_ \
+       #define _ANACRON_PATHS_H_ \
+       #define ANACRON_SPOOL_DIR "$(ANACRON_SPOOL_DIR)" \
+       #define ANACRONTAB "$(ANACRONTAB)" \
+       #endif /* _ANACRON_PATHS_H_ */ \
+       END
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/anacron/Makefile.am b/anacron/Makefile.am
new file mode 100644 (file)
index 0000000..3b28b96
--- /dev/null
@@ -0,0 +1,29 @@
+# Makefile.am - two binaries crond and crontab
+
+bin_PROGRAMS = anacron
+
+anacron_SOURCES = \
+       gregor.c lock.c log.c main.c matchrx.c readtab.c runjob.c \
+       $(common_src)
+common_src = global.h gregor.h matchrx.h
+common_nodist = anacron-paths.h
+nodist_anacron_SOURCES = $(common_nodist)
+BUILT_SOURCES = $(common_nodist)
+
+
+LDADD = $(LIBSELINUX) $(LIBPAM) $(LIBAUDIT)
+
+# This header contains all the paths.
+# If they are configurable, they are declared in configure script.
+# Depends on this Makefile, because it uses make variables.
+anacron-paths.h: Makefile
+       @echo 'creating $@'
+       @sed >$@ 's/ *\\$$//' <<\END #\
+       /* This file has been automatically generated.  Do not edit. */ \
+       \
+       #ifndef _ANACRON_PATHS_H_ \
+       #define _ANACRON_PATHS_H_ \
+       #define ANACRON_SPOOL_DIR "$(ANACRON_SPOOL_DIR)" \
+       #define ANACRONTAB "$(ANACRONTAB)" \
+       #endif /* _ANACRON_PATHS_H_ */ \
+       END
index d459cea4302456ebaf5378b9ab220e06d958c324..91963a7896e61b4da75274b0053e52d1043fa760 100644 (file)
@@ -42,6 +42,7 @@
 #define MAX_MSG 150
 
 #include <signal.h>
+#include "anacron-paths.h"
 
 /* Some declarations */
 
index e7290cf7d4b53eeb34d845ee6fcbf99a89b60081..f5291789a58f198192309de0ee252a9a841ba8fe 100644 (file)
@@ -64,7 +64,7 @@ int range_stop = -1;
 static void
 print_version()
 {
-    printf("Anacron " RELEASE "\n"
+    printf("Anacron \n"
           "Copyright (C) 1998  Itai Tzur <itzur@actcom.co.il>\n"
           "Copyright (C) 1999  Sean 'Shaleh' Perry <shaleh@debian.org>\n"
           "Copyright (C) 2004  Pascal Hakim <pasc@redellipse.net>\n"
@@ -368,7 +368,7 @@ record_start_time()
     day_now = day_num(year, month, day_of_month);
     if (day_now == -1) die("Invalid date (this is really embarrassing)");
     if (!update_only && !testing_only)
-       explain("Anacron " RELEASE " started on %04d-%02d-%02d",
+       explain("Anacron started on %04d-%02d-%02d",
                year, month, day_of_month);
 }
 
@@ -469,7 +469,7 @@ main(int argc, char *argv[])
        anacrontab = strdup(ANACRONTAB);
 
     if (spooldir == NULL)
-       spooldir = strdup(SPOOLDIR);
+       spooldir = strdup(ANACRON_SPOOL_DIR);
 
     if ((cwd = open ("./", O_RDONLY)) == -1) {
        die_e ("Can't save current directory");
index 89b5f613f9a44f3b50818d880c9a7f05d8fd2194..dd29c69ff2462385507dbdef475c8036ff8b4dd6 100644 (file)
@@ -224,6 +224,10 @@ CRONIE_CONF_VAR([SYSCRONTAB], [the current working directory of the running daem
 CRONIE_CONF_VAR([SYS_CROND_DIR], [the current working directory of the running daemon], [${sysconfdir}/cron.d])
 CRONIE_CONF_VAR([SPOOL_DIR], [the directory where all the user cron tabs reside], [${localstatedir}/spool/cron])
 
-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile])
+CRONIE_CONF_VAR([ANACRON_SPOOL_DIR],[The path for anacron locks.],[${localstatedir}/spool/anacron])
+CRONIE_CONF_VAR([ANACRONTAB],[The anacron table for regular jobs.],[${sysconfdir}/regularly-jobs])
+
+
+AC_CONFIG_FILES([Makefile src/Makefile man/Makefile anacron/Makefile])
 AC_OUTPUT
 
diff --git a/regularly-jobs b/regularly-jobs
new file mode 100644 (file)
index 0000000..78c6f8c
--- /dev/null
@@ -0,0 +1,16 @@
+# /etc/anacrontab: configuration file for anacron
+
+# See anacron(8) and anacrontab(5) for details.
+
+SHELL=/bin/sh
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+# the maximal random delay added to the base delay of the jobs
+RANDOM_DELAY=45
+# the jobs will be started during the following hours only
+START_HOURS_RANGE=3-22
+
+#period in days   delay in minutes   job-identifier   command
+1      5       cron.daily              nice run-parts /etc/cron.daily
+7      25      cron.weekly             nice run-parts /etc/cron.weekly
+@monthly 45    cron.monthly            nice run-parts /etc/cron.monthly