2 # TopLevel Makefile for the Paradyn (and DyninstAPI) system.
4 # $Id: Makefile,v 1.95 2008/10/03 21:12:39 legendre Exp $
9 # Include the make configuration specification (site configuration options)
12 # Note that the first rule listed ("all") is what gets made by default,
13 # i.e., if make is given no arguments. Don't add other targets before all!
16 # Include component dependency information
17 include ./make.components
19 .PHONY: $(Everything) $(Everything_install) $(Everything_tests) $(Everything_tests_install) install world intro comp_intro ready clean distclean depend all
20 .PHONY: DyninstAPI SymtabAPI StackwalkerAPI basicComps subSystems testsuites InstructionAPI ValueAdded DepGraphAPI ParseAPI DynC_API DataflowAPI ProcControlAPI
22 BUILD_ID = "$(SUITE_NAME) v$(RELEASE_NUM)$(BUILD_MARK)$(BUILD_NUM)"
24 $(Everything) $(Everything_tests):
25 @if [ -f $@/$(PLATFORM)/Makefile ]; then \
26 $(MAKE) -C $@/$(PLATFORM); \
27 elif [ -f $@/Makefile ]; then \
30 echo $@ has no Makefile; \
34 $(Everything_install) $(Everything_tests_install):
35 @if [ -f $(@:%_install=%)/$(PLATFORM)/Makefile ]; then \
36 $(MAKE) -C $(@:%_install=%)/$(PLATFORM) install; \
37 elif [ -f $(@:%_install=%)/Makefile ]; then \
38 $(MAKE) -C $(@:%_install=%) install; \
40 echo $(@:%_install=%) has no Makefile; \
45 @$(MAKE) -C testsuite/$(PLATFORM) $(@:%_testsuite=%)
47 install: intro ready $(fullSystem_install) testsuite_install
49 world: intro $(fullSystem)
51 +@for subsystem in $(fullSystem); do \
52 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
53 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
60 +@for subsystem in $(Everything) $(Everything_tests); do \
61 if [ -f $$subsystem/$(PLATFORM)/Makefile ]; then \
62 $(MAKE) -C $$subsystem/$(PLATFORM) $@; \
68 # Check that the main installation directories, etc., are ready for a build,
69 # creating them if they don't already exist!
71 @echo "[User:`whoami` Host:`hostname` Platform:$(PLATFORM) Date:`date '+%Y-%m-%d'`]"
72 +@for installdir in $(LIBRARY_DEST) $(PROGRAM_DEST) $(INCLUDE_DEST); do \
73 if [ -d $$installdir ]; then \
74 echo "Installation directory $$installdir exists..."; \
77 echo "Creating installation directory $$installdir ...";\
78 $(INSTALL) -d -p $$installdir; \
83 @echo "Build of $(BUILD_ID) on $(PLATFORM) for $(DEFAULT_COMPONENT): $(fullSystem)"
86 +@echo "Primary compiler for Paradyn build is:"
87 +@if [ `basename $(CXX)` = "xlC" ]; then \
95 # Before refactoring the Makefile, we used to support these build targets. Recreate them with
97 DyninstAPI: comp_intro dyninstAPI parseThat dyninstAPI_testsuite
98 SymtabAPI: comp_intro symtabAPI symtabAPI_testsuite
99 StackwalkerAPI: comp_intro stackwalk
100 basicComps: comp_intro dyninstAPI
101 subSystems: comp_intro dyninstAPI
102 testsuites: comp_intro testsuite
103 InstructionAPI: comp_intro instructionAPI instructionAPI_testsuite
104 ValueAdded: comp_intro valueAdded/sharedMem
105 DepGraphAPI: comp_intro depGraphAPI
106 ParseAPI: comp_intro parseAPI
107 DynC_API: comp_intro dynC_API
108 DataflowAPI: comp_intro parseAPI
109 ProcControlAPI: comp_intro proccontrol proccontrol_testsuite
111 # Testsuite dependencies
112 parseThat: $(filter-out parseThat,$(parseThat))
113 testsuite: $(fullSystem_notests)
114 testsuite_install: $(fullSystem_install_notests)
116 # For each dependency in make.components (targ), create a rule that looks like
117 # targ: $filter-out( $(targ),$($(targ)))
118 # Thus when targ is stackwalk we will evaluate to:
119 # stackwalk: dynutil common proccontrol
120 $(foreach targ,$(Everything),$(eval $(targ): $(filter-out $(targ),$($(targ)))))
122 # Same as above, but for %_install targets
123 $(foreach targ,$(Everything),$(eval $(targ)_install: $(patsubst %,%_install,$(filter-out $(targ),$($(targ))))))
125 # Now add testsuite dependency rules. An example of these expanding is:
126 # dyninstAPI_testsuite: dyninstAPI
127 $(foreach targ,$(test_comps),$(eval $(targ)_testsuite: $(targ)))
130 +for subsystem in $(fullSystem); do \
131 if [ -f $$subsystem/docs/Makefile ]; then \
132 $(MAKE) -C $$subsystem/docs $@; \
139 # The "make nightly" target is what should get run automatically every
140 # Note that the nightlies will build the testsuite with all mutatees
141 # at all optimization levels--this gets huge
143 $(MAKE) -C testsuite/$(PLATFORM) all
149 # Used for UW nightly builds
150 nightly: ready $(Everything_install) parseThat_install testsuite-nightly