lkml.org 
[lkml]   [1997]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectSomewhat more honest output from make
From
I've been trying to track down some apparent problems with excessive
recompilation of .c files, and discovered that the output of a kernel
make was essentially useless -- there were many commands run that
modified crucial header files (e.g., compile.h and version.h) that
never showed in the output stream.

To make debugging of the make processing possible, I've written up
patches for removing the "@" off the beginning of commands in the
makefiles so the make output more accurately shows the processing that
is going on. (I've left a few @'s on, mostly those in front of echo's
to the tty.)
----------------------------------------------------------------------
diff -u Makefile.orig@ Makefile
--- Makefile.orig@ Wed Feb 12 20:40:18 1997
+++ Makefile Wed Feb 12 21:46:42 1997
@@ -166,10 +166,10 @@
endif

Version: dummy
- @rm -f include/linux/compile.h
+ rm -f include/linux/compile.h

boot: vmlinux
- @$(MAKE) -C arch/$(ARCH)/boot
+ $(MAKE) -C arch/$(ARCH)/boot

vmlinux: $(CONFIGURATION) init/main.o init/version.o linuxsubdirs
$(LD) $(LINKFLAGS) $(HEAD) init/main.o init/version.o \
@@ -183,10 +183,10 @@
symlinks:
rm -f include/asm
( cd include ; ln -sf asm-$(ARCH) asm)
- @if [ ! -d modules ]; then \
+ if [ ! -d modules ]; then \
mkdir modules; \
fi
- @if [ ! -d include/linux/modules ]; then \
+ if [ ! -d include/linux/modules ]; then \
mkdir include/linux/modules; \
fi

@@ -211,35 +211,35 @@
$(TOPDIR)/include/linux/compile.h: include/linux/compile.h

newversion:
- @if [ ! -f .version ]; then \
+ if [ ! -f .version ]; then \
echo 1 > .version; \
else \
expr 0`cat .version` + 1 > .version; \
fi

