This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/library/gecode/dev/extractor/Makefile

34 lines
1.2 KiB
Makefile
Raw Normal View History

2011-08-08 14:21:36 +01:00
GECODEDIR := $(shell g++ -q $(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
2011-12-01 20:54:39 +00:00
GECODEVERSION := $(shell cat $(GECODECONFIG) | egrep '\<GECODE_VERSION\>' | awk '{print $$3}' | sed 's/"//g')
PROTOTYPES = ../gecode-prototypes-$(GECODEVERSION).hh
ENUMS = ../gecode-enums-$(GECODEVERSION).py
2011-08-08 14:21:36 +01:00
all: $(PROTOTYPES) $(ENUMS)
$(PROTOTYPES): % : xml/namespaceGecode.xml extract-prototypes.xsl
2011-08-30 14:44:22 +01:00
cat notice.hh > $@ || { rm -f $@; exit 1; }
2011-08-08 14:21:36 +01:00
xsltproc extract-prototypes.xsl $< \
| 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_SET_EXPORT //g' \
2011-08-30 14:44:22 +01:00
| grep -v '*' | sort >> $@ || { rm -f $@; exit 1; }
2011-08-08 14:21:36 +01:00
$(ENUMS): % : xml/namespaceGecode.xml extract-enums.xsl
2011-08-30 14:44:22 +01:00
cat notice.py > $@ || { rm -f $@; exit 1; }
xsltproc extract-enums.xsl $< >> $@ || { rm -f $@; exit 1; }
2011-08-08 14:21:36 +01:00
xml/namespaceGecode.xml: Doxyfile
doxygen Doxyfile
Doxyfile: Doxyfile.in
2011-08-30 14:44:22 +01:00
cat $< | sed "s#@GECODEDIR@#$(GECODEDIR)#" > $@ || { rm -f $@; exit 1; }
2011-08-08 14:21:36 +01:00
clean:
-rm -rf *~ gecode-prototypes-*.hh gecode-enums-*.py Doxyfile xml