2 #----------------------------------------------------------------------------
5 # @file <%project_file%>
7 # This file was automatically generated by MPC. Any changes made directly to
8 # this file will be lost the next time it is generated.
10 #----------------------------------------------------------------------------
12 MAKEFILE = <%project_file%>
13 DEPENDENCY_FILE = .depend.<%project_name%>
14 <%if(compares(build_dir_per_project, 1))%>
15 VDIR_PRJ = <%project_name%>/
19 <%if(contains(idlflags,-DGEN_IDL_MAKE_DEPS))%>
20 <%foreach(idl_files)%>
21 IDL_DEPENDENCY_FILE<%forcount%> = .depend.<%project_name%>_Idl<%forcount%>
24 IDL_DEPENDENCY_FILES += \
25 <%foreach(idl_files)%>
26 .depend.<%project_name%>_Idl<%forcount%><%fornotlast(" \\")%>
31 BIN_UNCHECKED = <%exename%>
35 <%if(need_staticflags)%>
40 ## LIB_CHECKED may be set to empty later on in this file
41 LIB_UNCHECKED = $(LIB_PREFIX)<%libname_prefix%><%staticname%>.$(LIBEXT)
42 LIB_CHECKED = $(LIB_UNCHECKED)
43 LIB_NAME = $(LIB_PREFIX)<%libname_prefix%><%staticname%>
50 ## SHLIB may be set to empty later on in this file
51 SHLIB_UNCHECKED = $(LIB_PREFIX)<%libname_prefix%><%sharedname%>.$(SOEXT)
52 SHLIB = $(SHLIB_UNCHECKED)
56 TAO_ROOT ?= $(ACE_ROOT)/TAO
59 <%if(grouped_source_files)%>
60 <%foreach(grouped_source_files)%>
61 <%grouped_source_file%> = \
62 <%foreach(uniq(grouped_source_file->files))%>
63 <%grouped_source_file->file%><%fornotlast(" \\")%>
68 <%foreach(grouped_source_files)%>
69 $(<%grouped_source_file%>)<%fornotlast(" \\")%>
74 <%foreach(uniq(source_files))%>
75 <%source_file%><%fornotlast(" \\")%>
80 <%if(contains(idlflags,-DGEN_IDL_MAKE_DEPS))%>
81 <%foreach(idl_files)%>
82 IDL_DEPS_FLAGS<%forcount%> = <%if(flag_overrides(idl_file, commandflags))%><%flag_overrides(idl_file, commandflags)%><%else%><%idlflags%><%endif%>
83 IDL_DEPS<%forcount%> = <%idl_file%>
91 LIBPATHS := <%libpaths%>
93 #----------------------------------------------------------------------------
94 # Include macros and targets
95 #----------------------------------------------------------------------------
98 XERCESLIB ?= <%xerceslib%>
101 LDLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
104 ACE_SHLIBS =<%foreach(libs)%> -l<%libname_prefix%><%lib%><%endfor%><%foreach(lit_libs)%> -l<%lit_lib%><%endfor%><%foreach(pure_libs)%> <%pure_lib%><%endfor%>
108 TAO_IDL = <%tao_idl%>
111 TAO_IDL_DEP = <%tao_idl_dep%>$(EXEEXT)
114 TAO_IDLFLAGS = <%tao_idlflags%><%if(!compares(vms_old_make, 1))%>$(if $(ARCH), -g $(call ADD_QUOTE,$(call ADD_ARCH,$(ACE_ROOT)/bin/ace_gperf)))<%endif%>
125 COLLAPSE_SLASHES = $(if $(findstring //,$(1)),$(call COLLAPSE_SLASHES,$(subst //,/,$(1))),$(1))
126 INSBIN ?= <%if(compares(vms_old_make, 1))%><%install%><%else%>$(call COLLAPSE_SLASHES,<%install%>)<%endif%>
136 INSBIN = $(PWD)<%if(targetoutdir)%>/<%targetoutdir%><%endif%>
140 INSBIN := $(INSBIN)/<%targetoutdir%>
145 OUTPUT_DIRECTORY = $(if $(ARCH),$(if $(INSBIN),$(INSBIN)/$(ARCH)),$(INSBIN))
147 OUTPUT_DIRECTORY = $(if $(ARCH),./$(ARCH))
150 <%if(dllout || libout)%>
151 COLLAPSE_SLASHES = $(if $(findstring //,$(1)),$(call COLLAPSE_SLASHES,$(subst //,/,$(1))),$(1))
152 INSLIB ?= <%if(compares(vms_old_make, 1))%><%if(dllout)%><%dllout%><%else%><%libout%><%endif%><%else%>$(call COLLAPSE_SLASHES,<%if(dllout)%><%dllout%><%else%><%libout%><%endif%>)<%endif%>
162 INSLIB = $(PWD)<%if(targetoutdir)%>/<%targetoutdir%><%endif%>
165 INSLIB := $(INSLIB)/<%targetoutdir%>
168 OUTPUT_DIRECTORY = $(INSLIB)
172 VDIR = <%targetoutdir%>.obj/
173 VSHDIR = <%targetoutdir%>.shobj/
176 include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
178 <%marker(extension)%>
179 <%marker(deferred-extension)%>
182 GNUACE_PROJECT_VERSION = <%version%>
184 GNUACE_PROJECT_VERSION ?= $(ACE_VERSION)
187 <%if(resource_files)%>
190 <%foreach(resource_files)%>
191 <%resource_file%><%fornotlast(" \\")%>
195 RC_INCLUDE_FLAG ?= --include-dir=
197 <%foreach(includes)%>
198 $(RC_INCLUDE_FLAG)<%include%><%fornotlast(" \\")%>
205 TEMPINCDIR := $(TEMPINCDIR)/<%project_name%>
209 ifneq ($(OUTPUT_DIRECTORY),)
210 .PHONY: create_output_directory.local
211 all: create_output_directory.local
212 create_output_directory.local:
213 -@$(MKDIR) "$(OUTPUT_DIRECTORY)" $(ACE_NUL_STDERR)
216 <%if(sharedname || staticname || exename)%>
217 <%if(libs && libpaths)%>
218 # turn off libcheck if doing a dry run
219 ifeq ($(findstring n, $(MAKEFLAGS)),n)
222 # turn off libcheck if keep going was passed too
223 ifeq ($(findstring k, $(MAKEFLAGS)),k)
226 ifeq ($(LIBCHECK_PREFIX),)
227 # If the user hasn't specified a place to look for installed libraries, let's set
228 # a reasonable default
229 LIBCHECK_PREFIX = /usr
231 LIBCHECK ?= $(filter-out $(foreach lib,<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>,$(findstring $(lib),$(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%><%libpath%>/<%targetoutdir%> <%endif%><%libpath%> $(if $(ARCH),<%libpath%>/$(ARCH)) <%endfor%>$(LIBCHECK_PREFIX)/lib $(LIBCHECK_PREFIX)/lib64 $(LIBCHECK_EXTRA_PATHS) $(INSLIB),$(wildcard $(libpath)/$(LIB_PREFIX)$(lib).* $(libpath)/$(lib).lib)))),<%foreach(libs)%><%libname_prefix%><%lib%><%fornotlast(" ")%><%endfor%>)
244 <%foreach(requires)%>
245 ifeq ($(<%require%>),1)
248 ifneq ($(<%avoid%>),1)
250 ifneq ($(LIBCHECK), 1)
270 <%foreach(requires)%>
283 ifeq (,$(<%tagname%>))
285 <%foreach(requires)%>
286 ifeq ($(<%require%>),1)
289 ifneq ($(<%avoid%>),1)
302 <%foreach(requires)%>
315 <%foreach(requires)%>
316 ifeq ($(<%require%>),1)
319 ifneq ($(<%avoid%>),1)
321 <%foreach(tagchecks)%>
322 ifeq (<%tagcheck%>, $(findstring <%tagcheck%>, $(<%tagname%>)))
324 <%foreach(tagchecks)%>
337 <%foreach(requires)%>
348 <%foreach(requires)%>
349 ifeq ($(<%require%>),1)
352 ifneq ($(<%avoid%>),1)
354 ifeq ($(LIBCHECK), 1)
355 BIN = $(BIN_UNCHECKED)$(EXEEXT)
357 ARCH_BIN = $(ARCH)/$(BIN)
367 <%foreach(requires)%>
373 # If it contains ../ at all use notdir.
374 OBJS = $(foreach var, $(addsuffix .$(OBJEXT), $(basename $(FILES)) $(RESOURCES)), $(if $(findstring ../,$(var)),$(notdir $(var)),$(var)))
377 <%if(sharedname || staticname)%>
382 include $(ACE_ROOT)/include/makeinclude/macros.GNU
383 include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
384 include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
389 INSTALL = $(VBIN:%=$(INSBIN)/%)
390 CLEANUP_INSTALL += $(CLEANUP_BIN:%=$(INSBIN)/$(if $(ARCH),$(ARCH)/)%$(VAR)$(EXEEXT))
395 <%if(sharedname || staticname)%>
396 include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU
400 ACE_PCH_SOURCE = <%pch_source%>
401 ACE_PCH_FILE = <%basename(pch_header)%>.gch
403 ifeq ($(pchsupport),1)
405 CPPFLAGS +=<%foreach(pch_defines)%> -D<%pch_define%><%endfor%>
408 $(addprefix $(VDIR), $(OBJS)): $(VDIR)$(ACE_PCH_FILE)
409 $(VSHOBJS): $(VSHDIR)$(ACE_PCH_FILE)
413 include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
414 ifeq ($(VXWORKSLINK),1)
415 include $(TGT_DIR)/h/make/rules.$(PRJ_TYPE)
418 <%foreach(source_files)%>
419 <%if(flag_overrides(source_file, buildflags))%>
420 $(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
421 @$(MKDIR) $(VDIR)<%dirname(source_file)%>
422 <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
425 ifneq ($(VSHDIR), $(VDIR))
426 $(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
427 @$(MKDIR) $(VSHDIR)<%dirname(source_file)%>
428 <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%flag_overrides(source_file, buildflags)%> $(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
432 <%if(dirname(source_file) && !contains(source_file, \.\./))%>
433 <%if(starts_with(source_file, \$) || !ends_with(source_file, \.cpp))%>
434 $(VDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
435 @$(MKDIR) $(VDIR)<%dirname(source_file)%>
436 <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
439 ifneq ($(VSHDIR), $(VDIR))
440 $(VSHDIR)<%noextension(source_file)%>.$(OBJEXT): <%source_file%>
441 @$(MKDIR) $(VSHDIR)<%dirname(source_file)%>
442 <%if(ends_with(source_file, \.c))%>$(COMPILE.c)<%else%>$(COMPILE.cc)<%endif%> <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(ACE_USE_PCH_OPT) $(PIC) $(CC_OUTPUT_FLAG)$(CC_OUTPUT_FLAG_SEP)$@ $<
450 ifeq ($(VXWORKSLINK),1)
451 LDLIBPATH =<%foreach(libpaths)%> <%if(targetoutdir)%>-L<%libpath%>/<%targetoutdir%> <%endif%>-L<%libpath%><%endfor%><%if(linkflags)%> <%linkflags%><%endif%>
453 LDFLAGS +=<%foreach(libpaths)%> <%if(targetoutdir)%>-L<%libpath%>/<%targetoutdir%> <%endif%>-L<%libpath%> $(if $(ARCH),-L<%libpath%>/$(ARCH))<%endfor%><%if(linkflags)%> <%linkflags%><%endif%>
457 CPPFLAGS +=<%foreach(includes)%> -I<%include%><%endfor%>
460 CPPFLAGS +=<%foreach(macros)%> -D<%macro%><%endfor%>
462 <%if(compile_flags)%>
463 CPPFLAGS += <%compile_flags%>
466 ifeq ($(shared_libs),1)
468 CPPFLAGS +=<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
472 <%if(staticflags || exename)%>
473 ifeq ($(static_libs),1)
475 CPPFLAGS +=<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
478 ifeq ($(link_groups), 1)
479 LDLIBS := -Wl,--start-group $(LDLIBS) -Wl,--end-group
485 #----------------------------------------------------------------------------
487 #----------------------------------------------------------------------------
491 @echo <%project_name%> will not be built due to the following missing library: $(LIBCHECK) >&2
494 <%foreach(requires)%>
495 ifneq ($(<%require%>),1)
496 requires_disabled_macros += <%require%>
499 .PHONY: require_warning
501 @echo <%project_name%> will not be built due to the following disabled make macros: $(requires_disabled_macros)>&2
506 ifeq ($(<%avoid%>),1)
507 avoids_enabled_macros += <%avoid%>
510 .PHONY: avoid_warning
512 @echo <%project_name%> will not be built due to the following enabled make macros: $(avoids_enabled_macros)>&2
516 ## Some OS's have /bin/test others only have /usr/bin/test
517 ifeq ($(wildcard /bin/test), /bin/test)
520 ifeq ($(wildcard /usr/bin/test), /usr/bin/test)
521 TEST_EXE = /usr/bin/test
525 SPACE = $(should_be_unset) $(should_be_unset)
526 <%foreach(custom_types)%>
527 <%if(custom_type->libpath)%>
528 export DYLD_LIBRARY_PATH := $(DYLD_LIBRARY_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
529 export LD_LIBRARY_PATH := $(LD_LIBRARY_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
530 export SHLIB_PATH := $(SHLIB_PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
531 export LIBPATH := $(LIBPATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
532 export PATH := $(PATH):<%custom_type->libpath%>$(if $(ARCH),:<%custom_type->libpath%>/$(ARCH))
535 <%foreach(custom_type->input_files)%>
536 <%if(custom_type->input_file->output_files)%>
537 GENERATED_DIRTY +=<%foreach(custom_type->input_file->output_files)%> <%custom_type->input_file->output_file%><%endfor%>
538 <%if(precious_files)%>
539 PRECIOUS_FILES +=<%foreach(precious_files)%><%foreach(custom_type->input_file->output_files)%><%if(contains(custom_type->input_file->output_file, precious_file))%> <%custom_type->input_file->output_file%><%endif%><%endfor%><%endfor%>
541 <%if(custom_type->input_file->non_source_output_files)%>
542 OBJS_DEPEND_ON_GENERATED = 1
544 <%foreach(custom_type->input_file->output_files)%>
545 <%if(forlast && !forfirst)%>
546 ## More than one file is generated by the command and therefore
547 ## it can not be run in parallel. Unfortunately, there is no way to
548 ## say that only this rule can't be run in parallel. However, we can
549 ## determine if the generated files have already been generated. If that's
550 ## the case, then we don't need this special rule.
551 ifeq ($(wildcard $(GENERATED_DIRTY)), $(GENERATED_DIRTY))
552 ## If we can find /bin/test, then we will continue
554 ## If all of the generated files are there, then we need to check
555 ## and make sure that the generated files are up-to-date. If they are not
556 ## then we need the special rule.
557 ifeq ($(shell<%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%custom_type->input_file%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%> echo 0),)
559 <%if(flag_overrides(custom_type->input_file, dependent) || custom_type->dependent || flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)%>
561 ## By this point, all of the generated files are here and up-to-date
562 ## with respect to the source file. Now we need to make sure that
563 ## they are up-to-date with respect to the generation tool. If the tool
564 ## is newer than the generated files, then we need the special rule.
565 ifeq ($(shell<%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%endif%><%endif%><%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%><%foreach(custom_type->input_file->output_files)%> $(TEST_EXE) "<%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%>" -nt "<%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%>" 2> /dev/null ||<%endfor%><%endfor%><%endif%><%endif%> echo 0),)
578 <%foreach(custom_type->input_file->output_files)%><%custom_type->input_file->output_file%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%><%foreach(custom_type->input_file->dependencies)%> <%if(contains(custom_type->input_file->dependencie, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%custom_type->input_file->dependencie%>)<%else%><%custom_type->input_file->dependencie%><%endif%><%endfor%><%endif%><%if(flag_overrides(custom_type->input_file, dependent))%><%foreach(dep, flag_overrides(custom_type->input_file, dependent))%> <%if(contains(dep, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dep%><%else%>$(call ADD_ARCH,<%dep%>)<%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent)%><%foreach(custom_type->dependent)%> <%if(contains(custom_type->dependent, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%custom_type->dependent%><%else%>$(call ADD_ARCH,<%custom_type->dependent%>)<%endif%><%endif%><%endfor%><%endif%><%endif%>
579 <%if(flag_overrides(custom_type->input_file, gendir))%>
580 <%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%>
581 $(MKDIR) <%flag_overrides(custom_type->input_file, gendir)%>
584 <%if(compares(vms_old_make, 1))%><%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%><%else%>$(if $(findstring ",<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>),<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>,$(call ADD_QUOTE,$(call ADD_ARCH,<%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%>)))<%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> $@<%else%><%custom_type->input_file%><%endif%>
585 <%if(flag_overrides(custom_type->input_file, postcommand))%>
586 <%foreach(custom_type->input_file)%>
587 <%flag_overrides(custom_type->input_file, postcommand)%>
590 <%if(custom_type->postcommand)%>
591 <%foreach(custom_type->input_file)%>
592 <%custom_type->postcommand%>
597 <%if(custom_type->pch_postrule)%>
598 <%foreach(custom_type->input_file->source_output_files)%>
599 @echo '#include "<%pch_header%>"' > temp.$$$$ && cat <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temp.$$$$ && mv temp.$$$$ <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>/<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
604 <%if(flag_overrides(custom_type->input_file, dependent_libs) || custom_type->dependent_libs)%>
605 ifneq ($(static_libs_only),1)
606 ifneq ($(CROSS-COMPILE),1)
607 <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>:<%if(flag_overrides(custom_type->input_file, dependent_libs))%><%foreach(dep_lib, flag_overrides(custom_type->input_file, dependent_libs))%> <%if(contains(dep_lib, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(dep_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(dep_lib)%>.$(SOEXT))<%endif%><%endif%><%endfor%><%else%><%if(custom_type->dependent_libs)%><%foreach(custom_type->dependent_libs)%> <%if(contains(custom_type->dependent_lib, [\s\$]))%>$(subst $(SPACE),\$(SPACE),<%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%>)<%else%><%if(compares(vms_old_make, 1))%><%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT)<%else%>$(call ADD_ARCH,<%dirname(custom_type->dependent_lib)%>/$(LIB_PREFIX)<%libname_prefix%><%basename(custom_type->dependent_lib)%>.$(SOEXT))<%endif%><%endif%><%endfor%><%endif%><%endif%>
615 ifneq ($(GENERATED_DIRTY),)
616 .PRECIOUS: $(GENERATED_DIRTY)
618 ## If the generated files are anything but source files, we need to
619 ## ensure that those files are generated before we attempt to build anything
621 ifeq ($(OBJS_DEPEND_ON_GENERATED),1)
622 $(VDIR)$(ACE_PCH_FILE) $(addprefix $(VDIR), $(OBJS)): $(GENERATED_DIRTY)
623 $(VSHDIR)$(ACE_PCH_FILE) $(VSHOBJS): $(GENERATED_DIRTY)
626 <%foreach(requires)%>
627 ifeq ($(<%require%>),1)
630 ifneq ($(<%avoid%>),1)
632 all: $(GENERATED_DIRTY)
636 <%foreach(requires)%>
644 ADDITIONAL_IDL_TARGETS += $(GENERATED_DIRTY)
645 idl_stubs: $(ADDITIONAL_IDL_TARGETS)
648 # This assignment forces make to run the idl_stubs
649 # target before building any of the source files.
650 FORCED_IDL_STUBS = <%source_files%> <%if(pch_source)%>$(ACE_PCH_SOURCE)<%endif%>
651 <%foreach(custom_types)%>
652 <%foreach(custom_type->input_files)%>
653 <%if(custom_type->input_file->source_output_files)%>
654 <%foreach(custom_type->input_file->source_output_files)%>
655 FORCED_IDL_STUBS := $(FORCED_IDL_STUBS:<%if(flag_overrides(custom_type->input_file, gendir))%><%if(!compares(flag_overrides(custom_type->input_file, gendir),.))%><%flag_overrides(custom_type->input_file, gendir)%>/<%endif%><%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>=)
661 ifneq ($(FORCED_IDL_STUBS),)
662 $(FORCED_IDL_STUBS): idl_stubs
668 ifneq ($(VXWORKSLINK),1)
669 <%if(libs && libpaths)%>
670 ifeq ($(static_libs_only), 1)
671 ifeq ($(use_dep_libs), 1)
672 DEPLIBS = $(foreach lib,<%foreach(libs)%> <%libname_prefix%><%lib%><%endfor%> <%lit_libs%>, $(foreach libpath,<%foreach(libpaths)%><%if(targetoutdir)%> <%libpath%>/<%targetoutdir%><%endif%> <%libpath%><%endfor%>, $(wildcard $(libpath)/$(LIB_PREFIX)$(lib).$(LIBEXT))))
677 $(VBIN): $(addprefix $(VDIR), $(OBJS)) $(DEPLIBS)
678 ifneq (,$(LINK.cc.override))
681 $(LINK.cc) $(LDFLAGS) $(CC_OUTPUT_FLAG) $@ $(filter-out %.a,$^) $(VLDLIBS) $(POSTLINK)
687 <%if(contains(idlflags,-DGEN_IDL_MAKE_DEPS))%>
688 incremental_depend_idl::
689 <%foreach(idl_files)%>
690 @$(RM) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old
691 @cp $(IDL_DEPENDENCY_FILE<%forcount%>) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old
692 $(DEPGEN_ENV) $(DEPGEN) -A $(DEPEND_CMD_ARGS) -f $(IDL_DEPENDENCY_FILE<%forcount%>) \
693 $(IDL_DEPS_FLAGS<%forcount%>) -t gnuidl -DMAKEDEPEND $(IDL_DEPS<%forcount%>)
694 @if cmp -s $(IDL_DEPENDENCY_FILE<%forcount%>) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old ;\
695 then echo "GNUmakefile idl dependencies unchanged for $(IDL_DEPS<%forcount%>)." ;\
697 echo "GNUmakefile idl dependencies updated for $(IDL_DEPS<%forcount%>)." ;\
699 $(RM) $(IDL_DEPENDENCY_FILE<%forcount%>)_idl.old ;
705 ifneq ($(GENERATED_DIRTY),)
706 -$(RM) -r $(filter-out $(PRECIOUS_FILES),$(GENERATED_DIRTY))
713 <%foreach(requires)%>
714 ifeq ($(<%require%>),1)
717 ifneq ($(<%avoid%>),1)
724 <%foreach(avoids requires)%>
731 .PHONY: __postbuild__
733 __postbuild__: $(VBIN) $(INSTALL)
735 <%if(sharedname || staticname)%>
736 __postbuild__: $(VLIBS) $(INSTALL)
738 <%foreach(requires)%>
739 ifeq ($(<%require%>),1)
742 ifneq ($(<%avoid%>),1)
744 __postbuild__: $(GENERATED_DIRTY)
745 <%foreach(avoids requires)%>
752 <%foreach(requires)%>
753 ifeq ($(<%require%>),1)
756 ifneq ($(<%avoid%>),1)
759 <%foreach(avoids requires)%>
766 install: <%if(postbuild)%>__postbuild__<%else%>all<%endif%>
768 ifneq ($(INSTALL_PREFIX),)
769 ifneq ($(install_rpath),0)
770 LD_RPATH ?= -Wl,-rpath,
771 LDFLAGS += $(LD_RPATH)$(INSTALL_PREFIX)/$(INSTALL_LIB) $(LD_RPATH_FLAGS)
775 <%if(install_this_target)%>
777 INST_DIR ?= <%if(install_dir)%>/<%install_dir%><%else%>/$(notdir $(PWD))<%endif%>
779 SPACE = $(should_be_unset) $(should_be_unset)
780 INSTALLER ?= $(MPC_ROOT)/prj_install.pl
781 CUSTOM_INST_TAGS = $(sort <%custom_install%> <%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%custom_type%> <%endif%><%endfor%><%endfor%>)
783 <%if(staticname || sharedname)%>
784 <%if(install_headers)%>
785 LIB_INST_TAGS = header_files template_files inline_files$(if $(CUSTOM_INST_TAGS), $(CUSTOM_INST_TAGS))
786 LIB_INST_LOCATIONS = $(foreach tag,$(LIB_INST_TAGS),-b $(tag)=include$(INST_DIR))
789 ifeq ($(shared_libs),1)
791 INST_TAGS = lib_output$(if $(LIB_INST_TAGS), $(LIB_INST_TAGS))
792 INST_LOCATIONS = $(LIB_INST_LOCATIONS) -o lib_output=$(INSTALL_LIB)
793 <%if(!install_headers)%>
799 INST_TAGS = exe_output
800 INST_LOCATIONS = -o exe_output=bin
803 INST_TAGS = $(CUSTOM_INST_TAGS)<%if(custom_inst_tags)%> <%custom_inst_tags%><%endif%>
804 INST_LOCATIONS = $(foreach tag,$(INST_TAGS),-b $(tag)=include$(INST_DIR))
808 DATA_INST_TAGS = <%foreach(custom_types)%><%if(compares(custom_type, installdata_files))%><%if(custom_type->input_files)%>installdata_files<%endif%><%endif%><%endfor%>
809 INST_LOCATIONS += $(if $(DATA_INST_TAGS),-x installdata_files -b installdata_files=share$(INST_DIR))
810 INST_TAGS := $(INST_TAGS)$(if $(DATA_INST_TAGS), $(DATA_INST_TAGS))
812 ifeq ($(INSTALLER),/prj_install.pl)
813 INSTALLER = $(ACE_ROOT)/MPC/prj_install.pl
817 <%foreach(requires)%>
818 ifeq ($(<%require%>),1)
821 ifneq ($(<%avoid%>),1)
825 @echo Nothing to install.
827 ifeq ($(INSTALL_PREFIX),)
828 @echo The variable INSTALL_PREFIX must be set to install.
829 @echo If binaries are already built and you want to use RPATH,
830 @echo they must be rebuilt after changing INSTALL_PREFIX.
833 perl -ne'if (/^#END MPC-Generated Install Info/) {exit 0}' \
834 -e'elsif (/^#BEGIN MPC-Generated Install Info/) {$$ok=1}' \
835 -e'elsif ($$ok && s/^#//) {print}' $(MAKEFILE) | \
836 $(INSTALLER) -i -s $(subst $(SPACE),$(COMMA),$(INST_TAGS)) \
837 $(INST_LOCATIONS) $(if $(ARCH),-d $(ARCH)) $(PRJINST_OPTIONS) \
838 $(DESTDIR)$(INSTALL_PREFIX)
839 <%foreach(custom_types)%>
840 <%if(compares(custom_type, pkgconfig_files))%>
841 <%if(custom_type->input_files)%>
842 $(ACE_ROOT)/bin/ace_install_pkgconfig.pl <%custom_type->input_files%> --destdir "$(DESTDIR)" --prefix $(INSTALL_PREFIX) --libdir $(INSTALL_LIB) --libs "$(LIBS)" --version $(GNUACE_PROJECT_VERSION)<%foreach(pkgconfig_variables)%> --custom "<%pkgconfig_variable%>"<%endfor%>
846 <%marker(postinstall)%>
849 <%foreach(requires avoids)%>
854 #BEGIN MPC-Generated Install Info
856 #END MPC-Generated Install Info