m4datadir = $(datadir)/aclocal
m4data_DATA = libt2n.m4
-EXTRA_DIST = AUTHORS ChangeLog LICENSE COPYING.GPL $(m4data_DATA) test-build-install-use
+bin_SCRIPTS = libt2n-gccxml.sh
+
+EXTRA_DIST = AUTHORS ChangeLog LICENSE COPYING.GPL $(m4data_DATA) test-build-install-use libt2n-gccxml.sh
server.cpp $(t2nexample_GROUP) \
t2nexample_server.cpp
+# Make libt2n-gccxml.sh available
+# as libt2n is not installed yet
+PATH := $(top_srcdir):$(PATH)
+
# include Makefile snippet doing all the magic
include codegen.make
echo '#include "$*.hxx"' >> $*_common.hxx;
# todo use tmp file for xml file
for i in $($*_GROUP); do \
- gccxml $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(srcdir)/$${i} -fxml=$${i%*.cpp}.xml; \
+ libt2n-gccxml.sh $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(srcdir)/$${i} -fxml=$${i%*.cpp}.xml; \
done && $(LIBT2N_CODEGEN) $* $($*_GROUP:.cpp=.xml) && for i in $($*_GROUP); do \
rm $${i%*.cpp}.xml; \
done && touch $@
EXTRA_DIST = $(TESTS)
+# Make libt2n-gccxml.sh available
+# as libt2n is not installed yet
+PATH := $(top_srcdir):$(PATH)
+
# if you use libt2n-codegen you should add this
# (i did not find a nice way to let libt2n install this makefile snippet
# and let projects using libt2n use the installed version.
echo '#include "$*.hxx"' >> $*_common.hxx;
# todo use tmp file for xml file
for i in $($*_GROUP); do \
- gccxml $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(srcdir)/$${i} -fxml=$${i%*.cpp}.xml; \
+ libt2n-gccxml.sh $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(srcdir)/$${i} -fxml=$${i%*.cpp}.xml; \
done && $(LIBT2N_CODEGEN) $* $($*_GROUP:.cpp=.xml) && for i in $($*_GROUP); do \
rm $${i%*.cpp}.xml; \
done && touch $@
all-local: minimalistic-server.xml
minimalistic-server.xml: minimalistic-server.cpp
- gccxml $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(srcdir)/minimalistic-server.cpp -fxml=minimalistic-server.xml
+ $(top_srcdir)/libt2n-gccxml.sh $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(srcdir)/minimalistic-server.cpp -fxml=minimalistic-server.xml
CLEANFILES = minimalistic-server.xml
--- /dev/null
+#!/bin/sh
+
+# Filter "-pthread" option from newer gcc versions
+# as it's currently unsupported in gccxml.
+EOO=0
+while [[ $1 ]]; do
+if ! ((EOO)); then
+ case "$1" in
+ -pthread)
+ shift
+ ;;
+ --)
+ EOO=1
+ OPTIONS+=("$1")
+ shift
+ ;;
+ *)
+ OPTIONS+=("$1")
+ shift
+ ;;
+ esac
+else
+ OPTIONS+=("$1")
+ shift
+fi
+done
+
+gccxml "${OPTIONS[@]}"
%doc ChangeLog doc examples examples-codegen
%defattr(-,root,root)
%{prefix}/bin/libt2n-codegen
+%{prefix}/bin/libt2n-gccxml.sh
%{prefix}/lib/*.*a*
%{prefix}/lib/pkgconfig/*.pc
%{prefix}/include/