distributed config && float library

This commit is contained in:
Vítor Santos Costa
2013-11-03 14:12:38 +00:00
parent e84540b4f0
commit e423fc28e5
85 changed files with 68816 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
GECODEDIR := $(shell g++ $(CPPFLAGS) $(CXXFLAGS) -H -E gecodedir.hh 2>&1 >/dev/null | grep gecode/kernel.hh | awk '{print $$2}' | sed 's|/kernel.hh||')
GECODECONFIG := $(GECODEDIR)/support/config.hpp
GECODEVERSION := $(shell cat $(GECODECONFIG) | egrep '\<GECODE_VERSION\>' | awk '{print $$3}' | sed 's/"//g')
PROTOTYPES = ../gecode-prototypes-$(GECODEVERSION).hh
ENUMS = ../gecode-enums-$(GECODEVERSION).py
all: $(PROTOTYPES) $(ENUMS)
$(PROTOTYPES): % : xml/namespaceGecode.xml extract-prototypes.xsl
cat notice.hh > $@ || { rm -f $@; exit 1; }
xsltproc extract-prototypes.xsl $< \
| grep EXPORT \
| grep -v Symmetry \
| sed 's/Gecode:://g' \
| sed 's/< /</g' \
| sed 's/ >/>/g' \
| sed 's/ \&/\&/g' \
| sed 's/, /,/g' \
| sed 's/forceinline //g' \
| sed 's/GECODE_INT_EXPORT //g' \
| sed 's/GECODE_FLOAT_EXPORT //g' \
| sed 's/GECODE_SET_EXPORT //g' \
| grep -v '*' | sort >> $@ || { rm -f $@; exit 1; }
$(ENUMS): % : xml/namespaceGecode.xml extract-enums.xsl
cat notice.py > $@ || { rm -f $@; exit 1; }
xsltproc extract-enums.xsl $< >> $@ || { rm -f $@; exit 1; }
xml/namespaceGecode.xml: Doxyfile
doxygen Doxyfile
Doxyfile: Doxyfile.in
cat $< | sed "s#@GECODEDIR@#$(GECODEDIR)#" > $@ || { rm -f $@; exit 1; }
clean:
-rm -rf *~ gecode-prototypes-*.hh gecode-enums-*.py Doxyfile xml

View File

@@ -0,0 +1,2 @@
This directory contains support code for automatically extracting
prototypes from the local Gecode installation.

View File

@@ -0,0 +1,31 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" version="1.0"/>
<xsl:template match="/">
<xsl:text>ENUM_CLASSES = []
</xsl:text>
<xsl:for-each select="/doxygen/compounddef/sectiondef[@kind='enum']/memberdef">
<xsl:text>class </xsl:text>
<xsl:value-of select="name"/>
<xsl:text>(object):
</xsl:text>
<xsl:text> TYPE = '</xsl:text>
<xsl:value-of select="name"/>
<xsl:text>'
ENUM = [</xsl:text>
<xsl:for-each select="enumvalue">
<xsl:if test="position()!=1"><xsl:text>,</xsl:text></xsl:if>
<xsl:text>'</xsl:text>
<xsl:value-of select="name"/>
<xsl:text>'</xsl:text>
</xsl:for-each>
<xsl:text>]
ENUM_CLASSES.append(</xsl:text>
<xsl:value-of select="name"/>
<xsl:text>)
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1,21 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" version="1.0"/>
<xsl:template match="/">
<xsl:for-each select="/doxygen/compounddef/sectiondef[@kind='func']/memberdef[starts-with(@id,'group__TaskModel') and not(starts-with(name,'operator')) and name!='tiebreak' and name!='wait' and not(starts-with(@id,'group__TaskModelMiniModel'))]">
<xsl:value-of select="type"/>
<xsl:text> </xsl:text>
<xsl:value-of select="name"/>
<xsl:for-each select="param">
<xsl:if test="position()=1"><xsl:text>(</xsl:text></xsl:if>
<xsl:if test="position()!=1"><xsl:text>,</xsl:text></xsl:if>
<xsl:value-of select="type"/>
<xsl:for-each select="defval">
<xsl:text>=</xsl:text>
<xsl:value-of select="."/>
</xsl:for-each>
</xsl:for-each>
<xsl:text>);
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

View File

@@ -0,0 +1 @@
#include "gecode/kernel.hh"

View File

@@ -0,0 +1,3 @@
// This file was automatically extracted from Gecode source files.
// It is subject to the same Copyright as the source files from which
// it is derived, and is distributed under the same Licensing conditions.

View File

@@ -0,0 +1,3 @@
# This file was automatically extracted from Gecode source files.
# It is subject to the same Copyright as the source files from which
# it is derived, and is distributed under the same Licensing conditions.