Hi, I am trying to do something similar to the profiling target in the llvm-test suite makefiles, but I'm not a gmake expert, so I am stumped on something: I did some copy-and-paste of the profile code in llvm-test/Makefile.programs and got it working within SingleSource/Benchmarks, where I can say 'make pmf' or 'make profile' and get a build with profiling results or my own stuff. This works in any leaf directory I've tried so far. The problem is that other directories, like the top level, or say MultiSource/Benchmarks/, neither 'make profile' nor 'make pmf' work. It simply says this: % make pmf make: Nothing to be done for `pmf'. Am I missing something here - shouldn't I be able to set it up so I can build the whole suite with my option? I've attached my diff for Makefile.programs, but I think the problem exists for profile also without my changes. Maybe I'm just missing a detail about gmake here... Thanks for any help, -mike -- Michael McCracken UCSD CSE PhD Candidate research: http://www.cse.ucsd.edu/~mmccrack/ misc: http://michael-mccracken.net/blog/ -------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile.programs.diff Type: application/octet-stream Size: 2191 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20051020/98be8eaf/attachment.obj>
On Thu, 20 Oct 2005, Michael McCracken wrote:> The problem is that other directories, like the top level, or say > MultiSource/Benchmarks/, neither 'make profile' nor 'make pmf' work. > It simply says this: > > % make pmf > make: Nothing to be done for `pmf'.Try adding: RecursiveTargets += pmf If that doesn't work, try adding something like this: ifdef DIRS pmf :: $(VERB) for dir in ${DIRS}; do \ if [ ! -f $$dir/Makefile ]; \ then \ $(MKDIR) $$dir; \ cp $(SourceDir)/$$dir/Makefile $$dir/Makefile; \ fi; \ ($(MAKE) -C $$dir $@ $(MFLAGS)) || exit 1; \ done endif -Chris> Am I missing something here - shouldn't I be able to set it up so I > can build the whole suite with my option? I've attached my diff for > Makefile.programs, but I think the problem exists for profile also > without my changes. Maybe I'm just missing a detail about gmake > here... > > Thanks for any help, > -mike > -- > Michael McCracken > UCSD CSE PhD Candidate > research: http://www.cse.ucsd.edu/~mmccrack/ > misc: http://michael-mccracken.net/blog/ >-Chris -- http://nondot.org/sabre/ http://llvm.org/
Reasonably Related Threads
- [LLVMdev] problem loading analysis results from Inliner pass
- [LLVMdev] problem loading analysis results from Inliner pass
- [LLVMdev] problem loading analysis results from Inliner pass
- [LLVMdev] lli: problem finding external symbol
- [LLVMdev] lli: problem finding external symbol