All of lore.kernel.org
 help / color / mirror / Atom feed
* Support for including *.mk files
@ 2005-11-13 21:06 Timothy Baldwin
  2005-11-13 21:16 ` Marco Gerards
  0 siblings, 1 reply; 10+ messages in thread
From: Timothy Baldwin @ 2005-11-13 21:06 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 3291 bytes --]

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  <T.E.Baldwin99@members.leeds.ac.uk>

        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!

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-11-18 14:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-13 21:06 Support for including *.mk files Timothy Baldwin
2005-11-13 21:16 ` Marco Gerards
2005-11-15 22:13   ` Timothy Baldwin
2005-11-16  6:49     ` Marco Gerards
2005-11-17 19:25       ` Timothy Baldwin
2005-11-17 19:30         ` Marco Gerards
2005-11-18 10:58           ` Yoshinori K. Okuji
2005-11-18 13:47         ` Marco Gerards
2005-11-18 14:14           ` Timothy Baldwin
2005-11-18 14:58             ` Marco Gerards

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.