Commit 602beafe authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: clean up drivers/scsi firmware generation, part 1

Teach the perl script to accept output filenames on the command
lines, so we don't have to move the generated files afterwards 
(which isn't parallel make safe)
parent 161558fd
......@@ -133,9 +133,7 @@ include $(TOPDIR)/Rules.make
53c8xx_d.h: 53c7,8xx.scr script_asm.pl
ln -sf 53c7,8xx.scr fake8.c
$(CPP) $(CPPFLAGS) -traditional -DCHIP=810 fake8.c | grep -v '^#' | $(PERL) script_asm.pl
mv script.h 53c8xx_d.h
mv scriptu.h 53c8xx_u.h
$(CPP) $(CPPFLAGS) -traditional -DCHIP=810 fake8.c | grep -v '^#' | $(PERL) script_asm.pl $@ $(@:_d.h=_u.h)
rm fake8.c
53c8xx_u.h: 53c8xx_d.h
......@@ -143,10 +141,8 @@ include $(TOPDIR)/Rules.make
53c7,8xx.o: 53c8xx_u.h
53c7xx_d.h: 53c7xx.scr script_asm.pl
ln -sf 53c7xx.scr fake7.c
$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family
mv script.h 53c7xx_d.h
mv scriptu.h 53c7xx_u.h
ln -sf $< fake7.c
$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family $@ $(@:_d.h=_u.h)
rm fake7.c
53c7xx_u.h: 53c7xx_d.h
......@@ -154,10 +150,8 @@ include $(TOPDIR)/Rules.make
53c7xx.o : 53c7xx_d.h
sim710_d.h: sim710.scr script_asm.pl
ln -sf sim710.scr fake7.c
$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family
mv script.h sim710_d.h
mv scriptu.h sim710_u.h
ln -sf $< fake7.c
$(CPP) $(CPPFLAGS) -traditional -DCHIP=710 fake7.c | grep -v '^#' | $(PERL) -s script_asm.pl -ncr7x0_family $@ $(@:_d.h=_u.h)
rm fake7.c
sim710_u.h: sim710_d.h
......@@ -165,8 +159,6 @@ sim710_u.h: sim710_d.h
sim710.o : sim710_d.h
53c700_d.h: 53c700.scr script_asm.pl
$(PERL) -s script_asm.pl -ncr7x0_family < 53c700.scr
rm -f scriptu.h
mv script.h 53c700_d.h
$(PERL) -s script_asm.pl -ncr7x0_family $@ $(@:_d.h=_u.h) < $<
53c700.o: 53c700_d.h
......@@ -53,7 +53,8 @@ $debug = 0; # Print general debugging messages
$debug_external = 0; # Print external/forward reference messages
$list_in_array = 1; # Emit original SCRIPTS assembler in comments in
# script.h
$prefix = ''; # define all arrays having this prefix so we
#$prefix; # (set by perl -s)
# define all arrays having this prefix so we
# don't have name space collisions after
# assembling this file in different ways for
# different host adapters
......@@ -382,12 +383,10 @@ print STDERR "looking for data in $conditional\n" if ($debug);
}
}
# Parse command line
foreach $arg (@argv) {
if ($arg =~ /^-prefix\s*=\s*([_a-zA-Z][_a-zA-Z0-9]*)$/i) {
$prefix = $1
}
}
# Parse command line
$output = shift;
$outputu = shift;
# Main loop
while (<STDIN>) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment