2005-11-13 Timothy Baldwin Support including *.mk files, fix filename collisons. Better cleanup on build errors. * genmk.rb: Fixed list rules moved to Makefile.in. Recognise appending to variables with "+=". (PModule): Use full pathname to generate *.lst filenames. * Makefile.in: Fixed list rules moved from genmk.rb. (.DELETE_ON_ERROR): New special target. diff -purN -x '*.mk' -x '*~' -x autom4te.cache -x configure -x '.#*' -x '*.orig' -x '*.rej' -x CVS grub2-split1/Makefile.in grub2-split2/Makefile.in --- grub2-split1/Makefile.in 2005-08-08 20:41:00.000000000 +0100 +++ grub2-split2/Makefile.in 2005-10-22 20:25:44.000000000 +0100 @@ -100,6 +100,18 @@ include $(srcdir)/conf/$(host_cpu)-$(hos ### General targets. +CLEANFILES += moddep.lst command.lst fs.lst +pkgdata_DATA += moddep.lst command.lst fs.lst +moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep + cat $(DEFSYMFILES) /dev/null | ./genmoddep $(UNDSYMFILES) > $@ \ + || (rm -f $@; exit 1) + +command.lst: $(COMMANDFILES) + cat $^ /dev/null | sort > $@ + +fs.lst: $(FSFILES) + cat $^ /dev/null | sort > $@ + all-local: $(PROGRAMS) $(DATA) $(SCRIPTS) $(MKFILES) install: install-local @@ -241,3 +253,5 @@ config.status: configure # Prevent an overflow. .NOEXPORT: + +.DELETE_ON_ERROR: diff -purN -x '*.mk' -x '*~' -x autom4te.cache -x configure -x '.#*' -x '*.orig' -x '*.rej' -x CVS grub2-split1/genmk.rb grub2-split2/genmk.rb --- grub2-split1/genmk.rb 2005-10-15 08:44:39.000000000 +0100 +++ grub2-split2/genmk.rb 2005-10-22 20:25:44.000000000 +0100 @@ -141,8 +141,8 @@ UNDSYMFILES += #{undsym} " + objs.collect_with_index do |obj, i| src = sources[i] fake_obj = File.basename(src).suffix('o') - command = 'cmd-' + fake_obj.suffix('lst') - fs = 'fs-' + fake_obj.suffix('lst') + command = 'cmd-' + obj.suffix('lst') + fs = 'fs-' + obj.suffix('lst') dep = deps[i] flag = if /\.c$/ =~ src then 'CFLAGS' else 'ASFLAGS' end dir = File.dirname(src) @@ -314,7 +314,7 @@ while l = gets unless cont s.gsub!(/\\\n/, ' ') - if /^([a-zA-Z0-9_]+)\s*=\s*(.*?)\s*$/ =~ s + if /^([a-zA-Z0-9_]+)\s*\+?=\s*(.*?)\s*$/ =~ s var, args = $1, $2 if var =~ /^([a-zA-Z0-9_]+)_([A-Z]+)$/ @@ -367,14 +367,3 @@ while l = gets end -puts "CLEANFILES += moddep.lst command.lst fs.lst" -puts "pkgdata_DATA += moddep.lst command.lst fs.lst" -puts "moddep.lst: $(DEFSYMFILES) $(UNDSYMFILES) genmoddep" -puts " cat $(DEFSYMFILES) /dev/null | ./genmoddep $(UNDSYMFILES) > $@ \\" -puts " || (rm -f $@; exit 1)" -puts "" -puts "command.lst: $(COMMANDFILES)" -puts " cat $^ /dev/null | sort > $@" -puts "" -puts "fs.lst: $(FSFILES)" -puts " cat $^ /dev/null | sort > $@"