Bugzilla – Bug 1461
Makefile depends on the version of "make" command
Last modified: 2012-09-27 02:10:48 EDT
in the current version of ns-3-linux, the Makefile.print needs to modify if the version of make command changed. for example, in Ubuntu 10.04, using GNU Make 3.81, the separator after $@ is required, while 3.82 is not required. @$(MAKE) -s -f $(firstword $(MAKEFILE_LIST)) objdir=$(objdir)$@/ config=$(config) srcdir=$(srcdir) $@/
These code are ugly one, but works fine. diff -r e5505327aee5 Makefile.print --- a/Makefile.print Thu Feb 09 13:34:55 2012 +0100 +++ b/Makefile.print Thu Jun 21 16:31:22 2012 +0900 @@ -3,6 +3,13 @@ include $(config) include $(srcdir)Makefile +# fix minor nits for make version dependencies +ifeq (3.82,$(firstword $(sort $(MAKE_VERSION) 3.82))) + SEPARATOR= +else + SEPARATOR=/ +endif + to_keep_list=$(subst :, ,$(to_keep)) obj-y += $(lib-y) obj-m += $(lib-m) @@ -31,4 +38,4 @@ @echo -n $(addprefix $(objdir),$(@:.o=.ko)); echo -n "=" @echo $(addprefix $(objdir),$(if $($(@:.o=-objs)),$($(@:.o=-objs)),$@)) $(subdirs): - @$(MAKE) -s -f $(firstword $(MAKEFILE_LIST)) objdir=$(objdir)$@ config=$(config) srcdir=$(srcdir)$@ to_keep=$(to_keep) print 2>/dev/null + @$(MAKE) -s -f $(firstword $(MAKEFILE_LIST)) objdir=$(objdir)$@$(SEPARATOR) config=$(config) srcdir=$(srcdir)$@$(SEPARATOR) to_keep=$(to_keep) print 2>/dev/null
pushed as changeset 58 e0a3fe869908 http://code.nsnam.org/furbani/ns-3-linux/rev/e0a3fe869908