Crunchgen now has the necessary magic to include the make hooks that
munge_crunchmk was adding for us.
This commit is contained in:
parent
78809b1a0a
commit
a25227ce20
@ -8,12 +8,11 @@ all: crunch
|
||||
crunch:
|
||||
@cat crunch.conf|sed -e "s@/usr/src@${SRC}@" >crunch1.conf
|
||||
@( if [ -f crunch.inc ] ; then \
|
||||
crunchgen -h ./crunch.inc ./crunch1.conf ; \
|
||||
crunchgen -o -h ./crunch.inc ./crunch1.conf ; \
|
||||
else \
|
||||
crunchgen ./crunch1.conf ; \
|
||||
crunchgen -o ./crunch1.conf ; \
|
||||
fi )
|
||||
@perl -pi -e 's#${OBJ}#${PICO_OBJ}#g' crunch1.mk ;
|
||||
../../build/munge_crunchmk.pl crunch1.mk ;
|
||||
@env MAKEOBJDIRPREFIX=${PICO_OBJ} ${MAKE} -f crunch1.mk all
|
||||
strip --remove-section=.note --remove-section=.comment crunch1
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
#!/usr/bin/perl -wi
|
||||
|
||||
# Post process a crunch1.mk file:
|
||||
#
|
||||
# from...
|
||||
# ftp_make:
|
||||
# (cd $(ftp_SRCDIR) && make depend && make $(ftp_OBJS))
|
||||
#
|
||||
# to...
|
||||
# ftp_make:
|
||||
# (cd $(ftp_SRCDIR) && make obj && make depend && make $(OPTS) $(ftp_OPTS) $(ftp_OBJS))
|
||||
|
||||
use strict;
|
||||
|
||||
while (my $line = <>) {
|
||||
if ( $line =~ /(.*)make depend && make (\$\((.*?)_OBJS\).*)/ ) {
|
||||
my $start = $1; # The start of the line.
|
||||
my $end = $2; # The end of the line.
|
||||
my $prog = $3; # The parsed out name of the program.
|
||||
|
||||
print $start;
|
||||
print 'make obj && make depend && ';
|
||||
print 'make $(OPTS) $(' . $prog . '_OPTS) ';
|
||||
print $end, "\n";
|
||||
} else {
|
||||
print $line;
|
||||
}
|
||||
}
|
||||
|
||||
#end
|
Loading…
Reference in New Issue
Block a user