[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Support for including *.mk files
From: |
Timothy Baldwin |
Subject: |
Support for including *.mk files |
Date: |
Sun, 13 Nov 2005 21:06:31 +0000 |
User-agent: |
KMail/1.8.2 |
Since having to edit 4 rmk files every time a system independent change is made
is a bit silly, here is a patch to allow the common rules to be split off to
a shared file. I will submit a patch to do so later.
Also I add ".DELETE_ON_ERROR:" to make make delete targets if there is an
error building them.
2005-11-13 Timothy Baldwin <address@hidden>
Support including *.mk files. Fix filename collisions.
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 > $@"
--
Member AFFS, WYLUG, SWP (UK), UAF, RESPECT, StWC
No to software patents! Victory to the iraqi resistance!
pgpAoxztOTmM8.pgp
Description: PGP signature
- Support for including *.mk files,
Timothy Baldwin <=