From: mquinson Date: Mon, 24 Sep 2007 14:33:53 +0000 (+0000) Subject: Auto apply the changes needed to port flexml to windows: there is no unistd.h there. X-Git-Tag: v3.3~1092 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ae9dd98bc4600e591fca903341d35d7cce68fe26 Auto apply the changes needed to port flexml to windows: there is no unistd.h there. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4699 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/Makefile.am b/src/Makefile.am index c2bec8ab9e..a78d849167 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -438,8 +438,10 @@ gras/DataDesc/ddt_parse.yy.c: gras/DataDesc/ddt_parse.yy.l if MAINTAINER_MODE surf/surfxml.c: surf/surfxml.l set -e;mkdir -p `dirname $@`; @LEX@ -o$@ -Psurf_parse_ --noline $^ + sed 's/#include /#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)\n# ifndef __STRICT_ANSI__\n# include \n# include \n# endif\n#else\n# include \n#endif/g' -i $@ xbt/graphxml.c: xbt/graphxml.l set -e;mkdir -p `dirname $@`; @LEX@ -o$@ -Pxbt_graph_parse_ --noline $^ + sed 's/#include /#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)\n# ifndef __STRICT_ANSI__\n# include \n# include \n# endif\n#else\n# include \n#endif/g' -i $@ if HAVE_FLEXML surf/surfxml.l: $(srcdir)/surf/surfxml.dtd @@ -449,7 +451,6 @@ $(top_srcdir)/include/surf/surfxml.h: $(srcdir)/surf/surfxml.dtd sed 's/extern *\([^ ]*[ \*]*\)/XBT_PUBLIC_DATA(\1) /' -i $@ sed 's/XBT_PUBLIC_DATA(\([^)]*\)) *\([^(]*\)(/XBT_PUBLIC(\1) \2(/' -i $@ - xbt/graphxml.l: $(srcdir)/xbt/graphxml.dtd set -e; flexml -b 1000000 -P graphxml --sysid=graphxml.dtd -S $@ -L $^ $(top_srcdir)/include/xbt/graphxml.h: $(srcdir)/xbt/graphxml.dtd diff --git a/src/Makefile.in b/src/Makefile.in index 21e7bacac4..0c414acd50 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -2348,8 +2348,10 @@ uninstall-am: uninstall-binSCRIPTS uninstall-jarDATA \ @GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@surf/surfxml.c: surf/surfxml.l @GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@ set -e;mkdir -p `dirname $@`; @LEX@ -o$@ -Psurf_parse_ --noline $^ +@GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@ sed 's/#include /#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)\n# ifndef __STRICT_ANSI__\n# include \n# include \n# endif\n#else\n# include \n#endif/g' -i $@ @GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@xbt/graphxml.c: xbt/graphxml.l @GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@ set -e;mkdir -p `dirname $@`; @LEX@ -o$@ -Pxbt_graph_parse_ --noline $^ +@GRAMINE_MODE_FALSE@@MAINTAINER_MODE_TRUE@ sed 's/#include /#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__TOS_WIN__)\n# ifndef __STRICT_ANSI__\n# include \n# include \n# endif\n#else\n# include \n#endif/g' -i $@ @GRAMINE_MODE_FALSE@@HAVE_FLEXML_TRUE@@MAINTAINER_MODE_TRUE@surf/surfxml.l: $(srcdir)/surf/surfxml.dtd @GRAMINE_MODE_FALSE@@HAVE_FLEXML_TRUE@@MAINTAINER_MODE_TRUE@ set -e; mkdir -p surf; flexml -b 1000000 -P surfxml --sysid=surfxml.dtd -S $@ -L $^