# -*-Makefile-*- # # Main authors: # Christian Schulte # Guido Tack # Grégoire Dooms # # # Copyright: # Christian Schulte, 2005 # Guido Tack, 2005 # Grégoire Dooms, 2005 # # Last modified: # $Date: 2005-11-01 16:01:21 +0100 (Tue, 01 Nov 2005) $ by $Author: zayenz $ # $Revision: 2465 $ # # This file is part of Gecode, the generic constraint # development environment: # http://www.gecode.org # # See the file "LICENSE" for information on usage and # redistribution of this file, and for a # DISCLAIMER OF ALL WARRANTIES. # CONTRIBS := $(shell ls -d contribs/* 2>/dev/null ) #CONTRIBS := $(shell find contribs -mindepth 1 -maxdepth 1 -type d 2>/dev/null) CONTRIBCONFIGURES := $(shell ls contribs/*/configure 2>/dev/null | sed 's|/configure||') CONTRIBVTIS := $(shell ls contribs/*/vti.ac 2>/dev/null| sed 's|/vti.ac||') CONTRIBDESCS := $(shell ls contribs/*/shortdesc.ac 2>/dev/null | sed 's|/shortdesc.ac||') contribdirs: @rm -f configure.ac @(echo "dnl This file was generated by Makefile.contribs."; \ echo "dnl Do not edit! Modifications will get lost!"; \ echo "dnl Edit configure.ac.in instead."; echo ""; \ cat configure.ac.in \ ) > configure.ac @for i in $(CONTRIBS); do \ if test ! -d $$i ; then continue ; fi; \ if test -f $$i.dis* ; then \ echo "Skipping disabled contrib $$i"; \ elif test -f $$i/configure -a '(' -f $$i/vti.ac -o -f $$i/shortdesc.ac ')' ; then \ mv configure.ac configure.ac.1; \ sed -e "s|\(dnl @SUBDIRS@\)|AC_CONFIG_SUBDIRS($$i) \1|g" \ configure.ac.1 > configure.ac; \ if test -f $$i/vti.ac ; then \ echo "Add variable contrib from $$i"; \ mv configure.ac configure.ac.1; \ (sed -e "s|\(dnl @VTIS@\)|m4_include($$i/vti.ac) \1|g" \ configure.ac.1 > configure.ac); \ else \ mv configure.ac configure.ac.1; \ echo "Add contrib from $$i"; \ DESC="`head -n 1 $$i/shortdesc.ac`"; \ sed -e "s|\(dnl @CONTRIBS@\)|AC_GECODE_ENABLE_CONTRIB($${i/*\/},\"$$DESC\",[]) \1|g" \ configure.ac.1 > configure.ac; \ fi ;\ else \ if test ! -f $$i/configure; then \ echo "Skipping contrib $$i : no configure script"; \ else \ echo "Skipping contrib $$i : no shortdescr.ac or vti.ac file "; \ fi; \ fi;\ done @rm -f configure.ac.1 @echo Running autoconf on generated configure.ac ... @autoconf @echo done.