From 8e2524f55f8359d960d48df01fe5295637709958 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 20 May 2013 15:19:13 -0700 Subject: [PATCH] Unix build: Makefile changes for "make install", from Steffen Moeller "make install" followed by make_project should now work --- Makefile.am | 2 +- apps/Makefile.am | 2 +- configure.ac | 1 + db/Makefile.am | 3 +- html/Makefile.am | 4 ++ lib/Makefile.am | 3 +- py/Boinc/boinc_db.py | 93 +++++++++++++++++++++++++--------------- py/Makefile.am | 4 ++ samples/wrapper/Makefile | 2 +- sched/Makefile.am | 26 ++++++----- tools/Makefile.am | 17 ++++++-- vda/Makefile.am | 3 +- 12 files changed, 106 insertions(+), 54 deletions(-) create mode 100644 html/Makefile.am diff --git a/Makefile.am b/Makefile.am index 3c0e9583e8..ead5f6dbb9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -13,7 +13,7 @@ if ENABLE_LIBRARIES endif if ENABLE_SERVER - SERVER_SUBDIRS = db test py sched apps tools vda + SERVER_SUBDIRS = db test py sched apps tools vda html ## once contained samples/example_app which breaks out-of-source-tree builds endif diff --git a/apps/Makefile.am b/apps/Makefile.am index 858f403ca5..7f3b1fea24 100644 --- a/apps/Makefile.am +++ b/apps/Makefile.am @@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.incl -exampledir = $(libexecdir)/examples +exampledir = $(prefix)/lib/boinc-apps-examples example_PROGRAMS = upper_case concat 1sec upper_case_SOURCES = upper_case.cpp diff --git a/configure.ac b/configure.ac index 1aea1242e0..ac52433559 100644 --- a/configure.ac +++ b/configure.ac @@ -963,6 +963,7 @@ AC_CONFIG_FILES([ db/Makefile doc/Makefile doc/manpages/Makefile + html/Makefile lib/Makefile locale/Makefile Makefile diff --git a/db/Makefile.am b/db/Makefile.am index a8bac3d5e8..3548944461 100644 --- a/db/Makefile.am +++ b/db/Makefile.am @@ -9,4 +9,5 @@ pkginclude_HEADERS = boinc_db.h db_base.h boinc_db_types.h endif ## other stuff to go into the distribution -EXTRA_DIST = constraints.sql schema.sql init_db +extradir = $(prefix)/share/boinc-server-maker/db +dist_extra_DATA = constraints.sql schema.sql init_db diff --git a/html/Makefile.am b/html/Makefile.am new file mode 100644 index 0000000000..9862d8dadc --- /dev/null +++ b/html/Makefile.am @@ -0,0 +1,4 @@ +htmldir=$(DESTDIR)/$(prefix)/share/boinc-server-maker/html +install-data-local: + mkdir -p $(htmldir) + cp -r inc languages ops user $(htmldir) diff --git a/lib/Makefile.am b/lib/Makefile.am index 725bb4497d..15b58efa56 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -8,7 +8,8 @@ bin_PROGRAMS = # Stuff needed for server builds goes here. if ENABLE_SERVER -bin_PROGRAMS += crypt_prog parse_test +serverbindir = $(prefix)/lib/boinc-server-maker/lib +serverbin_PROGRAMS = crypt_prog parse_test endif # end of "if ENABLE_SERVER" diff --git a/py/Boinc/boinc_db.py b/py/Boinc/boinc_db.py index 5bc36ea8fa..99c13c24eb 100644 --- a/py/Boinc/boinc_db.py +++ b/py/Boinc/boinc_db.py @@ -1,42 +1,65 @@ # Generated by db_def_to_py -LARGE_BLOB_SIZE = 65536 -TEAM_TYPE_CLUB = 1 -TEAM_TYPE_COMPANY = 2 -TEAM_TYPE_PRIMARY = 3 -TEAM_TYPE_SECONDARY = 4 -TEAM_TYPE_JUNIOR_COLLEGE = 5 -TEAM_TYPE_UNIVERSITY = 6 -TEAM_TYPE_GOVERNMENT = 7 -FILE_DELETE_INIT = 0 -FILE_DELETE_READY = 1 -FILE_DELETE_DONE = 2 -ASSIMILATE_INIT = 0 -ASSIMILATE_READY = 1 -ASSIMILATE_DONE = 2 -WU_ERROR_COULDNT_SEND_RESULT = 1 -WU_ERROR_TOO_MANY_ERROR_RESULTS = 2 -WU_ERROR_TOO_MANY_SUCCESS_RESULTS = 4 -WU_ERROR_TOO_MANY_TOTAL_RESULTS = 8 -WU_ERROR_CANCELLED = 16 -RESULT_SERVER_STATE_INACTIVE = 1 -RESULT_SERVER_STATE_UNSENT = 2 -RESULT_SERVER_STATE_UNSENT_SEQ = 3 -RESULT_SERVER_STATE_IN_PROGRESS = 4 -RESULT_SERVER_STATE_OVER = 5 -RESULT_OUTCOME_INIT = 0 -RESULT_OUTCOME_SUCCESS = 1 -RESULT_OUTCOME_COULDNT_SEND = 2 -RESULT_OUTCOME_CLIENT_ERROR = 3 -RESULT_OUTCOME_NO_REPLY = 4 -RESULT_OUTCOME_DIDNT_NEED = 5 -RESULT_OUTCOME_VALIDATE_ERROR = 6 -VALIDATE_STATE_INIT = 0 -VALIDATE_STATE_VALID = 1 -VALIDATE_STATE_INVALID = 2 -VALIDATE_STATE_NO_CHECK = 3 +GUI_RPC_PORT = 31416 +RUN_MODE_ALWAYS = 1 +RUN_MODE_AUTO = 2 +RUN_MODE_NEVER = 3 +RUN_MODE_RESTORE = 4 +CPU_SCHED_UNINITIALIZED = 0 +CPU_SCHED_PREEMPTED = 1 +CPU_SCHED_SCHEDULED = 2 +HTTP_STATUS_CONTINUE = 100 +HTTP_STATUS_OK = 200 +HTTP_STATUS_PARTIAL_CONTENT = 206 +HTTP_STATUS_MOVED_PERM = 301 +HTTP_STATUS_MOVED_TEMP = 302 +HTTP_STATUS_CLIENT_ERROR = 400 +HTTP_STATUS_NOT_FOUND = 404 +HTTP_STATUS_PROXY_AUTH_REQ = 407 +HTTP_STATUS_RANGE_REQUEST_ERROR = 416 +HTTP_STATUS_INTERNAL_SERVER_ERROR = 500 +HTTP_STATUS_SERVICE_UNAVAILABLE = 503 +MODE_UNSUPPORTED = 0 +MODE_HIDE_GRAPHICS = 1 +MODE_WINDOW = 2 +MODE_FULLSCREEN = 3 +MODE_BLANKSCREEN = 4 +MODE_REREAD_PREFS = 5 +MODE_QUIT = 6 +NGRAPHICS_MSGS = 7 +MSG_INFO = 1 +MSG_USER_ALERT = 2 +MSG_INTERNAL_ERROR = 3 +MSG_SCHEDULER_ALERT = 4 RESULT_NEW = 0 RESULT_FILES_DOWNLOADING = 1 RESULT_FILES_DOWNLOADED = 2 RESULT_COMPUTE_ERROR = 3 RESULT_FILES_UPLOADING = 4 RESULT_FILES_UPLOADED = 5 +RESULT_ABORTED = 6 +RESULT_UPLOAD_FAILED = 7 +FILE_NOT_PRESENT = 0 +FILE_PRESENT = 1 +FILE_VERIFY_PENDING = 2 +PROCESS_UNINITIALIZED = 0 +PROCESS_EXECUTING = 1 +PROCESS_SUSPENDED = 9 +PROCESS_ABORT_PENDING = 5 +PROCESS_QUIT_PENDING = 8 +PROCESS_COPY_PENDING = 10 +PROCESS_EXITED = 2 +PROCESS_WAS_SIGNALED = 3 +PROCESS_EXIT_UNKNOWN = 4 +PROCESS_ABORTED = 6 +PROCESS_COULDNT_START = 7 +NETWORK_STATUS_ONLINE = 0 +NETWORK_STATUS_WANT_CONNECTION = 1 +NETWORK_STATUS_WANT_DISCONNECT = 2 +NETWORK_STATUS_LOOKUP_PENDING = 3 +RPC_REASON_USER_REQ = 1 +RPC_REASON_RESULTS_DUE = 2 +RPC_REASON_NEED_WORK = 3 +RPC_REASON_TRICKLE_UP = 4 +RPC_REASON_ACCT_MGR_REQ = 5 +RPC_REASON_INIT = 6 +RPC_REASON_PROJECT_REQ = 7 diff --git a/py/Makefile.am b/py/Makefile.am index 5d69b4e775..2ad5ccb6f5 100644 --- a/py/Makefile.am +++ b/py/Makefile.am @@ -19,6 +19,10 @@ EXTRA_DIST = db_def_to_py \ Boinc/tools.py \ Boinc/util.py +pydir=$(prefix)/usr/share/boinc-server-maker/py/Boinc +py_SCRIPTS=$(EXTRA_DIST) + + $(srcdir)/Boinc/boinc_db.py: $(top_srcdir)/db/boinc_db.h $(top_srcdir)/lib/common_defs.h cat $^ | $(top_srcdir)/py/db_def_to_py > $@ diff --git a/samples/wrapper/Makefile b/samples/wrapper/Makefile index 16b3a3131a..bccc0f7d3b 100644 --- a/samples/wrapper/Makefile +++ b/samples/wrapper/Makefile @@ -37,4 +37,4 @@ REGEXP_OBJS = \ regexp_report.o wrapper: wrapper.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_api.a $(REGEXP_OBJS) - g++ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a -pthread -lboinc_api -lboinc -lboinc_zip + g++ $(CXXFLAGS) $(CPPFLAGS) -o wrapper wrapper.o $(REGEXP_OBJS) libstdc++.a -pthread -lboinc_api -lboinc -lboinc_zip diff --git a/sched/Makefile.am b/sched/Makefile.am index b719298479..30bb9be816 100644 --- a/sched/Makefile.am +++ b/sched/Makefile.am @@ -87,11 +87,12 @@ endif if ENABLE_SERVER -cgidir = $(libexecdir)/cgi-bin -scheddir = $(libexecdir)/sched +schedcgidir = $(prefix)/lib/boinc-server-maker/sched +schedsharedir = $(prefix)/lib/boinc-server-maker/sched +schedbindir = $(prefix)/lib/boinc-server-maker/sched -bin_PROGRAMS = \ - adjust_user_priority \ +schedbin_PROGRAMS = \ + adjust_user_priority \ delete_file \ get_file \ make_work \ @@ -100,9 +101,9 @@ bin_PROGRAMS = \ show_shmem \ wu_check -sched_PROGRAMS = \ +schedshare_PROGRAMS = \ census \ - credit_test \ + credit_test \ db_dump \ db_purge \ feeder \ @@ -121,12 +122,18 @@ sched_PROGRAMS = \ trickle_echo \ update_stats -cgi_PROGRAMS= \ +schedcgi_PROGRAMS= \ cgi \ file_upload_handler +schedshare_DATA = \ + db_dump_spec.xml \ + assimilator.py \ + pymw_assimilator.py \ + transitioner_catchup.php + # scripts that 'make install' should put in bindir -bin_SCRIPTS = start stop status +schedshare_SCRIPTS = start stop status noinst_HEADERS = \ assimilate_handler.h \ @@ -281,8 +288,7 @@ sched_driver_LDADD = $(SERVERLIBS) if ENABLE_FCGI -cgi_PROGRAMS += fcgi \ - fcgi_file_upload_handler +schedcgi_PROGRAMS += fcgi fcgi_file_upload_handler fcgi_SOURCES = $(cgi_sources) fcgi_CPPFLAGS = -D_USING_FCGI_ $(AM_CPPFLAGS) diff --git a/tools/Makefile.am b/tools/Makefile.am index f80b5f9a83..47bf81d476 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,11 +1,13 @@ ## -*- mode: makefile; tab-width: 4 -*- include $(top_srcdir)/Makefile.incl -scheddir = $(libexecdir)/sched +scheddir = $(prefix)/lib/boinc-server-maker/sched +toolsdir = $(prefix)/lib/boinc-server-maker/tools +toolbindir = $(prefix)/lib/boinc-server-maker/tools -bin_PROGRAMS = create_work sign_executable dir_hier_path dir_hier_move cancel_jobs +toolbin_PROGRAMS = create_work sign_executable dir_hier_path dir_hier_move cancel_jobs -dist_bin_SCRIPTS = \ +dist_toolbin_SCRIPTS = \ boinc_submit \ dbcheck_files_exist \ demo_submit \ @@ -23,6 +25,15 @@ dist_sched_SCRIPTS = \ makelog.sh \ run_in_ops +dist_tools_SCRIPTS = \ + appmgr \ + db_query \ + manage_privileges \ + run_in_ops \ + stage_file \ + watch_tcp \ + project.xml + AM_CXXFLAGS += $(MYSQL_CFLAGS) AM_LDFLAGS += -static diff --git a/vda/Makefile.am b/vda/Makefile.am index f5f9283d48..eccbbfef7c 100644 --- a/vda/Makefile.am +++ b/vda/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/Makefile.incl -bin_PROGRAMS = vda vdad ssim +vdadir=$(prefix)/lib/boinc-server-maker/vda +vda_PROGRAMS = vda vdad ssim AM_CXXFLAGS += $(MYSQL_CFLAGS) AM_LDFLAGS += -static