convert timeconst.pl->mktimeconst.c
PATCH 2/3 convert timeconst.pl->mktimeconst.c
From: Rob Landley <[email protected]>
Replace perl header file generator with smaller/faster/simpler C version.
Signed-off-by Rob Landley <[email protected]>
---
kernel/Makefile | 10 - kernel/mktimeconst.c | 109 +++++++++++ kernel/timeconst.pl | 378 ----------------------------------------- 3 files changed, 115 insertions(+), 382 deletions(-)
kernel/Makefile +6 -4
@@ -133,11 +133,13 @@ $(obj)/config_data.h: $(obj)/config_data.gz FORCE $(obj)/time.o: $(obj)/timeconst.h -quiet_cmd_timeconst = TIMEC $@ - cmd_timeconst = $(PERL) $< $(CONFIG_HZ) > $@ +hostprogs-y += mktimeconst +quiet_cmd_mktimeconst = TIMEC $@ + cmd_mktimeconst = $(obj)/mktimeconst $(CONFIG_HZ) $@ || ( rm -f $@ && exit 1 ) + targets += timeconst.h -$(obj)/timeconst.h: $(src)/timeconst.pl FORCE - $(call if_changed,timeconst) +$(obj)/timeconst.h: $(obj)/mktimeconst FORCE + $(call if_changed,mktimeconst) ifeq ($(CONFIG_MODULE_SIG),y) #
kernel/mktimeconst.c new file +109 -0
109 lines not on this page · raw message
kernel/timeconst.pl deleted +0 -378
378 lines not on this page · raw message
--------------070402000802050303040701
Content-Type: application/x-sh; name="loopy.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="loopy.sh"
#!/bin/bash
gcc mktimeconst.c || exit 1
X=1
while [ $X -lt 5000 ]
do
echo $X
perl ~/linux/linux/kernel/timeconst.pl $X | sed 's/KERNEL_TIMECONST/__KERNEL_TIMECONST/;/Automatically generated/d;/^$/d'> temp.txt ./a.out $X temp2.txt
sed -i '/Automatically generated/d;/^$/d' temp2.txt
diff -uw temp.txt temp2.txt || exit 1
X=$(($X+1))
done
--------------070402000802050303040701--