0
votes

I'm trying to debug a custom Makefile from an open source C++ project. It's not recognizing any targets I make in the "Make Target" view.

I've triple checked the spelling of my targets and they're fine.

If I turn on "Generate Makefiles automatically" it will successfully call the "all" and "clean" targets, but no other targets.

2
How large is the makefile? Can you post it?zero298
What do you mean by "other" targets?pmod
'If I turn on "Generate Makefiles automatically" ' You can have either custom makefile and reference targets from there, or generated ones supporting 'all' and 'clean' targets.πάντα ῥεῖ
The makefile is 1257 lines.Bill Clar
By other targets, I mean I can only run "all" and "clean". There are dozens of other targets I cannot execute.Bill Clar

2 Answers

1
votes

I assume you are using Eclipse/CDT.

Don't choose automatically generate Makefile. Instead, right click on the makefile and select Make Targets/create. Use the target names from the makefile. The targets will appear in the "Make Targets" window (Window/Show View/MakeTarget). You can then build any of the targets using the hammer symbol in the make targets window.

0
votes

Glad that solved your problem. By the way you don't have to have the make file in the same location as your source files. Here is an example where we use a make file in one directory that uses cd to run make files in other directories:

all: subsystems

subsystems:
    @cd Efficiency && $(MAKE)
    @cd List && $(MAKE)
    @cd Map && $(MAKE)
    @cd Set && $(MAKE)
    @cd UsingSTLEfficiently && $(MAKE)
    @cd VectorAndArray && $(MAKE)