Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
React sainly when flexml is not installed
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 14 Apr 2005 08:30:58 +0000 (08:30 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 14 Apr 2005 08:30:58 +0000 (08:30 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1213 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/Makefile.am

index 9dd8414..9defdbd 100644 (file)
@@ -160,13 +160,21 @@ if MAINTAINER_MODE
 surf/surfxml.c: surf/surfxml.l
        @LEX@ -o$@ -Psurf_parse_ $^
 
 surf/surfxml.c: surf/surfxml.l
        @LEX@ -o$@ -Psurf_parse_ $^
 
+if HAVE_FLEXML
 surf/surfxml.l: surf/surfxml.dtd
        set -e; cd surf; flexml -b 1000000 -S -L surfxml.dtd ; \
        mv surfxml.l surfxml.l.bak ; \
        sed 's/surfxml\.h/surf\/surfxml\.h/g' surfxml.l.bak > surfxml.l
 surf/surfxml.l: surf/surfxml.dtd
        set -e; cd surf; flexml -b 1000000 -S -L surfxml.dtd ; \
        mv surfxml.l surfxml.l.bak ; \
        sed 's/surfxml\.h/surf\/surfxml\.h/g' surfxml.l.bak > surfxml.l
-
 include/surf/surfxml.h: surf/surfxml.dtd
        cd include/surf; flexml -H -L ../../surf/surfxml.dtd
 include/surf/surfxml.h: surf/surfxml.dtd
        cd include/surf; flexml -H -L ../../surf/surfxml.dtd
+else
+
+include/surf/surfxml.h surf/surfxml.l: surf/surfxml.dtd
+       @echo "ERROR: src/surf/surfxml.dtd was modified, but the flexml program was not detected"
+       @echo "ERROR: Please install it, or if you didn't modify this file, try this:"
+       @echo "ERROR:   touch src/include/surf/surfxml.h src/surf/surfxml.l"
+       @exit 1
+endif
 endif
 
 libgras_la_SOURCES= $(COMMON_SRC) $(RL_SRC)
 endif
 
 libgras_la_SOURCES= $(COMMON_SRC) $(RL_SRC)