# generic utility modules # (c) 2001 jannet it services # contact@jannet.de # $Id$ CONFIG_ACDONE := $(wildcard config.acdone) DISTCLEAN += configure config.log autoscan.log configure.ac config.status AC_FILES_IN = $(shell find . -maxdepth 2 -name '*.in' | grep -ve "contrib\|dist\|nomake") AC_FILES = $(basename $(AC_FILES_IN)) CAT ?= /bin/cat SED ?= $(firstword $(wildcard /usr/bin/sed /bin/sed)) all: config.acdone make_all config: config.acdone $(AC_FILES) install: config $(AC_FILES) make_install distclean: confclean acclean rpm-release: config.acdone make_rpm_release make_all: config $(AC_FILES) if [ -z "$(CONFIG_ACDONE)" ]; then make all; fi make_rpm_release: config $(AC_FILES) if [ -z "$(CONFIG_ACDONE)" ]; then make rpm-release; fi make_install: if [ -z "$(CONFIG_ACDONE)" ]; then make $@; fi confclean: rm -rf $(DISTCLEAN) $(CLEAN) $(AC_FILES) autom4te.cache configure.ac: configure.ac.tmpl VERSION $(CAT) $< | $(SED) -e "s/_VERSION_/`$(CAT) VERSION | $(SED) 's/-dev//'`/" > $@ configure: configure.ac autoconf $< > $@ chmod 755 $@ config.status: configure ./configure --no-create $(CONFIGURE_OPTS) config.acdone: config.status ./config.status touch $@ $(TOPDIR)/make/%.mk: $(TOPDIR)/make/%.mk.in config.status ./config.status $@ touch $@ $(TOPDIR)/include/%.h: $(TOPDIR)/include/%.h.in config.status ./config.status $@ touch $@ acclean: rm -f *.acdone