include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
- @if [ -f .name ]; then \
+ if [ -f .name ]; then \
echo \#define UTS_VERSION \"\#`cat .version`-`cat .name` `date`\"; \
else \
echo \#define UTS_VERSION \"\#`cat .version` `date`\"; \
fi >> .ver
- @echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
- @echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
- @echo \#define LINUX_COMPILE_HOST \"`hostname`\" >> .ver
- @if [ -x /bin/dnsdomainname ]; then \
+ echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> .ver
+ echo \#define LINUX_COMPILE_BY \"`whoami`\" >> .ver
+ echo \#define LINUX_COMPILE_HOST \"`hostname`\" >> .ver
+ if [ -x /bin/dnsdomainname ]; then \
echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname`\"; \
elif [ -x /bin/domainname ]; then \
echo \#define LINUX_COMPILE_DOMAIN \"`domainname`\"; \
else \
echo \#define LINUX_COMPILE_DOMAIN ; \
fi >> .ver
- @echo \#define LINUX_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" >> .ver
- @mv -f .ver $@
+ echo \#define LINUX_COMPILER \"`$(CC) -v 2>&1 | tail -1`\" >> .ver
+ mv -f .ver $@

include/linux/version.h: ./Makefile
- @echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > .ver
- @echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
- @mv -f .ver $@
+ echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > .ver
+ echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver
+ mv -f .ver $@

init/version.o: init/version.c include/linux/compile.h
$(CC) $(CFLAGS) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
@@ -281,7 +281,7 @@
done

modules_install:
- @( \
+ ( \
MODLIB=/lib/modules/$(VERSION).$(PATCHLEVEL).$(SUBLEVEL); \
cd modules; \
MODULES=""; \
diff -u arch/alpha/Makefile.orig@ arch/alpha/Makefile
--- arch/alpha/Makefile.orig@ Wed Feb 12 20:40:20 1997
+++ arch/alpha/Makefile Wed Feb 12 21:46:41 1997
@@ -37,23 +37,23 @@
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot

rawboot:
- @$(MAKEBOOT) rawboot
+ $(MAKEBOOT) rawboot

#
# my boot writes directly to a specific disk partition, I doubt most
# people will want to do that without changes..
#
msb my-special-boot:
- @$(MAKEBOOT) msb
+ $(MAKEBOOT) msb

bootimage:
- @$(MAKEBOOT) bootimage
+ $(MAKEBOOT) bootimage

srmboot:
- @$(MAKEBOOT) srmboot
+ $(MAKEBOOT) srmboot

archclean:
- @$(MAKEBOOT) clean
+ $(MAKEBOOT) clean

archdep:
- @$(MAKEBOOT) dep
+ $(MAKEBOOT) dep
diff -u arch/i386/Makefile.orig@ arch/i386/Makefile
--- arch/i386/Makefile.orig@ Wed Feb 12 20:40:18 1997
+++ arch/i386/Makefile Wed Feb 12 21:46:41 1997
@@ -87,30 +87,30 @@
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot

zImage: vmlinux
- @$(MAKEBOOT) zImage
+ $(MAKEBOOT) zImage

bzImage: vmlinux
- @$(MAKEBOOT) bzImage
+ $(MAKEBOOT) bzImage

compressed: zImage

zlilo: vmlinux
- @$(MAKEBOOT) BOOTIMAGE=zImage zlilo
+ $(MAKEBOOT) BOOTIMAGE=zImage zlilo

bzlilo: vmlinux
- @$(MAKEBOOT) BOOTIMAGE=bzImage zlilo
+ $(MAKEBOOT) BOOTIMAGE=bzImage zlilo

zdisk: vmlinux
- @$(MAKEBOOT) BOOTIMAGE=zImage zdisk
+ $(MAKEBOOT) BOOTIMAGE=zImage zdisk

bzdisk: vmlinux
- @$(MAKEBOOT) BOOTIMAGE=bzImage zdisk
+ $(MAKEBOOT) BOOTIMAGE=bzImage zdisk

install: vmlinux
- @$(MAKEBOOT) install
+ $(MAKEBOOT) install

archclean:
- @$(MAKEBOOT) clean
+ $(MAKEBOOT) clean

archdep:
- @$(MAKEBOOT) dep
+ $(MAKEBOOT) dep
diff -u arch/i386/boot/Makefile.orig@ arch/i386/boot/Makefile
--- arch/i386/boot/Makefile.orig@ Wed Feb 12 20:40:18 1997
+++ arch/i386/boot/Makefile Wed Feb 12 21:46:41 1997
@@ -33,10 +33,10 @@
sync

compressed/vmlinux: $(TOPDIR)/vmlinux
- @$(MAKE) -C compressed vmlinux
+ $(MAKE) -C compressed vmlinux

compressed/bvmlinux: $(TOPDIR)/vmlinux
- @$(MAKE) -C compressed bvmlinux
+ $(MAKE) -C compressed bvmlinux

zdisk: $(BOOTIMAGE)
dd bs=8192 if=$(BOOTIMAGE) of=/dev/fd0
@@ -91,4 +91,4 @@
rm -f bbootsect
rm -f zImage tools/build compressed/vmlinux.out
rm -f bzImage tools/bbuild compressed/bvmlinux.out
- @$(MAKE) -C compressed clean
+ $(MAKE) -C compressed clean
diff -u arch/m68k/Makefile.orig@ arch/m68k/Makefile
--- arch/m68k/Makefile.orig@ Wed Feb 12 20:40:26 1997
+++ arch/m68k/Makefile Wed Feb 12 21:46:40 1997
@@ -90,10 +90,10 @@
if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi

bootstrap:
- @$(MAKEBOOT) bootstrap
+ $(MAKEBOOT) bootstrap

archclean:
- @$(MAKEBOOT) clean
+ $(MAKEBOOT) clean

archdep:
$(MAKEBOOT) dep
diff -u arch/mips/Makefile.orig@ arch/mips/Makefile
--- arch/mips/Makefile.orig@ Wed Feb 12 20:40:24 1997
+++ arch/mips/Makefile Wed Feb 12 21:46:41 1997
@@ -92,16 +92,16 @@
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot

zImage: vmlinux
- @$(MAKEBOOT) zImage
+ $(MAKEBOOT) zImage

compressed: zImage

zdisk: vmlinux
- @$(MAKEBOOT) zdisk
+ $(MAKEBOOT) zdisk

archclean:
- @$(MAKEBOOT) clean
+ $(MAKEBOOT) clean
$(MAKE) -C arch/$(ARCH)/kernel clean

archdep:
- @$(MAKEBOOT) dep
+ $(MAKEBOOT) dep
diff -u arch/ppc/Makefile.orig@ arch/ppc/Makefile
--- arch/ppc/Makefile.orig@ Wed Feb 12 20:40:25 1997
+++ arch/ppc/Makefile Wed Feb 12 21:46:40 1997
@@ -66,19 +66,19 @@
MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot

netboot: vmlinux
- @$(MAKEBOOT) netboot
+ $(MAKEBOOT) netboot

znetboot: vmlinux
- @$(MAKEBOOT) znetboot
+ $(MAKEBOOT) znetboot

zImage: vmlinux
- @$(MAKEBOOT) zImage
+ $(MAKEBOOT) zImage

floppy: vmlinux
- @$(MAKEBOOT) floppy
+ $(MAKEBOOT) floppy

install: vmlinux
- @$(MAKEBOOT) install
+ $(MAKEBOOT) install

arch/ppc/kernel: dummy
$(MAKE) linuxsubdirs SUBDIRS=arch/ppc/kernel
@@ -92,7 +92,7 @@

archclean:
rm -f arch/ppc/kernel/mk_defs arch/ppc/kernel/ppc_defs.h TAGS
- @$(MAKEBOOT) clean
+ $(MAKEBOOT) clean

archdep:

diff -u drivers/sound/Makefile.orig@ drivers/sound/Makefile
--- drivers/sound/Makefile.orig@ Wed Feb 12 20:40:31 1997
+++ drivers/sound/Makefile Wed Feb 12 21:46:40 1997
@@ -31,7 +31,7 @@
ifndef HOSTCC
build:
@echo Compiling modularized sound driver
- @make sound.o
+ make sound.o
@echo Sound module compiled.

install: sound.o
@@ -91,32 +91,32 @@
@echo

config: configure
- @$(MAKE) setup
- @./configure > local.h
- @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
- @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
-# @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
-# @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
- @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
+ $(MAKE) setup
+ ./configure > local.h
+ echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
+ echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
+# echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
+# echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
+ echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h

oldconfig: setup configure
- @./configure -o > local.h
- @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
- @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
-# @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
-# @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
- @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
+ ./configure -o > local.h
+ echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
+ echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
+# echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
+# echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
+ echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h

kernelconfig: setup
rm -f configure
$(HOSTCC) -o configure configure.c
./configure fixedlocal > local.h
./configure fixeddefines > .defines
- @echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
- @echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
-# @echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
-# @echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
- @echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h
+ echo \#define SOUND_CONFIG_DATE \"`date`\" >> local.h
+ echo \#define SOUND_CONFIG_BY \"`whoami`\" >> local.h
+# echo \#define SOUND_CONFIG_HOST \"`hostname`\" >> local.h 2>/dev/null
+# echo \#define SOUND_CONFIG_DOMAIN \"`hostname -d`\" >> local.h 2>/dev/null
+ echo \#define SOUND_UNAME_A \"`uname -a`\" >> local.h

mkscript: setup
rm -f configure
diff -u scripts/Makefile.orig@ scripts/Makefile
--- scripts/Makefile.orig@ Wed Feb 12 20:40:48 1997
+++ scripts/Makefile Wed Feb 12 21:46:40 1997
@@ -17,7 +17,7 @@
kconfig.tk: soundscript ${TOPDIR}/Makefile ${TOPDIR}/arch/${ARCH}/config.in \
tkparse ${HEADER} ${TAIL}
./tkparse < ../arch/${ARCH}/config.in > kconfig.tmp
- @if [ -f /usr/local/bin/wish ]; then \
+ if [ -f /usr/local/bin/wish ]; then \
echo '#!'"/usr/local/bin/wish -f" > kconfig.tk; \
else \
echo '#!'"/usr/bin/wish -f" > kconfig.tk; \
----------------------------------------------------------------------
Dale
--
Dale R. Worley Ariadne Internet Services
Voice: +1 617-899-7949 Fax: +1 617-899-7946 E-mail: worley@ariadne.com
"Internet-based electronic commerce solutions to real business problems."
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.627 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site