From 3e0b59c9a41305273ecba36f249ebe9481119f72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Fri, 26 Jun 2009 10:52:29 +0000 Subject: [PATCH] Update standalone build of the examples. --- org.glite.lb.client/examples/Makefile | 21 +++++++++++---------- org.glite.lb.client/examples/abort_job.c | 5 +++++ org.glite.lb.client/examples/change_acl.c | 4 ++++ org.glite.lb.client/examples/dagids.c | 4 ++++ org.glite.lb.client/examples/feed_shark.c | 4 ++++ org.glite.lb.client/examples/flood_proxy.c | 4 ++++ org.glite.lb.client/examples/gen_sample_job | 1 - org.glite.lb.client/examples/job_log.c | 4 ++++ org.glite.lb.client/examples/job_reg.c | 4 ++++ org.glite.lb.client/examples/job_status.c | 4 ++++ org.glite.lb.client/examples/log_usertag_proxy.c | 2 +- org.glite.lb.client/examples/parse_eventsfile.c | 4 ++++ org.glite.lb.client/examples/query_ext.c | 4 ++++ org.glite.lb.client/examples/query_seq_code.c | 4 ++++ org.glite.lb.client/examples/stats.c | 4 ++++ org.glite.lb.client/examples/stress_context.c | 4 ++++ org.glite.lb.client/examples/stresslog.c | 4 ++++ org.glite.lb.client/examples/user_jobs.c | 4 ++++ org.glite.lb.doc/examples/Makefile | 19 ++++++++++--------- org.glite.lb.doc/examples/notif_example.c | 2 +- 20 files changed, 84 insertions(+), 22 deletions(-) diff --git a/org.glite.lb.client/examples/Makefile b/org.glite.lb.client/examples/Makefile index ee5fc6f..8b4e31f 100644 --- a/org.glite.lb.client/examples/Makefile +++ b/org.glite.lb.client/examples/Makefile @@ -1,8 +1,16 @@ glite_location:=${GLITE_LOCATION} glite_prefix:=${glite_location} -nothrflavour=gcc32dbg -thrflavour=gcc32dbgpthr +host_cpu:=${shell uname -m} +ifeq (${host_cpu},x86_64) + LDFLAGS:=-L${glite_prefix}/lib64 -L${glite_prefix}/lib + nothrflavour=gcc64dbg + thrflavour=gcc64dbgpthr +else + LDFLAGS:=-L${glite_prefix}/lib + nothrflavour=gcc32dbg + thrflavour=gcc32dbgpthr +endif CC:=gcc CXX:=g++ @@ -24,20 +32,13 @@ CFLAGS:=${DEBUG} \ CXXFLAGS:=${CFLAGS} -host_cpu:=${shell uname -m} -ifeq (${host_cpu},x86_64) - LDFLAGS:=-L${glite_prefix}/lib64 -else - LDFLAGS:=-L${glite_prefix}/lib -endif - COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} CXXCOMPILE:=libtool --mode=compile ${CXX} ${CXXFLAGS} LINK:=libtool --mode=link ${CC} ${LDFLAGS} LINKXX:=libtool --mode=link ${CXX} ${LDFLAGS} INSTALL:=libtool --mode=install install -EXAMPLES_SRC:=log_usertag_proxy.c job_log.c job_reg.c feed_shark.c notify.c query_ext.c query_seq_code.c stats.c abort_job.c change_acl.c stresslog.c flood_proxy.c dagids.c stress_context.c parse_eventsfile.c user_jobs.c job_status.c +EXAMPLES_SRC:=log_usertag_proxy.c job_log.c job_reg.c feed_shark.c query_ext.c query_seq_code.c stats.c abort_job.c change_acl.c stresslog.c flood_proxy.c dagids.c stress_context.c parse_eventsfile.c user_jobs.c job_status.c EXAMPLES:=${EXAMPLES_SRC:.c=} # TODO: migrate them here from branch_RC31_3 diff --git a/org.glite.lb.client/examples/abort_job.c b/org.glite.lb.client/examples/abort_job.c index 24e9d05..3407b22 100644 --- a/org.glite.lb.client/examples/abort_job.c +++ b/org.glite.lb.client/examples/abort_job.c @@ -10,8 +10,13 @@ #include #include "glite/lb/events_parse.h" +#ifdef BUILDING_LB_CLIENT #include "consumer.h" #include "producer.h" +#else +#include "glite/lb/consumer.h" +#include "glite/lb/producer.h" +#endif #include "glite/jobid/cjobid.h" #include "glite/lb/context-int.h" diff --git a/org.glite.lb.client/examples/change_acl.c b/org.glite.lb.client/examples/change_acl.c index 24a1d4d..3464a16 100644 --- a/org.glite.lb.client/examples/change_acl.c +++ b/org.glite.lb.client/examples/change_acl.c @@ -4,7 +4,11 @@ #include #include "glite/jobid/cjobid.h" +#ifdef BUILDING_LB_CLIENT #include "producer.h" +#else +#include "glite/lb/producer.h" +#endif #include "glite/lb/authz.h" void diff --git a/org.glite.lb.client/examples/dagids.c b/org.glite.lb.client/examples/dagids.c index a710148..91f4e60 100644 --- a/org.glite.lb.client/examples/dagids.c +++ b/org.glite.lb.client/examples/dagids.c @@ -6,7 +6,11 @@ #include #include "glite/jobid/cjobid.h" +#ifdef BUILDING_LB_CLIENT #include "producer.h" +#else +#include "glite/lb/producer.h" +#endif #include "glite/lb/events.h" extern char *optarg; diff --git a/org.glite.lb.client/examples/feed_shark.c b/org.glite.lb.client/examples/feed_shark.c index 8004537..7aeac7d 100644 --- a/org.glite.lb.client/examples/feed_shark.c +++ b/org.glite.lb.client/examples/feed_shark.c @@ -7,7 +7,11 @@ #include #include +#ifdef BUILDING_LB_CLIENT #include "notification.h" +#else +#include "glite/lb/notification.h" +#endif static void usage(const char *); static void printstat(edg_wll_JobStat, int); diff --git a/org.glite.lb.client/examples/flood_proxy.c b/org.glite.lb.client/examples/flood_proxy.c index 9f2a3aa..5fb23a6 100644 --- a/org.glite.lb.client/examples/flood_proxy.c +++ b/org.glite.lb.client/examples/flood_proxy.c @@ -7,7 +7,11 @@ #include #include +#ifdef BUILDING_LB_CLIENT #include "producer.h" +#else +#include "glite/lb/producer.h" +#endif #include "glite/jobid/cjobid.h" static void slave(); diff --git a/org.glite.lb.client/examples/gen_sample_job b/org.glite.lb.client/examples/gen_sample_job index c24dc1c..5246e8a 100755 --- a/org.glite.lb.client/examples/gen_sample_job +++ b/org.glite.lb.client/examples/gen_sample_job @@ -122,4 +122,3 @@ function logit() print "send_log_ev" ff; } ' $1 - diff --git a/org.glite.lb.client/examples/job_log.c b/org.glite.lb.client/examples/job_log.c index afa6558..03ddd40 100644 --- a/org.glite.lb.client/examples/job_log.c +++ b/org.glite.lb.client/examples/job_log.c @@ -10,7 +10,11 @@ #include #include "glite/lb/events_parse.h" +#ifdef BUILDING_LB_CLIENT #include "consumer.h" +#else +#include "glite/lb/consumer.h" +#endif #include "glite/jobid/cjobid.h" #ifdef USE_CALLBACKS #include "consumer_fake.h" diff --git a/org.glite.lb.client/examples/job_reg.c b/org.glite.lb.client/examples/job_reg.c index 2a411c3..8cd4e89 100644 --- a/org.glite.lb.client/examples/job_reg.c +++ b/org.glite.lb.client/examples/job_reg.c @@ -6,7 +6,11 @@ #include #include "glite/jobid/cjobid.h" +#ifdef BUILDING_LB_CLIENT #include "producer.h" +#else +#include "glite/lb/producer.h" +#endif #include "glite/lb/events.h" extern char *optarg; diff --git a/org.glite.lb.client/examples/job_status.c b/org.glite.lb.client/examples/job_status.c index cc30d25..1d33293 100644 --- a/org.glite.lb.client/examples/job_status.c +++ b/org.glite.lb.client/examples/job_status.c @@ -7,7 +7,11 @@ #include #include "glite/lb/context-int.h" +#ifdef BUILDING_LB_CLIENT #include "consumer.h" +#else +#include "glite/lb/consumer.h" +#endif #include "glite/lb/xml_conversions.h" #include "glite/lb/jobstat.h" diff --git a/org.glite.lb.client/examples/log_usertag_proxy.c b/org.glite.lb.client/examples/log_usertag_proxy.c index 3873460..2b48494 100644 --- a/org.glite.lb.client/examples/log_usertag_proxy.c +++ b/org.glite.lb.client/examples/log_usertag_proxy.c @@ -12,7 +12,7 @@ #ifdef BUILDING_LB_CLIENT #include "producer.h" #else -#include "producer.h" +#include "glite/lb/producer.h" #endif static struct option opts[] = { diff --git a/org.glite.lb.client/examples/parse_eventsfile.c b/org.glite.lb.client/examples/parse_eventsfile.c index 83ee8f2..2f9d339 100644 --- a/org.glite.lb.client/examples/parse_eventsfile.c +++ b/org.glite.lb.client/examples/parse_eventsfile.c @@ -5,7 +5,11 @@ #include #include +#ifdef BUILDING_LB_CLIENT #include "producer.h" +#else +#include "glite/lb/producer.h" +#endif #include "glite/lb/events.h" #include "glite/lb/events_parse.h" diff --git a/org.glite.lb.client/examples/query_ext.c b/org.glite.lb.client/examples/query_ext.c index ac9b609..82b23c6 100644 --- a/org.glite.lb.client/examples/query_ext.c +++ b/org.glite.lb.client/examples/query_ext.c @@ -7,7 +7,11 @@ #include #include "glite/jobid/cjobid.h" +#ifdef BUILDING_LB_CLIENT #include "consumer.h" +#else +#include "glite/lb/consumer.h" +#endif #define BUFF_LEN 1024 #define MAX_AND_CONDS 20 diff --git a/org.glite.lb.client/examples/query_seq_code.c b/org.glite.lb.client/examples/query_seq_code.c index 29e9de7..730dd95 100644 --- a/org.glite.lb.client/examples/query_seq_code.c +++ b/org.glite.lb.client/examples/query_seq_code.c @@ -6,7 +6,11 @@ #include #include "glite/jobid/cjobid.h" +#ifdef BUILDING_LB_CLIENT #include "consumer.h" +#else +#include "glite/lb/consumer.h" +#endif static struct option opts[] = { diff --git a/org.glite.lb.client/examples/stats.c b/org.glite.lb.client/examples/stats.c index 3e68e4f..626efde 100644 --- a/org.glite.lb.client/examples/stats.c +++ b/org.glite.lb.client/examples/stats.c @@ -3,7 +3,11 @@ #include #include +#ifdef BUILDING_LB_CLIENT #include "statistics.h" +#else +#include "glite/lb/statistics.h" +#endif int main(int argc,char **argv) diff --git a/org.glite.lb.client/examples/stress_context.c b/org.glite.lb.client/examples/stress_context.c index a551d30..dfd54a6 100644 --- a/org.glite.lb.client/examples/stress_context.c +++ b/org.glite.lb.client/examples/stress_context.c @@ -5,7 +5,11 @@ #include #include "glite/jobid/cjobid.h" +#ifdef BUILDING_LB_CLIENT #include "producer.h" +#else +#include "glite/lb/producer.h" +#endif #include "glite/lb/events.h" char *outfile = "context_errors"; diff --git a/org.glite.lb.client/examples/stresslog.c b/org.glite.lb.client/examples/stresslog.c index 6034f0a..67d7c07 100644 --- a/org.glite.lb.client/examples/stresslog.c +++ b/org.glite.lb.client/examples/stresslog.c @@ -6,7 +6,11 @@ #include #include "glite/jobid/cjobid.h" +#ifdef BUILDING_LB_CLIENT #include "producer.h" +#else +#include "glite/lb/producer.h" +#endif #include "glite/lb/events.h" #define MAXMSGSIZE 10240 diff --git a/org.glite.lb.client/examples/user_jobs.c b/org.glite.lb.client/examples/user_jobs.c index 918625c..1d1dbbb 100644 --- a/org.glite.lb.client/examples/user_jobs.c +++ b/org.glite.lb.client/examples/user_jobs.c @@ -6,7 +6,11 @@ #include "glite/lb/context.h" #include "glite/lb/xml_conversions.h" +#ifdef BUILDING_LB_CLIENT #include "consumer.h" +#else +#include "glite/lb/consumer.h" +#endif int use_proxy = 0; diff --git a/org.glite.lb.doc/examples/Makefile b/org.glite.lb.doc/examples/Makefile index 967e07a..fc99f0a 100644 --- a/org.glite.lb.doc/examples/Makefile +++ b/org.glite.lb.doc/examples/Makefile @@ -1,8 +1,16 @@ glite_location:=${GLITE_LOCATION} glite_prefix:=${glite_location} -nothrflavour=gcc32dbg -thrflavour=gcc32dbgpthr +host_cpu:=${shell uname -m} +ifeq (${host_cpu},x86_64) + LDFLAGS:=-L${glite_prefix}/lib64 -L${glite_prefix}/lib + nothrflavour=gcc64dbg + thrflavour=gcc64dbgpthr +else + LDFLAGS:=-L${glite_prefix}/lib + nothrflavour=gcc32dbg + thrflavour=gcc32dbgpthr +endif CC:=gcc CXX:=g++ @@ -24,13 +32,6 @@ CFLAGS:=${DEBUG} \ CXXFLAGS:=${CFLAGS} -host_cpu:=${shell uname -m} -ifeq (${host_cpu},x86_64) - LDFLAGS:=-L${glite_prefix}/lib64 -else - LDFLAGS:=-L${glite_prefix}/lib -endif - COMPILE:=libtool --mode=compile ${CC} ${CFLAGS} CXXCOMPILE:=libtool --mode=compile ${CXX} ${CXXFLAGS} LINK:=libtool --mode=link ${CC} ${LDFLAGS} diff --git a/org.glite.lb.doc/examples/notif_example.c b/org.glite.lb.doc/examples/notif_example.c index 3e9bb2d..1d4f931 100644 --- a/org.glite.lb.doc/examples/notif_example.c +++ b/org.glite.lb.doc/examples/notif_example.c @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) /*register*/ if (edg_wll_NotifNew(ctx, (edg_wll_QueryRec const* const*)conditions, - -1, NULL, ¬if_id, &valid)) { + 0, -1, NULL, ¬if_id, &valid)) { char *et,*ed; edg_wll_Error(ctx,&et,&ed); -- 1.8.2.3