Gecode 5.0.0
This commit is contained in:
5
packages/gecode/dev/Makefile
Normal file
5
packages/gecode/dev/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
all:
|
||||
python code-generator.py
|
||||
|
||||
clean:
|
||||
-rm -f *~ *.pyc
|
20
packages/gecode/dev/code-generator.py
Normal file → Executable file
20
packages/gecode/dev/code-generator.py
Normal file → Executable file
@@ -6,12 +6,12 @@
|
||||
# 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.
|
||||
#
|
||||
#
|
||||
# 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, see <http://www.gnu.org/licenses/>.
|
||||
#==============================================================================
|
||||
@@ -26,12 +26,12 @@ NOTICE_CC = """// -*- c++ -*-
|
||||
// under the terms of the GNU Lesser General Public License as published by the
|
||||
// Free Software Foundation, either version 3 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 Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//=============================================================================
|
||||
@@ -45,12 +45,12 @@ NOTICE_PROLOG="""%% -*- prolog -*-
|
||||
%% under the terms of the GNU Lesser General Public License as published by the
|
||||
%% Free Software Foundation, either version 3 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 Lesser General Public License
|
||||
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
%%=============================================================================
|
||||
@@ -120,7 +120,7 @@ class Type(object):
|
||||
|
||||
def clone(self):
|
||||
return type(self)(self)
|
||||
|
||||
|
||||
|
||||
class Constraint(object):
|
||||
|
||||
@@ -165,7 +165,7 @@ class Constraint(object):
|
||||
|
||||
def clone(self):
|
||||
return type(self)(self)
|
||||
|
||||
|
||||
|
||||
COMMENT = re.compile("""^\\s*//.*$""")
|
||||
|
||||
@@ -598,7 +598,7 @@ class YAPEnumProlog(object):
|
||||
print
|
||||
|
||||
class YAPEnumPrologGenerator(object):
|
||||
|
||||
|
||||
def generate(self):
|
||||
for c in enum_classes():
|
||||
class C(c,YAPEnumProlog): pass
|
||||
@@ -677,7 +677,7 @@ def gecode_version():
|
||||
os.remove(file_hh)
|
||||
os.remove(file_txt)
|
||||
else:
|
||||
version = "4.4.0"
|
||||
version = "5.0.0"
|
||||
GECODE_VERSION = version
|
||||
return version
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
38
packages/gecode/dev/extractor/Makefile
Normal file
38
packages/gecode/dev/extractor/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
GECODEDIR := $(shell g++ $(CPPFLAGS) $(CXXFLAGS) -H -E gecodedir.hh 2>&1 >/dev/null | grep gecode/kernel.hh | awk '{print $$2}' | sed 's|/kernel.hh||')
|
||||
GECODEDIR=/usr/local/opt/gecode
|
||||
GECODECONFIG := $(GECODEDIR)/support/config.hpp
|
||||
GECODEVERSION := $(shell cat $(GECODECONFIG) | egrep '\<GECODE_VERSION\>' | awk '{print $$3}' | sed 's/"//g')
|
||||
GECODEVERSION="5.0.0"
|
||||
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
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user