From aaf2ef477a8130dece4989e33ceb31706cb122de Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 3 Feb 2011 23:40:29 +0100 Subject: [PATCH] Remove misc_autogen.h. --- .gitignore | 1 - Makefile | 6 +----- README | 4 ---- misc.h | 20 ++++++++++++++++++-- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 9dea7c1..b9e6098 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ core vgcore.* localversion -misc_autogen.h loba loba-dev diff --git a/Makefile b/Makefile index ff9ad97..f142b37 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ CC := gcc CXX := g++ CPPFLAGS += -I $(SIMGRID_INSTALL_DIR)/include +CPPFLAGS += -D XBT_LOG_OLD_STYLE CPPFLAGS += $(CHECK_FLAGS) #CFLAGS += -std=c99 @@ -73,7 +74,6 @@ xml: $(XML_DEV_FILES) clean: $(RM) core core.[0-9]* vgcore.[0-9]* - $(RM) misc_autogen.h $(RM) localversion $(RM) $(OBJ) $(RM) $(DEP) @@ -95,10 +95,6 @@ $(FLAVOURED_LOBA): mv -f -- loba $@ $(MAKE) clean -misc_autogen.h: $(SIMGRID_INSTALL_DIR)/include/xbt/log.h - grep '# *define *\(XBT_\)\?CLOG.*_XBT_LOGV' $< \ - | sed 's/CLOG/XCLOG/;s/_XBT_LOGV\(([^)]*)\)/(*\1)/' > $@ - version.o: $(patsubst %.cpp,%.o,$(filter-out version.cpp, $(SRC.loba))) ifeq ($(filter $(MAKECMDGOALS),full clean realclean $(FLAVOURED_LOBA)),) diff --git a/README b/README index bf2d915..7db502a 100644 --- a/README +++ b/README @@ -177,10 +177,6 @@ Liste de fichiers version.h gestion de la version du programme version.cpp -* fichiers auto-générés - - misc_autogen.h définition des macros XCLOG(...) - * scripts colorized-loba script pour exécuter loba en colorant les diff --git a/misc.h b/misc.h index 974f666..84f3ca1 100644 --- a/misc.h +++ b/misc.h @@ -13,9 +13,25 @@ /* Defines XCLOGn(...) which behave like CLOGn(...), except that the * given category is not passed through _XBT_LOGV before use. - * (auto-generated, like its name says...) */ -#include "misc_autogen.h" +#ifdef XBT_CLOG_ +# define XBT_XCLOG(c, p, ...) XBT_CLOG_((*(c)), p, __VA_ARGS__) +# define XCLOG0(...) XBT_XCLOG(__VA_ARGS__) +# define XCLOG1(...) XBT_XCLOG(__VA_ARGS__) +# define XCLOG2(...) XBT_XCLOG(__VA_ARGS__) +# define XCLOG3(...) XBT_XCLOG(__VA_ARGS__) +# define XCLOG4(...) XBT_XCLOG(__VA_ARGS__) +# define XCLOG5(...) XBT_XCLOG(__VA_ARGS__) +# define XCLOG6(...) XBT_XCLOG(__VA_ARGS__) +#else +# define XCLOG0(c, p, f) _XBT_LOG_PRE((*(c)),p) ,f _XBT_LOG_POST +# define XCLOG1(c, p, f,a1) _XBT_LOG_PRE((*(c)),p) ,f,a1 _XBT_LOG_POST +# define XCLOG2(c, p, f,a1,a2) _XBT_LOG_PRE((*(c)),p) ,f,a1,a2 _XBT_LOG_POST +# define XCLOG3(c, p, f,a1,a2,a3) _XBT_LOG_PRE((*(c)),p) ,f,a1,a2,a3 _XBT_LOG_POST +# define XCLOG4(c, p, f,a1,a2,a3,a4) _XBT_LOG_PRE((*(c)),p) ,f,a1,a2,a3,a4 _XBT_LOG_POST +# define XCLOG5(c, p, f,a1,a2,a3,a4,a5) _XBT_LOG_PRE((*(c)),p) ,f,a1,a2,a3,a4,a5 _XBT_LOG_POST +# define XCLOG6(c, p, f,a1,a2,a3,a4,a5,a6) _XBT_LOG_PRE((*(c)),p) ,f,a1,a2,a3,a4,a5,a6 _XBT_LOG_POST +#endif /* Returns c-string "s" if n > 1, empty string "" otherwise. */ #define ESSE(n) ((n) > 1 ? misc::str_esse : misc::str_nil) -- 2.39.5