Hi,
I have about 300 makefiles in subdirectories, which
just set some variables and then include a template
file from the top directory:
TOPDIR = /mnt/sw
TARGET = prog.exe
SOURCE = one.c two.c
LIBRARY = three.lib four.lib
include $(TOPDIR)/MakeTemplate.exe
And the actuall building rules are defined in around
8-10 MakeTemplate.* makefiles in the top directory:
SRCS = $(filter %.c, $(SOURCE))
OBJS = $(addprefix $(OBJDIR)/, $(notdir $(SRCS:.c=.o)))
.....
all: $(OBJS) $(CXXOBJS)
$(OBJS): $(OBJDIR)/%.o: %.c
$(CXX) $(CXXFLAGS) -c $< -o $@
$(CXXOBJS): $(OBJDIR)/%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
.....
.PHONY: all clean
Sometimes I have to disable some of the MakeTemplates,
for example don't build the .exe type above. I wonder,
if there is a nice way to do that?
I could for example delete the prerequisites from
all: $(OBJS) $(CXXOBJS)
but it is uncomfortable and it would be difficult to explain
to users: "to reenable .exe, please find the all-rule and ..."
And if I set CXX = touch $@, that will probably also work,
but the build process will waste time touching unneeded files.
So I wonder if there is some nice trick, some variable or
special rule, which I could set or uncomment in the MakeTemplate?
Regards
Alex
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/help-make