From 58f824a51a3d59c54d24dd2e2a96afda4493b4b4 Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 17 Sep 2006 20:31:26 +0000 Subject: [PATCH] make rrdtool use rrd_config.h instead of config.h since this is just bound to lead to confusion when the wrong config.h gets sourced -- Guenter Knauf fix clean target in bindings directory git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@894 a5681a0c-68f1-0310-ab6d-d61299d08faa --- MakeMakefile | 1 + bindings/Makefile.am | 6 ++++-- bindings/perl-shared/RRDs.xs | 2 +- configure.ac | 10 +++++----- netware/Makefile | 9 ++++++--- src/getopt.c | 2 +- src/getopt1.c | 2 +- src/rrd_afm.c | 2 +- src/rrd_tool.h | 2 +- win32/Makefile | 19 +++++++++++-------- 10 files changed, 32 insertions(+), 23 deletions(-) diff --git a/MakeMakefile b/MakeMakefile index 26cc005..c6f02f4 100755 --- a/MakeMakefile +++ b/MakeMakefile @@ -63,4 +63,5 @@ $aclocal $automake --foreign --add-missing --force-missing --copy --warnings=all autoconf --warnings=all --force # one again to make every body happy + autoreconf diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 67df11f..2bd1a20 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -35,7 +35,9 @@ perl-shared/Makefile: perl-shared/Makefile.PL # LIBS="$(LDFLAGS) $(LIBS)" $(PERLFLAGS) $(PERL_MAKE_OPTIONS) clean-local: - test -f perl-piped/Makefile && cd perl-piped && $(MAKE) clean || rm perl-piped/Makefile || true - test -f perl-shared/Makefile && cd perl-shared && $(MAKE) clean || rm perl-shared/Makefile || true + test -f perl-piped/Makefile && cd perl-piped && $(MAKE) clean || true + test -f perl-piped/Makefile && rm perl-piped/Makefile || true + test -f perl-shared/Makefile && cd perl-shared && $(MAKE) clean || true + test -f perl-shared/Makefile && rm -f perl-shared/Makefile || true ##END## diff --git a/bindings/perl-shared/RRDs.xs b/bindings/perl-shared/RRDs.xs index 76f86b8..f84efef 100644 --- a/bindings/perl-shared/RRDs.xs +++ b/bindings/perl-shared/RRDs.xs @@ -24,7 +24,7 @@ extern "C" { */ #define VERSION_SAVED VERSION #undef VERSION -#include "../../config.h" +#include "../../rrd_config.h" #include "../../src/rrd_tool.h" #undef VERSION #define VERSION VERSION_SAVED diff --git a/configure.ac b/configure.ac index e50796e..a6cd1e6 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ NUMVERS=1.2015 AC_SUBST(NUMVERS) AC_CANONICAL_TARGET AM_INIT_AUTOMAKE -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_HEADERS([rrd_config.h]) dnl all our local stuff like install scripts and include files dnl is in there @@ -37,8 +37,8 @@ dnl At the TOP of the HEADER AH_TOP([ -#ifndef CONFIG_H -#define CONFIG_H +#ifndef RRD_CONFIG_H +#define RRD_CONFIG_H /* IEEE can be prevented from raising signals with fpsetmask(0) */ #undef MUST_DISABLE_FPMASK @@ -149,7 +149,7 @@ char *strchr (), *strrchr (); #error "Can't compile without isinf function" #endif -#endif /* CONFIG_H */ +#endif /* RRD_CONFIG_H */ ]) dnl Process Special Options @@ -573,7 +573,7 @@ AC_OUTPUT AC_MSG_CHECKING(in) AC_MSG_RESULT(and out again) -echo $ECHO_N "ordering CD from http://people.ee.ethz.ch/oetiker/wish $ECHO_C" 1>&6 +echo $ECHO_N "ordering CD from http://tobi.oetiker.ch/wish $ECHO_C" 1>&6 sleep 1 echo $ECHO_N ".$ECHO_C" 1>&6 sleep 1 diff --git a/netware/Makefile b/netware/Makefile index a38ac70..c2aecaf 100644 --- a/netware/Makefile +++ b/netware/Makefile @@ -426,15 +426,17 @@ ifeq ($(LD),nlmconv) @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@ endif -$(PROOT)/config.h: Makefile +$(PROOT)/rrd_config.h: Makefile @echo Creating $@ - @echo $(DL)/* $@ for NetWare target.$(DL) > $@ + @echo $(DL)/* $(notdir $@) for NetWare target.$(DL) > $@ @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@ @echo $(DL)** All your changes will be lost!!$(DL) >> $@ @echo $(DL)*/$(DL) >> $@ @echo $(DL)#ifndef NETWARE$(DL) >> $@ - @echo $(DL)#error This config.h is created for NetWare platform!$(DL) >> $@ + @echo $(DL)#error This $(notdir $@) is created for NetWare platform!$(DL) >> $@ @echo $(DL)#endif$(DL) >> $@ + @echo $(DL)#ifndef RRD_CONFIG_H$(DL) >> $@ + @echo $(DL)#define RRD_CONFIG_H$(DL) >> $@ @echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@ @echo $(DL)#define PACKAGE_VERSION "$(RRD_VERSION_STR)"$(DL) >> $@ @echo $(DL)#define PACKAGE_BUGREPORT "tobi@oetiker.ch"$(DL) >> $@ @@ -500,6 +502,7 @@ endif ifdef WITH_PIECHART @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@ endif + @echo $(DL)#endif /* RRD_CONFIG_H */$(DL) >> $@ $(DISTDIR)/readme.txt: Makefile @echo Creating $@ diff --git a/src/getopt.c b/src/getopt.c index c1fd726..a2179c6 100644 --- a/src/getopt.c +++ b/src/getopt.c @@ -31,7 +31,7 @@ #endif #ifdef HAVE_CONFIG_H -#include +#include "../rrd_config.h" #endif #if !defined (__STDC__) || !__STDC__ diff --git a/src/getopt1.c b/src/getopt1.c index 8347bb1..d26b584 100644 --- a/src/getopt1.c +++ b/src/getopt1.c @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H -#include +#include "../rrd_config.h" #endif #include "getopt.h" diff --git a/src/rrd_afm.c b/src/rrd_afm.c index f7eea89..fec18df 100644 --- a/src/rrd_afm.c +++ b/src/rrd_afm.c @@ -8,7 +8,7 @@ #include "../win32/config.h" #else #ifdef HAVE_CONFIG_H -#include "config.h" +#include "../rrd_config.h" #endif #endif diff --git a/src/rrd_tool.h b/src/rrd_tool.h index c554099..bb96194 100644 --- a/src/rrd_tool.h +++ b/src/rrd_tool.h @@ -15,7 +15,7 @@ extern "C" { #include "../win32/config.h" #else #ifdef HAVE_CONFIG_H -#include +#include "../rrd_config.h" #endif #endif diff --git a/win32/Makefile b/win32/Makefile index 7ed9c76..5c086a5 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -229,9 +229,9 @@ LDLIBS += $(LIBFT2)/objs/freetype.$(LIBEXT) all: rrdtool rrdcgi -rrdtool: $(OBJDIR) $(PROOT)/config.h $(OBJDIR)/rrdtool.exe -rrdcgi: $(OBJDIR) $(PROOT)/config.h $(OBJDIR)/rrdcgi.$(CGIEXT) -librrd: $(OBJDIR) $(PROOT)/config.h $(OBJDIR)/librrd.$(LIBEXT) +rrdtool: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/rrdtool.exe +rrdcgi: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/rrdcgi.$(CGIEXT) +librrd: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/librrd.$(LIBEXT) dist: all $(DISTDIR) $(DISTDIR)/readme.txt # @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DISTDIR) @@ -251,7 +251,7 @@ dev: librrd $(DEVLDIR) $(DEVLDIR)/readme.txt @-mkdir $(DEVLDIR)$(DS)lib @-mkdir $(DEVLDIR)$(DS)src @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DEVLDIR)/lib - @-$(CP) $(PROOT)/config.h $(DEVLDIR)/include + @-$(CP) $(PROOT)/rrd_config.h $(DEVLDIR)/include @-$(CP) $(PROOT)/src/rrd.h $(DEVLDIR)/include @-$(CP) $(PROOT)/src/*.ttf $(DEVLDIR)/src @-$(CP) $(PROOT)/CHANGES $(DEVLDIR) @@ -264,7 +264,7 @@ dev: librrd $(DEVLDIR) $(DEVLDIR)/readme.txt clean: -$(RM) -r $(OBJDIR) - -$(RM) $(PROOT)/config.h + -$(RM) $(PROOT)/rrd_config.h distclean: clean -$(RM) -r $(DISTDIR) @@ -347,15 +347,17 @@ ifdef ICON @echo 10 ICON DISCARDABLE "$(ICON)" >> $@ endif -$(PROOT)/config.h: Makefile $(OBJDIR)/version.inc +$(PROOT)/rrd_config.h: Makefile $(OBJDIR)/version.inc @echo Creating $@ - @echo $(DL)/* $@ for Win32 target.$(DL) > $@ + @echo $(DL)/* $(notdir $@) for Win32 target.$(DL) > $@ @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@ @echo $(DL)** All your changes will be lost!!$(DL) >> $@ @echo $(DL)*/$(DL) >> $@ @echo $(DL)#ifndef WIN32$(DL) >> $@ - @echo $(DL)#error This config.h is created for Win32 platform!$(DL) >> $@ + @echo $(DL)#error This $(notdir $@) is created for Win32 platform!$(DL) >> $@ @echo $(DL)#endif$(DL) >> $@ + @echo $(DL)#ifndef RRD_CONFIG_H$(DL) >> $@ + @echo $(DL)#define RRD_CONFIG_H$(DL) >> $@ @echo $(DL)#define OS "i586-pc-Win32"$(DL) >> $@ @echo $(DL)#define PACKAGE_VERSION "$(RRD_VERSION_STR)"$(DL) >> $@ @echo $(DL)#define PACKAGE_BUGREPORT "tobi@oetiker.ch"$(DL) >> $@ @@ -415,6 +417,7 @@ endif ifdef WITH_PIECHART @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@ endif + @echo $(DL)#endif /* RRD_CONFIG_H */$(DL) >> $@ $(DISTDIR)/readme.txt: Makefile @echo Creating $@ -- 2.11.0