From 5b72ad22ff8e66e5ea41f69bb8fbf422d1380639 Mon Sep 17 00:00:00 2001 From: doccvs Date: Thu, 1 Mar 2001 13:21:41 +0000 Subject: ChangeLogTag:Thu Mar 01 07:07:03 2001 Christopher Kohlhoff --- ChangeLog | 17 +++++ ChangeLogs/ChangeLog-02a | 17 +++++ ChangeLogs/ChangeLog-03a | 17 +++++ examples/IPC_SAP/SOCK_SAP/Makefile.bor | 24 ++----- examples/Log_Msg/makefile.bor | 20 ++---- examples/Map_Manager/makefile.bor | 14 +--- examples/Mem_Map/file-reverse/makefile.bor | 10 +-- examples/RMCast/Send_File/Makefile.bor | 29 +++----- .../IPC-tests/client/makefile.bor | 31 ++++---- examples/Threads/Makefile.bor | 60 +++++++--------- include/makeinclude/recurse.bor | 82 ++++++++++++++++++++++ netsvcs/clients/Logger/Makefile.bor | 16 ++--- tests/Makefile.bor | 27 ++----- tests/RMCast/Makefile.bor | 34 ++++----- 14 files changed, 224 insertions(+), 174 deletions(-) diff --git a/ChangeLog b/ChangeLog index d34ec92f3c1..c11422aa082 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Thu Mar 01 07:07:03 2001 Christopher Kohlhoff + + * include/makeinclude/recurse.bor: + Added support for makefiles which contain multiple targets. + + * examples/IPC_SAP/SOCK_SAP/Makefile.bor: + * examples/Log_Msg/Makefile.bor: + * examples/Map_Manager/Makefile.bor: + * examples/Mem_Map/file-reverse/Makefile.bor: + * examples/RMCast/Send_File/Makefile.bor: + * examples/Service_Configurator/IPC-tests/client/Makefile.bor: + * examples/Threads/Makefile.bor: + * netsvcs/clients/Logger/Makefile.bor: + * tests/Makefile.bor: + * tests/RMCast/Makefile.bor: + Updated to work with new multi-target makefile support. + Wed Feb 28 22:58:50 2001 Carlos O'Ryan * html/index.html: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index d34ec92f3c1..c11422aa082 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,20 @@ +Thu Mar 01 07:07:03 2001 Christopher Kohlhoff + + * include/makeinclude/recurse.bor: + Added support for makefiles which contain multiple targets. + + * examples/IPC_SAP/SOCK_SAP/Makefile.bor: + * examples/Log_Msg/Makefile.bor: + * examples/Map_Manager/Makefile.bor: + * examples/Mem_Map/file-reverse/Makefile.bor: + * examples/RMCast/Send_File/Makefile.bor: + * examples/Service_Configurator/IPC-tests/client/Makefile.bor: + * examples/Threads/Makefile.bor: + * netsvcs/clients/Logger/Makefile.bor: + * tests/Makefile.bor: + * tests/RMCast/Makefile.bor: + Updated to work with new multi-target makefile support. + Wed Feb 28 22:58:50 2001 Carlos O'Ryan * html/index.html: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index d34ec92f3c1..c11422aa082 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,20 @@ +Thu Mar 01 07:07:03 2001 Christopher Kohlhoff + + * include/makeinclude/recurse.bor: + Added support for makefiles which contain multiple targets. + + * examples/IPC_SAP/SOCK_SAP/Makefile.bor: + * examples/Log_Msg/Makefile.bor: + * examples/Map_Manager/Makefile.bor: + * examples/Mem_Map/file-reverse/Makefile.bor: + * examples/RMCast/Send_File/Makefile.bor: + * examples/Service_Configurator/IPC-tests/client/Makefile.bor: + * examples/Threads/Makefile.bor: + * netsvcs/clients/Logger/Makefile.bor: + * tests/Makefile.bor: + * tests/RMCast/Makefile.bor: + Updated to work with new multi-target makefile support. + Wed Feb 28 22:58:50 2001 Carlos O'Ryan * html/index.html: diff --git a/examples/IPC_SAP/SOCK_SAP/Makefile.bor b/examples/IPC_SAP/SOCK_SAP/Makefile.bor index 52a347a6ce6..33dc76321e5 100644 --- a/examples/IPC_SAP/SOCK_SAP/Makefile.bor +++ b/examples/IPC_SAP/SOCK_SAP/Makefile.bor @@ -1,14 +1,12 @@ # - # Makefile for building the IPC_SAP SOCK_SAP ace examples - # - - !include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> +# Makefile for building the IPC_SAP SOCK_SAP ace examples +# - TESTS = \ - CPP-inclient \ +NAMES = \ + CPP-inclient \ CPP-unclient \ CPP-inserver \ - CPP-inserver-fancy \ + CPP-inserver-fancy \ CPP-inserver-poll \ CPP-unserver \ FD-unclient \ @@ -16,21 +14,13 @@ C-inclient \ C-inserver -all_tests: $(TESTS) - -LIBFILES = \ - $(ACE_LIB) \ - -$(TESTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe - OBJFILES = $(OBJDIR)\$(NAME).obj CFLAGS = $(ACE_CFLAGS) CPPDIR = . -LIBFILES = \ - $(ACE_LIB) \ +LIBFILES = $(ACE_LIB) +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> !include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/examples/Log_Msg/makefile.bor b/examples/Log_Msg/makefile.bor index 2f78c01c4be..9868323d17c 100644 --- a/examples/Log_Msg/makefile.bor +++ b/examples/Log_Msg/makefile.bor @@ -1,18 +1,11 @@ # - # Makefile for building the log_ms ace examples - # - - !include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - - TESTS = \ - test_callback \ - test_log_msg \ - test_ostream - -all_tests: $(TESTS) +# Makefile for building the log_msg ace examples +# -$(TESTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +NAMES = \ + test_callback \ + test_log_msg \ + test_ostream OBJFILES = $(OBJDIR)\$(NAME).obj @@ -22,4 +15,5 @@ CPPDIR = . LIBFILES = $(ACE_LIB) +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> !include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/examples/Map_Manager/makefile.bor b/examples/Map_Manager/makefile.bor index 02acd82833a..509468e7ddb 100644 --- a/examples/Map_Manager/makefile.bor +++ b/examples/Map_Manager/makefile.bor @@ -1,16 +1,8 @@ # - # Makefile for building the test_hash_map_manager ace examples - # - - !include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - - TESTS = \ - test_hash_map_manager - -all_tests: $(TESTS) +# Makefile for building the test_hash_map_manager ace examples +# -$(TESTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +NAME = test_hash_map_manager OBJFILES = $(OBJDIR)\$(NAME).obj diff --git a/examples/Mem_Map/file-reverse/makefile.bor b/examples/Mem_Map/file-reverse/makefile.bor index 13e8059587d..c5f92970c72 100644 --- a/examples/Mem_Map/file-reverse/makefile.bor +++ b/examples/Mem_Map/file-reverse/makefile.bor @@ -2,15 +2,7 @@ # Makefile for building the mem_map file-reserse ace examples # -!include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - -TESTS = \ - file-reverse - -all_tests: $(TESTS) - -$(TESTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +NAME = file-reverse OBJFILES = $(OBJDIR)\$(NAME).obj diff --git a/examples/RMCast/Send_File/Makefile.bor b/examples/RMCast/Send_File/Makefile.bor index 489f89b29c4..2bf2db27a10 100644 --- a/examples/RMCast/Send_File/Makefile.bor +++ b/examples/RMCast/Send_File/Makefile.bor @@ -1,31 +1,18 @@ # - # Makefile for building the RMCast Send_File ace examples - # - - !include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - - TESTS = \ - Receiver \ - Sender - -all_tests: $(TESTS) - -LIBFILES = \ - $(ACE_LIB) \ - $(ACE_RMCAST_LIB) +# Makefile for building the RMCast Send_File ace examples +# -$(TESTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +NAMES = \ + Receiver \ + Sender OBJFILES = $(OBJDIR)\$(NAME).obj -CFLAGS = $(ACE_CFLAGS) +CFLAGS = $(ACE_CFLAGS) $(ACE_RMCAST_CFLAGS) CPPDIR = . -LIBFILES = \ - $(ACE_LIB) \ - $(ACE_RMCAST_LIB) - +LIBFILES = $(ACE_LIB) $(ACE_RMCAST_LIB) +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> !include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/examples/Service_Configurator/IPC-tests/client/makefile.bor b/examples/Service_Configurator/IPC-tests/client/makefile.bor index 8ca304c83ed..6acb4134761 100644 --- a/examples/Service_Configurator/IPC-tests/client/makefile.bor +++ b/examples/Service_Configurator/IPC-tests/client/makefile.bor @@ -2,24 +2,17 @@ # Makefile for building the ACE Service_Configurator IPC-tests client # -!include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - -CLIENTS = \ - local_dgram_client_test \ - local_stream_client_test \ - local_pipe_client_test \ - remote_stream_client_test \ - remote_thr_stream_client_test \ - remote_dgram_client_test \ - local_fifo_client_test \ - broadcast_client_test \ - local_spipe_client_test \ - remote_service_directory_test - -all_clients: $(CLIENTS) - -$(CLIENTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +NAMES = \ + local_dgram_client_test \ + local_stream_client_test \ + local_pipe_client_test \ + remote_stream_client_test \ + remote_thr_stream_client_test \ + remote_dgram_client_test \ + local_fifo_client_test \ + broadcast_client_test \ + local_spipe_client_test \ + remote_service_directory_test OBJFILES = $(OBJDIR)\$(NAME).obj @@ -29,5 +22,5 @@ CPPDIR = . LIBFILES = $(ACE_LIB) +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> !include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> - diff --git a/examples/Threads/Makefile.bor b/examples/Threads/Makefile.bor index dd56aebc0a6..228284446b2 100644 --- a/examples/Threads/Makefile.bor +++ b/examples/Threads/Makefile.bor @@ -2,38 +2,31 @@ # Makefile for building the ACE Threads examples # -!include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - -TESTS = \ - auto_event \ - barrier1 \ - barrier2 \ - cancel \ - future1 \ - future2 \ - manual_event \ - process_manager \ - process_mutex \ - process_semaphore \ - reader_writer \ - recursive_mutex \ - task_one \ - task_two \ - task_three \ - task_four \ - task_five \ - thread_manager \ - thread_pool \ - thread_specific \ - token \ - tss1 \ - tss2 \ - wfmo - -all_tests: $(TESTS) - -$(TESTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +NAMES = \ + auto_event \ + barrier1 \ + barrier2 \ + cancel \ + future1 \ + future2 \ + manual_event \ + process_manager \ + process_mutex \ + process_semaphore \ + reader_writer \ + recursive_mutex \ + task_one \ + task_two \ + task_three \ + task_four \ + task_five \ + thread_manager \ + thread_pool \ + thread_specific \ + token \ + tss1 \ + tss2 \ + wfmo OBJFILES = $(OBJDIR)\$(NAME).obj @@ -43,6 +36,5 @@ CPPDIR = . LIBFILES = $(ACE_LIB) +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> !include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> - - diff --git a/include/makeinclude/recurse.bor b/include/makeinclude/recurse.bor index 0a353e73c45..39da3de86fe 100644 --- a/include/makeinclude/recurse.bor +++ b/include/makeinclude/recurse.bor @@ -5,10 +5,15 @@ # ~~~~~~~ # DIRS - list of sub-directories to invoke make in # MAKEFILES - list of makefiles to be run +# NAMES - list of names of targets to be built # !include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> +# We want to avoid all of this recursion if this is a multi-target sub-make. +!ifndef TARGET_NAME +# This is not a multi-target sub-make ... + !ifdef DIRS all: $(DIRS) @@ -133,3 +138,80 @@ $(MAKEFILES_INSTALL): $(MAKE) -$(MAKEFLAGS) $(MAKE_FLAGS) -f$(<:.Install=) install !endif + +!ifdef NAMES + +# This macro may be defined in the environment (e.g. the nightly build +# scripts) so we need to remove it. +!undef NAME + +# Multi-target recursion assumes Makefile.bor. For multiple targets in +# makefiles with other names, you must set the MAKEFILE variable to the +# name of the file. +!ifndef MAKEFILE +MAKEFILE = Makefile.bor +!endif + +# This ugliness is to remove extra spaces from between the items in the list. +NAMES_ALL_1 = $(NAMES) $(BLANK_SPACE) +NAMES_ALL_2 = $(NAMES_ALL_1: =%) +NAMES_ALL_3 = $(NAMES_ALL_2:%%=%) +NAMES_ALL_4 = $(NAMES_ALL_3:%%=%) +NAMES_ALL = $(NAMES_ALL_4:%=.All ) + +all: $(NAMES_ALL) + +$(NAMES_ALL): + $(MAKE) -$(MAKEFLAGS) $(MAKE_FLAGS) -f$(MAKEFILE) -DTARGET_NAME=$(<:.All=) + +# This ugliness is to remove extra spaces from between the items in the list. +NAMES_CLEAN_1 = $(NAMES) $(BLANK_SPACE) +NAMES_CLEAN_2 = $(NAMES_CLEAN_1: =%) +NAMES_CLEAN_3 = $(NAMES_CLEAN_2:%%=%) +NAMES_CLEAN_4 = $(NAMES_CLEAN_3:%%=%) +NAMES_CLEAN = $(NAMES_CLEAN_4:%=.Clean ) + +clean: $(NAMES_CLEAN) + +$(NAMES_CLEAN): + $(MAKE) -$(MAKEFLAGS) $(MAKE_FLAGS) -f$(MAKEFILE) -DTARGET_NAME=$(<:.Clean=) clean + +# This ugliness is to remove extra spaces from between the items in the list. +NAMES_REALCLEAN_1 = $(NAMES) $(BLANK_SPACE) +NAMES_REALCLEAN_2 = $(NAMES_REALCLEAN_1: =%) +NAMES_REALCLEAN_3 = $(NAMES_REALCLEAN_2:%%=%) +NAMES_REALCLEAN_4 = $(NAMES_REALCLEAN_3:%%=%) +NAMES_REALCLEAN = $(NAMES_REALCLEAN_4:%=.RealClean ) + +realclean: $(NAMES_REALCLEAN) + +$(NAMES_REALCLEAN): + $(MAKE) -$(MAKEFLAGS) $(MAKE_FLAGS) -f$(MAKEFILE) -DTARGET_NAME=$(<:.RealClean=) realclean + +# This ugliness is to remove extra spaces from between the items in the list. +NAMES_INSTALL_1 = $(NAMES) $(BLANK_SPACE) +NAMES_INSTALL_2 = $(NAMES_INSTALL_1: =%) +NAMES_INSTALL_3 = $(NAMES_INSTALL_2:%%=%) +NAMES_INSTALL_4 = $(NAMES_INSTALL_3:%%=%) +NAMES_INSTALL = $(NAMES_INSTALL_4:%=.Install ) + +install: $(NAMES_INSTALL) + +$(NAMES_INSTALL): + $(MAKE) -$(MAKEFLAGS) $(MAKE_FLAGS) -f$(MAKEFILE) -DTARGET_NAME=$(<:.Install=) install + +!endif + +!else +# This is a multi-target sub-make ... + +# Set the name of the current target. +NAME = $(TARGET_NAME) + +# The list of object files defaults to the contents of a macro based on the +# target name. +!ifndef OBJFILES +OBJFILES = $($(NAME)_OBJFILES) +!endif + +!endif diff --git a/netsvcs/clients/Logger/Makefile.bor b/netsvcs/clients/Logger/Makefile.bor index 9e8a4c7a5a9..e7fd9236428 100644 --- a/netsvcs/clients/Logger/Makefile.bor +++ b/netsvcs/clients/Logger/Makefile.bor @@ -1,16 +1,16 @@ -APPS = \ +NAMES = \ direct_logging \ indirect_logging -build_apps: $(APPS) +OBJFILES=$(OBJDIR)\$(NAME).obj -$(APPS): - $(MAKE) -f Makefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +CFLAGS = $(ACE_CFLAGS) -!ifdef NAME -OBJFILES=$(OBJDIR)\$(NAME).obj -!endif +CPPDIR = . + +LIBFILES = $(ACE_LIB) -!include <$(ACE_ROOT)\netsvcs\build.bor> +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> +!include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/tests/Makefile.bor b/tests/Makefile.bor index f6d0f64d07c..f064a0d67e0 100644 --- a/tests/Makefile.bor +++ b/tests/Makefile.bor @@ -2,9 +2,7 @@ # Makefile for building the ACE tests # -!include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - -TESTS = \ +NAMES = \ Aio_Platform_Test \ ARGV_Test \ Atomic_Op_Test \ @@ -21,8 +19,8 @@ TESTS = \ CDR_Test \ Collection_Test \ Conn_Test \ - Config_Test \ - Dirent_Test \ + Config_Test \ + Dirent_Test \ DLL_Test \ DLList_Test \ Dynamic_Priority_Test \ @@ -41,7 +39,7 @@ TESTS = \ Malloc_Test \ Map_Manager_Test \ Map_Test \ - MEM_Stream_Test \ + MEM_Stream_Test \ Mem_Map_Test \ Message_Block_Test \ Message_Queue_Notifications_Test \ @@ -100,21 +98,7 @@ TESTS = \ UPIPE_SAP_Test \ XtReactor_Test -!ifdef TARGET_NAME -NAME = $(TARGET_NAME) -!else -!undef NAME - -all: $(TESTS) - -$(TESTS): - $(MAKE) -fMakefile.bor -DTARGET_NAME=$@ $(MAKE_FLAGS) - -clean: $(TESTS:_Test=_Test.Clean) - -$(TESTS:_Test=_Test.Clean): - $(MAKE) -fMakefile.bor -DTARGET_NAME=$(@:.Clean=) $(MAKE_FLAGS) clean -!endif +DIRS = RMCast OBJFILES = $(OBJDIR)\$(NAME).obj @@ -124,4 +108,5 @@ CPPDIR = . LIBFILES = $(ACE_LIB) +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> !include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> diff --git a/tests/RMCast/Makefile.bor b/tests/RMCast/Makefile.bor index 4ea559be0c3..6606e571664 100644 --- a/tests/RMCast/Makefile.bor +++ b/tests/RMCast/Makefile.bor @@ -8,34 +8,26 @@ # #---------------------------------------------------------------------------- -!include <$(ACE_ROOT)\include\makeinclude\make_flags.bor> - -TESTS = \ - RMCast_Fragment_Test \ - RMCast_Membership_Test \ - RMCast_Reassembly_Test \ - RMCast_Reordering_Test \ - RMCast_Retransmission_Test \ - RMCast_UDP_Best_Effort_Test - -all_tests: $(TESTS) - -$(TESTS): - $(MAKE) -fMakefile.bor -DNAME=$@ $(MAKE_FLAGS) $(BINDIR)\$@.exe +NAMES = \ + RMCast_Fragment_Test \ + RMCast_Membership_Test \ + RMCast_Reassembly_Test \ + RMCast_Reordering_Test \ + RMCast_Retransmission_Test \ + RMCast_UDP_Best_Effort_Test OBJFILES = $(OBJDIR)\$(NAME).obj CFLAGS = \ - $(ACE_CFLAGS) \ - $(ACE_RMCAST_CFLAGS) \ - -I.. + $(ACE_CFLAGS) \ + $(ACE_RMCAST_CFLAGS) \ + -I.. CPPDIR = .;.. LIBFILES = \ - $(ACE_LIB) \ - $(ACE_RMCAST_LIB) + $(ACE_LIB) \ + $(ACE_RMCAST_LIB) +!include <$(ACE_ROOT)\include\makeinclude\recurse.bor> !include <$(ACE_ROOT)\include\makeinclude\build_exe.bor> - - -- cgit v1.2.1