From 5150bd4888d27d4fa8f9e08a52e40a1abf6e850a Mon Sep 17 00:00:00 2001 From: kuepper Date: Tue, 21 Sep 2004 10:23:33 +0000 Subject: [PATCH] fix 'make dist', works now (besides ParadisEO). --- eo/.cvsignore | 1 + eo/app/Makefile.am | 10 ----- eo/app/gpsymreg/Makefile.am | 17 ++++---- eo/app/mastermind/Makefile.am | 23 ++++------- eo/contrib/Makefile.am | 4 +- eo/src/utils/Makefile.am | 10 ++--- eo/src/utils/eoRealBounds.cpp | 5 ++- eo/src/utils/eoState.cpp | 6 ++- eo/src/utils/eoUpdater.cpp | 4 ++ eo/test/Makefile.am | 73 +++++++++++++++++---------------- eo/test/t-eoVirus.cpp | 6 +-- eo/tutorial/Lesson5/Makefile.am | 5 +-- 12 files changed, 79 insertions(+), 85 deletions(-) diff --git a/eo/.cvsignore b/eo/.cvsignore index 2073b8c3..b7e78ecc 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -6,6 +6,7 @@ Makefile Makefile.in aclocal.m4 autom4te.cache +build* confdefs.h config.cache config.cache diff --git a/eo/app/Makefile.am b/eo/app/Makefile.am index 65036834..578f94dc 100644 --- a/eo/app/Makefile.am +++ b/eo/app/Makefile.am @@ -5,13 +5,3 @@ ############################################################################### SUBDIRS = mastermind gpsymreg - -############################################################################### - -all: - for i in $(SUBDIRS); do cd $$i && $(MAKE) all; cd ..; done - -clean: - for i in $(SUBDIRS); do cd $$i && $(MAKE) clean; cd ..; done - -############################################################################### diff --git a/eo/app/gpsymreg/Makefile.am b/eo/app/gpsymreg/Makefile.am index 0e9032cd..ad9744c5 100644 --- a/eo/app/gpsymreg/Makefile.am +++ b/eo/app/gpsymreg/Makefile.am @@ -4,14 +4,17 @@ # ############################################################################### -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a +bin_PROGRAMS = gpsymreg + +gpsymreg_SOURCES = main.cpp + +noinst_HEADERS = fitness.h node.h parameters.h -bin_PROGRAMS = gpsymreg +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -AM_CXXFLAGS = -I$(top_builddir)/src -DEPS = $(LIBEOUTILS) $(LIBEO) -LIBS = $(top_builddir)/src/utils/libeoutils.a +AM_CXXFLAGS = -I$(top_builddir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) -gpsymreg_SOURCES = main.cpp diff --git a/eo/app/mastermind/Makefile.am b/eo/app/mastermind/Makefile.am index 4d3c0c88..fc1f4251 100644 --- a/eo/app/mastermind/Makefile.am +++ b/eo/app/mastermind/Makefile.am @@ -4,22 +4,15 @@ # ############################################################################### -DEPS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +bin_PROGRAMS = mastermind -############################################################################### +mastermind_SOURCES = mastermind.cpp -INCLUDES = -I$(top_builddir)/src -I$(top_srcdir)/src -LDADDS = $(top_builddir)/src/libeo.a $(top_builddir)/src/utils/libeoutils.a +noinst_HEADERS = mastermind.h -############################################################################### +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -bin_PROGRAMS = mastermind - -############################################################################### - -mastermind_SOURCES = mastermind.cpp -mastermind_DEPENDENCIES = $(DEPS) -mastermind_LDFLAGS = -lm -mastermind_LDADD = $(LDADDS) - -############################################################################### +AM_CXXFLAGS = -I$(top_srcdir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) diff --git a/eo/contrib/Makefile.am b/eo/contrib/Makefile.am index f0faf747..e0137720 100644 --- a/eo/contrib/Makefile.am +++ b/eo/contrib/Makefile.am @@ -4,6 +4,6 @@ ## ############################################################################### -SUBDIRS = - pkginclude_HEADERS = eoAged.h eoDrawable.h + +EXTRA_DIST = MGE/VirusOp.h MGE/eoInitVirus.h MGE/eoVirus.h diff --git a/eo/src/utils/Makefile.am b/eo/src/utils/Makefile.am index 7222246b..8dc5d138 100644 --- a/eo/src/utils/Makefile.am +++ b/eo/src/utils/Makefile.am @@ -6,10 +6,6 @@ lib_LIBRARIES = libeoutils.a - -AM_CXXFLAGS = -I$(top_srcdir)/src - - libeoutils_a_SOURCES = eoParser.cpp \ eoRNG.cpp \ eoState.cpp \ @@ -19,6 +15,8 @@ libeoutils_a_SOURCES = eoParser.cpp \ eoRealBounds.cpp \ make_help.cpp -libeoincdir = $(includedir)/eo/utils +pkginclude_HEADERS = checkpointing $(srcdir)/*.h -libeoinc_HEADERS = checkpointing $(srcdir)/*.h +AM_CXXFLAGS = -I$(top_srcdir)/src + +EXTRA_DIST = *.h diff --git a/eo/src/utils/eoRealBounds.cpp b/eo/src/utils/eoRealBounds.cpp index e052a341..4b8fabb8 100644 --- a/eo/src/utils/eoRealBounds.cpp +++ b/eo/src/utils/eoRealBounds.cpp @@ -3,8 +3,11 @@ #pragma warning(disable:4786) #endif -#include +#ifdef HAVE_CONFIG_H +#include +#endif +#include #ifdef HAVE_SSTREAM #include #else diff --git a/eo/src/utils/eoState.cpp b/eo/src/utils/eoState.cpp index 5d3797ba..09447339 100644 --- a/eo/src/utils/eoState.cpp +++ b/eo/src/utils/eoState.cpp @@ -1,11 +1,13 @@ - #ifdef _MSC_VER #pragma warning(disable:4786) #endif +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include - #ifdef HAVE_SSTREAM #include #else diff --git a/eo/src/utils/eoUpdater.cpp b/eo/src/utils/eoUpdater.cpp index 64b07dfc..b39ff073 100644 --- a/eo/src/utils/eoUpdater.cpp +++ b/eo/src/utils/eoUpdater.cpp @@ -2,6 +2,10 @@ #pragma warning(disable:4786) #endif +#ifdef HAVE_CONFIG_H +#include +#endif + #ifdef HAVE_SSTREAM #include #else diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index d766b42d..83a2dac2 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -4,18 +4,18 @@ ## ############################################################################### -LIBEO = $(top_builddir)/src/libeo.a -LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a -LIBES = $(top_builddir)/src/es/libes.a -LIBGA = $(top_builddir)/src/ga/libga.a +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a +LIBES = $(top_builddir)/src/es/libes.a +LIBGA = $(top_builddir)/src/ga/libga.a -AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src +AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src -CLEANFILES = *~ *.sav *.status monitor.csv t-eoRandom.out +CLEANFILES = monitor.csv t-eoRandom.out -DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) +DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) -LDADD = $(DEPS) +LIBS = $(DEPS) @@ -35,30 +35,33 @@ TESTS=$(check_PROGRAMS) run_tests # Specify source-files, # otherwise automake/make looks for C sources # -t_eoRandom_SOURCES = t-eoRandom.cpp -t_eofitness_SOURCES = t-eofitness.cpp -t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp -t_eobin_SOURCES = t-eobin.cpp binary_value.h -t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h -t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h -t_MGE_SOURCES = t-MGE.cpp binary_value.h -t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h -t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp -t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp -t_eoReplacement_SOURCES = t-eoReplacement.cpp -t_eoSelect_SOURCES = t-eoSelect.cpp -t_eoExternalEO_SOURCES = t-eoExternalEO.cpp -t_eoSymreg_SOURCES = t-eoSymreg.cpp -t_eo_SOURCES = t-eo.cpp -t_eoGenOp_SOURCES = t-eoGenOp.cpp -t_eoVector_SOURCES = t-eoVector.cpp -t_eoGA_SOURCES = t-eoGA.cpp binary_value.h -t_eoReal_SOURCES = t-eoReal.cpp real_value.h -t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h -t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h -t_eoPareto_SOURCES = t-eoPareto.cpp -t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp -t_eoPBIL_SOURCES = t-eoPBIL.cpp -t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp -t_eoRoulette_SOURCES = t-eoRoulette.cpp -t_eoSharing_SOURCES = t-eoSharing.cpp +t_eoRandom_SOURCES = t-eoRandom.cpp +t_eofitness_SOURCES = t-eofitness.cpp +t_eoFitnessAssembledEA_SOURCES = t-eoFitnessAssembledEA.cpp +t_eobin_SOURCES = t-eobin.cpp binary_value.h +t_eoVirus_SOURCES = t-eoVirus.cpp binary_value.h +t_MGE1bit_SOURCES = t-MGE1bit.cpp binary_value.h +t_MGE_SOURCES = t-MGE.cpp binary_value.h +t_MGE_control_SOURCES = t-MGE-control.cpp binary_value.h +t_eoStateAndParser_SOURCES = t-eoStateAndParser.cpp +t_eoCheckpointing_SOURCES = t-eoCheckpointing.cpp +t_eoReplacement_SOURCES = t-eoReplacement.cpp +t_eoSelect_SOURCES = t-eoSelect.cpp +t_eoExternalEO_SOURCES = t-eoExternalEO.cpp +t_eoSymreg_SOURCES = t-eoSymreg.cpp +t_eo_SOURCES = t-eo.cpp +t_eoGenOp_SOURCES = t-eoGenOp.cpp +t_eoVector_SOURCES = t-eoVector.cpp +t_eoGA_SOURCES = t-eoGA.cpp binary_value.h +t_eoReal_SOURCES = t-eoReal.cpp real_value.h +t_eoESAll_SOURCES = t-eoESAll.cpp real_value.h +t_eoSSGA_SOURCES = t-eoSSGA.cpp binary_value.h +t_eoPareto_SOURCES = t-eoPareto.cpp +t_eoParetoFitness_SOURCES = t-eoParetoFitness.cpp +t_eoPBIL_SOURCES = t-eoPBIL.cpp +t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp +t_eoRoulette_SOURCES = t-eoRoulette.cpp +t_eoSharing_SOURCES = t-eoSharing.cpp + +# extra flags for specific targets +t_eoVirus_CXXFLAGS = -I$(top_srcdir)/contrib diff --git a/eo/test/t-eoVirus.cpp b/eo/test/t-eoVirus.cpp index 7c127c3b..347a7896 100644 --- a/eo/test/t-eoVirus.cpp +++ b/eo/test/t-eoVirus.cpp @@ -25,9 +25,9 @@ #include // std::cout #include // general EO -#include "../contrib/MGE/VirusOp.h" -#include "../contrib/MGE/eoVirus.h" -#include "../contrib/MGE/eoInitVirus.h" +#include "MGE/VirusOp.h" +#include "MGE/eoVirus.h" +#include "MGE/eoInitVirus.h" #include #include "binary_value.h" diff --git a/eo/tutorial/Lesson5/Makefile.am b/eo/tutorial/Lesson5/Makefile.am index 89c1b97e..6fd9f2fa 100644 --- a/eo/tutorial/Lesson5/Makefile.am +++ b/eo/tutorial/Lesson5/Makefile.am @@ -16,10 +16,7 @@ noinst_HEADERS = eoOneMax.h \ extra_DIST = Makefile.simple - +AM_CXXFLAGS = -I$(top_srcdir)/src LDADD = -L$(top_builddir)/src -L$(top_builddir)/src/ga -L$(top_builddir)/src/utils - LIBS = -lga -leoutils -leo -INCLUDES = -I$(top_srcdir)/src -