Commit 9ba364a1 authored by Kai Germaschewski's avatar Kai Germaschewski

Merge tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5

into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make
parents fa82a1da 582a8606
...@@ -12,17 +12,30 @@ EPS-parportbook := $(patsubst %.fig, %.eps, $(IMG-parportbook)) ...@@ -12,17 +12,30 @@ EPS-parportbook := $(patsubst %.fig, %.eps, $(IMG-parportbook))
PNG-parportbook := $(patsubst %.fig, %.png, $(IMG-parportbook)) PNG-parportbook := $(patsubst %.fig, %.png, $(IMG-parportbook))
C-procfs-example = procfs_example.sgml C-procfs-example = procfs_example.sgml
books: $(BOOKS) $(TOPDIR)/scripts/docgen: dummy
chmod 755 $(TOPDIR)/scripts/docgen
$(BOOKS): $(TOPDIR)/scripts/docproc $(TOPDIR)/scripts/gen-all-syms: dummy
chmod 755 $(TOPDIR)/scripts/gen-all-syms
.PHONY: books ps pdf html clean mrproper $(TOPDIR)/scripts/kernel-doc: dummy
chmod 755 $(TOPDIR)/scripts/kernel-doc
ps: $(PS) $(TOPDIR)/scripts/docproc: dummy
$(MAKE) -C $(TOPDIR)/scripts docproc
$(BOOKS): $(TOPDIR)/scripts/docgen $(TOPDIR)/scripts/gen-all-syms \
$(TOPDIR)/scripts/kernel-doc $(TOPDIR)/scripts/docproc
.PHONY: sgmldocs psdocs pdfdocs htmldocs clean mrproper
sgmldocs: $(BOOKS)
pdf: $(PDF) psdocs: $(PS)
html: $(HTML) pdfdocs: $(PDF)
htmldocs: $(HTML)
%.eps: %.fig %.eps: %.fig
fig2dev -Leps $< $@ fig2dev -Leps $< $@
...@@ -39,9 +52,6 @@ html: $(HTML) ...@@ -39,9 +52,6 @@ html: $(HTML)
echo "</programlisting>" >> $@ echo "</programlisting>" >> $@
$(TOPDIR)/scripts/docproc:
$(MAKE) -C $(TOPDIR)/scripts docproc
mousedrivers.sgml: mousedrivers.tmpl mousedrivers.sgml: mousedrivers.tmpl
$(TOPDIR)/scripts/docgen <$< >$@ $(TOPDIR)/scripts/docgen <$< >$@
......
...@@ -56,7 +56,7 @@ ifeq (.config,$(wildcard .config)) ...@@ -56,7 +56,7 @@ ifeq (.config,$(wildcard .config))
include .config include .config
ifeq (.depend,$(wildcard .depend)) ifeq (.depend,$(wildcard .depend))
include .depend include .depend
do-it-all: Version vmlinux do-it-all: vmlinux
else else
CONFIGURATION = depend CONFIGURATION = depend
do-it-all: depend do-it-all: depend
...@@ -92,32 +92,6 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \ ...@@ -92,32 +92,6 @@ CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
-fomit-frame-pointer -fno-strict-aliasing -fno-common -fomit-frame-pointer -fno-strict-aliasing -fno-common
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
#
# ROOT_DEV specifies the default root-device when making the image.
# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
# the default of FLOPPY is used by 'build'.
# This is i386 specific.
#
export ROOT_DEV = CURRENT
#
# If you want to preset the SVGA mode, uncomment the next line and
# set SVGA_MODE to whatever number you want.
# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
# The number is the same as you would ordinarily press at bootup.
# This is i386 specific.
#
export SVGA_MODE = -DSVGA_MODE=NORMAL_VGA
#
# If you want the RAM disk device, define this to be the size in blocks.
# This is i386 specific.
#
#export RAMDISK = -DRAMDISK=512
CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o CORE_FILES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
NETWORKS =net/network.o NETWORKS =net/network.o
...@@ -178,71 +152,14 @@ DRIVERS-$(CONFIG_ISDN) += drivers/isdn/vmlinux-obj.o ...@@ -178,71 +152,14 @@ DRIVERS-$(CONFIG_ISDN) += drivers/isdn/vmlinux-obj.o
DRIVERS := $(DRIVERS-y) DRIVERS := $(DRIVERS-y)
# files removed with 'make clean'
CLEAN_FILES = \
kernel/ksyms.lst include/linux/compile.h \
vmlinux System.map \
.tmp* \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/conmakehash \
drivers/char/drm/*-mod.c \
drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
drivers/zorro/devlist.h drivers/zorro/gen-devlist \
sound/oss/bin2hex sound/oss/hex2hex \
drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
drivers/scsi/aic7xxx/aicasm/y.tab.h \
drivers/scsi/aic7xxx/aicasm/aicasm \
drivers/scsi/53c700_d.h \
net/khttpd/make_times_h \
net/khttpd/times.h \
submenu*
# directories removed with 'make clean'
CLEAN_DIRS = \
modules
# files removed with 'make mrproper'
MRPROPER_FILES = \
include/linux/autoconf.h include/linux/version.h \
drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
drivers/net/hamradio/soundmodem/gentbl \
sound/oss/*_boot.h sound/oss/.*.boot \
sound/oss/msndinit.c \
sound/oss/msndperm.c \
sound/oss/pndsperm.c \
sound/oss/pndspini.c \
drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
.version .config* config.in config.old \
scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
.menuconfig.log \
include/asm \
.hdepend scripts/mkdep scripts/split-include scripts/docproc \
$(TOPDIR)/include/linux/modversions.h \
kernel.spec
# directories removed with 'make mrproper'
MRPROPER_DIRS = \
include/config \
$(TOPDIR)/include/linux/modules
include arch/$(ARCH)/Makefile include arch/$(ARCH)/Makefile
export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL export CPPFLAGS CFLAGS CFLAGS_KERNEL AFLAGS AFLAGS_KERNEL
export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS export NETWORKS DRIVERS LIBS HEAD LDFLAGS LINKFLAGS MAKEBOOT ASFLAGS
.S.s: # Build vmlinux / boot target
$(CPP) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -o $*.s $< # ---------------------------------------------------------------------------
.S.o:
$(CC) $(AFLAGS) $(AFLAGS_KERNEL) -traditional -c -o $*.o $<
Version: dummy
@rm -f include/linux/compile.h
boot: vmlinux boot: vmlinux
@$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot @$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C arch/$(ARCH)/boot
...@@ -258,12 +175,15 @@ vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o ini ...@@ -258,12 +175,15 @@ vmlinux: include/linux/version.h $(CONFIGURATION) init/main.o init/version.o ini
-o vmlinux -o vmlinux
$(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map $(NM) vmlinux | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
symlinks: # Handle descending into subdirectories listed in $(SUBDIRS)
rm -f include/asm
( cd include ; ln -sf asm-$(ARCH) asm) linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
@if [ ! -d include/linux/modules ]; then \
mkdir include/linux/modules; \ $(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
fi $(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
# Configuration
# ---------------------------------------------------------------------------
oldconfig: symlinks oldconfig: symlinks
$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in $(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
...@@ -279,50 +199,44 @@ menuconfig: include/linux/version.h symlinks ...@@ -279,50 +199,44 @@ menuconfig: include/linux/version.h symlinks
config: symlinks config: symlinks
$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in $(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
# make asm->asm-$(ARCH) symlink
symlinks:
rm -f include/asm
( cd include ; ln -sf asm-$(ARCH) asm)
@if [ ! -d include/linux/modules ]; then \
mkdir include/linux/modules; \
fi
# split autoconf.h into include/linux/config/*
include/config/MARKER: scripts/split-include include/linux/autoconf.h include/config/MARKER: scripts/split-include include/linux/autoconf.h
scripts/split-include include/linux/autoconf.h include/config scripts/split-include include/linux/autoconf.h include/config
@ touch include/config/MARKER @ touch include/config/MARKER
. scripts/mkversion > .tmpversion
@mv -f .tmpversion .version
linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS)) # Generate some files
$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" -C $(patsubst _dir_%, %, $@)
$(TOPDIR)/include/linux/version.h: include/linux/version.h $(TOPDIR)/include/linux/version.h: include/linux/version.h
$(TOPDIR)/include/linux/compile.h: include/linux/compile.h $(TOPDIR)/include/linux/compile.h: include/linux/compile.h
newversion: include/linux/compile.h: $(CONFIGURATION) include/linux/version.h
. scripts/mkversion > .tmpversion @echo Generating $@
@mv -f .tmpversion .version @. scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
include/linux/compile.h: $(CONFIGURATION) include/linux/version.h newversion
@echo -n \#define UTS_VERSION \"\#`cat .version` > .ver
@if [ -n "$(CONFIG_SMP)" ] ; then echo -n " SMP" >> .ver; fi
@if [ -f .name ]; then echo -n \-`cat .name` >> .ver; fi
@echo ' '`date`'"' >> .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_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) $(CFLAGS) -v 2>&1 | tail -1`\" >> .ver
@mv -f .ver $@
include/linux/version.h: ./Makefile include/linux/version.h: ./Makefile
@echo \#define UTS_RELEASE \"$(KERNELRELEASE)\" > .ver @echo Generating $@
@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> .ver @. scripts/mkversion_h $@ $(KERNELRELEASE) $(VERSION) $(PATCHLEVEL) $(SUBLEVEL)
@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
@mv -f .ver $@
comma := , comma := ,
# ---------------------------------------------------------------------------
# Build files in init
# FIXME should be moved to init/Makefile
init/version.o: init/version.c include/linux/compile.h include/config/MARKER init/version.o: init/version.c include/linux/compile.h include/config/MARKER
$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o init/version.o init/version.c
init/main.o: init/main.c include/config/MARKER init/main.o: init/main.c include/config/MARKER
$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $<
...@@ -330,22 +244,26 @@ init/main.o: init/main.c include/config/MARKER ...@@ -330,22 +244,26 @@ init/main.o: init/main.c include/config/MARKER
init/do_mounts.o: init/do_mounts.c include/config/MARKER init/do_mounts.o: init/do_mounts.c include/config/MARKER
$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $< $(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -DKBUILD_BASENAME=$(subst $(comma),_,$(subst -,_,$(*F))) -c -o $*.o $<
fs lib mm ipc kernel drivers net sound: dummy # ---------------------------------------------------------------------------
$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@) # Generate dependencies
TAGS: dummy depend dep: dep-files
{ find include/asm-${ARCH} -name '*.h' -print ; \
find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
find $(SUBDIRS) init -name '*.[ch]' ; } | grep -v SCCS | etags -
# Exuberant ctags works better with -I dep-files: scripts/mkdep archdep include/linux/version.h
tags: dummy scripts/mkdep -- init/*.c > .depend
CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend
ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \ $(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)"
find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \ ifdef CONFIG_MODVERSIONS
find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a $(MAKE) update-modverfile
endif
# ---------------------------------------------------------------------------
# Modules
ifdef CONFIG_MODULES ifdef CONFIG_MODULES
# Build modules
ifdef CONFIG_MODVERSIONS ifdef CONFIG_MODVERSIONS
MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h MODFLAGS += -DMODVERSIONS -include $(HPATH)/linux/modversions.h
endif endif
...@@ -357,6 +275,8 @@ modules: $(patsubst %, _mod_%, $(SUBDIRS)) ...@@ -357,6 +275,8 @@ modules: $(patsubst %, _mod_%, $(SUBDIRS))
$(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER $(patsubst %, _mod_%, $(SUBDIRS)) : include/linux/version.h include/config/MARKER
$(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules $(MAKE) -C $(patsubst _mod_%, %, $@) CFLAGS="$(CFLAGS) $(MODFLAGS)" MAKING_MODULES=1 modules
# Install modules
.PHONY: modules_install .PHONY: modules_install
modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post
...@@ -385,9 +305,11 @@ _modinst_post: ...@@ -385,9 +305,11 @@ _modinst_post:
$(patsubst %, _modinst_%, $(SUBDIRS)) : $(patsubst %, _modinst_%, $(SUBDIRS)) :
$(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install $(MAKE) -C $(patsubst _modinst_%, %, $@) modules_install
# modules disabled.... else # CONFIG_MODULES
# ---------------------------------------------------------------------------
# Modules not configured
else
modules modules_install: dummy modules modules_install: dummy
@echo @echo
@echo "The present kernel configuration has modules disabled." @echo "The present kernel configuration has modules disabled."
...@@ -395,7 +317,77 @@ modules modules_install: dummy ...@@ -395,7 +317,77 @@ modules modules_install: dummy
@echo "Then build a kernel with module support enabled." @echo "Then build a kernel with module support enabled."
@echo @echo
@exit 1 @exit 1
endif
endif # CONFIG_MODULES
# ---------------------------------------------------------------------------
include Rules.make
# Build helpers in scripts/
# FIXME: do that in scripts/Makefile?
scripts/mkdep: scripts/mkdep.c
$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
scripts/split-include: scripts/split-include.c
$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
# Cleaning up
# ---------------------------------------------------------------------------
# files removed with 'make clean'
CLEAN_FILES += \
kernel/ksyms.lst include/linux/compile.h \
vmlinux System.map \
.tmp* \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/conmakehash \
drivers/char/drm/*-mod.c \
drivers/pci/devlist.h drivers/pci/classlist.h drivers/pci/gen-devlist \
drivers/zorro/devlist.h drivers/zorro/gen-devlist \
sound/oss/bin2hex sound/oss/hex2hex \
drivers/atm/fore200e_mkfirm drivers/atm/{pca,sba}*{.bin,.bin1,.bin2} \
drivers/scsi/aic7xxx/aicasm/aicasm_gram.c \
drivers/scsi/aic7xxx/aicasm/aicasm_scan.c \
drivers/scsi/aic7xxx/aicasm/y.tab.h \
drivers/scsi/aic7xxx/aicasm/aicasm \
drivers/scsi/53c700_d.h \
net/khttpd/make_times_h \
net/khttpd/times.h \
submenu*
# directories removed with 'make clean'
CLEAN_DIRS += \
modules
# files removed with 'make mrproper'
MRPROPER_FILES += \
include/linux/autoconf.h include/linux/version.h \
drivers/net/hamradio/soundmodem/sm_tbl_{afsk1200,afsk2666,fsk9600}.h \
drivers/net/hamradio/soundmodem/sm_tbl_{hapn4800,psk4800}.h \
drivers/net/hamradio/soundmodem/sm_tbl_{afsk2400_7,afsk2400_8}.h \
drivers/net/hamradio/soundmodem/gentbl \
sound/oss/*_boot.h sound/oss/.*.boot \
sound/oss/msndinit.c \
sound/oss/msndperm.c \
sound/oss/pndsperm.c \
sound/oss/pndspini.c \
drivers/atm/fore200e_*_fw.c drivers/atm/.fore200e_*.fw \
.version .config* config.in config.old \
scripts/tkparse scripts/kconfig.tk scripts/kconfig.tmp \
scripts/lxdialog/*.o scripts/lxdialog/lxdialog \
.menuconfig.log \
include/asm \
.hdepend scripts/mkdep scripts/split-include scripts/docproc \
$(TOPDIR)/include/linux/modversions.h \
kernel.spec
# directories removed with 'make mrproper'
MRPROPER_DIRS += \
include/config \
$(TOPDIR)/include/linux/modules
clean: archclean clean: archclean
find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \ find . \( -name '*.[oas]' -o -name core -o -name '.*.flags' \) -type f -print \
...@@ -416,44 +408,41 @@ distclean: mrproper ...@@ -416,44 +408,41 @@ distclean: mrproper
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -type f -print` TAGS tags
backup: mrproper # Assorted miscellaneous targets
cd .. && tar cf - linux/ | gzip -9 > backup.gz # ---------------------------------------------------------------------------
sync
sgmldocs: # Documentation targets
chmod 755 $(TOPDIR)/scripts/docgen
chmod 755 $(TOPDIR)/scripts/gen-all-syms
chmod 755 $(TOPDIR)/scripts/kernel-doc
$(MAKE) -C $(TOPDIR)/Documentation/DocBook books
psdocs: sgmldocs sgmldocs psdocs pdfdocs htmldocs:
$(MAKE) -C Documentation/DocBook ps $(MAKE) -C Documentation/DocBook $@
pdfdocs: sgmldocs
$(MAKE) -C Documentation/DocBook pdf
htmldocs: sgmldocs # RPM target
$(MAKE) -C Documentation/DocBook html #
# If you do a make spec before packing the tarball you can rpm -ta it
sums: spec:
find . -type f -print | sort | xargs sum > .SUMS . scripts/mkspec >kernel.spec
dep-files: scripts/mkdep archdep include/linux/version.h # Build a tar ball, generate an rpm from it and pack the result
scripts/mkdep -- init/*.c > .depend # There arw two bits of magic here
scripts/mkdep -- `find $(FINDHPATH) -name SCCS -prune -o -follow -name \*.h ! -name modversions.h -print` > .hdepend # 1) The use of /. to avoid tar packing just the symlink
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" # 2) Removing the .dep files as they have source paths in them that
ifdef CONFIG_MODVERSIONS # will become invalid
$(MAKE) update-modverfile
endif
ifdef CONFIG_MODVERSIONS rpm: clean spec
MODVERFILE := $(TOPDIR)/include/linux/modversions.h find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
else set -e; \
MODVERFILE := cd $(TOPDIR)/.. ; \
endif ln -sf $(TOPDIR) $(KERNELPATH) ; \
export MODVERFILE tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
rm $(KERNELPATH) ; \
cd $(TOPDIR) ; \
. scripts/mkversion > .version ; \
rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
rm $(TOPDIR)/../$(KERNELPATH).tar.gz
depend dep: dep-files # Scripts to check various things for consistency
checkconfig: checkconfig:
find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkconfig.pl
...@@ -464,61 +453,37 @@ checkhelp: ...@@ -464,61 +453,37 @@ checkhelp:
checkincludes: checkincludes:
find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl find * -name '*.[hcS]' -type f -print | sort | xargs $(PERL) -w scripts/checkincludes.pl
ifdef CONFIGURATION # Generate tags for editors
..$(CONFIGURATION):
@echo
@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
@echo
$(MAKE) $(CONFIGURATION)
@echo
@echo "Successful. Try re-making (ignore the error that follows)"
@echo
exit 1
#dummy: ..$(CONFIGURATION)
dummy:
else TAGS: dummy
{ find include/asm-${ARCH} -name '*.h' -print ; \
find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print ; \
find $(SUBDIRS) init -name '*.[ch]' ; } | grep -v SCCS | etags -
dummy: # Exuberant ctags works better with -I
tags: dummy
CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
ctags $$CTAGSF `find include/asm-$(ARCH) -name '*.h'` && \
find include -type d \( -name "asm-*" -o -name config \) -prune -o -name '*.h' -print | xargs ctags $$CTAGSF -a && \
find $(SUBDIRS) init -name '*.[ch]' | xargs ctags $$CTAGSF -a
endif # Targets which will only descend into one subdir, not trying
# to link vmlinux afterwards
# FIXME: anybody still using this?
include Rules.make fs lib mm ipc kernel drivers net sound: dummy
$(MAKE) CFLAGS="$(CFLAGS) $(CFLAGS_KERNEL)" $(subst $@, _dir_$@, $@)
# # Make a backup
# This generates dependencies for the .h files. # FIXME anybody still using this?
#
scripts/mkdep: scripts/mkdep.c backup: mrproper
$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c cd .. && tar cf - linux/ | gzip -9 > backup.gz
sync
scripts/split-include: scripts/split-include.c # Make checksums
$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c # FIXME anybody still using this?
# sums:
# RPM target find . -type f -print | sort | xargs sum > .SUMS
#
# If you do a make spec before packing the tarball you can rpm -ta it
#
spec:
. scripts/mkspec >kernel.spec
#
# Build a tar ball, generate an rpm from it and pack the result
# There arw two bits of magic here
# 1) The use of /. to avoid tar packing just the symlink
# 2) Removing the .dep files as they have source paths in them that
# will become invalid
#
rpm: clean spec
find . \( -size 0 -o -name .depend -o -name .hdepend \) -type f -print | xargs rm -f
set -e; \
cd $(TOPDIR)/.. ; \
ln -sf $(TOPDIR) $(KERNELPATH) ; \
tar -cvz --exclude CVS -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \
rm $(KERNELPATH) ; \
cd $(TOPDIR) ; \
. scripts/mkversion > .version ; \
rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
rm $(TOPDIR)/../$(KERNELPATH).tar.gz
...@@ -8,6 +8,25 @@ ...@@ -8,6 +8,25 @@
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# #
# ROOT_DEV specifies the default root-device when making the image.
# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
# the default of FLOPPY is used by 'build'.
ROOT_DEV := CURRENT
# If you want to preset the SVGA mode, uncomment the next line and
# set SVGA_MODE to whatever number you want.
# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
# The number is the same as you would ordinarily press at bootup.
SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
# If you want the RAM disk device, define this to be the size in blocks.
RAMDISK := -DRAMDISK=512
# ---------------------------------------------------------------------------
BOOT_INCL = $(TOPDIR)/include/linux/config.h \ BOOT_INCL = $(TOPDIR)/include/linux/config.h \
$(TOPDIR)/include/linux/autoconf.h \ $(TOPDIR)/include/linux/autoconf.h \
$(TOPDIR)/include/asm/boot.h $(TOPDIR)/include/asm/boot.h
......
...@@ -8,6 +8,25 @@ ...@@ -8,6 +8,25 @@
# Copyright (C) 1994 by Linus Torvalds # Copyright (C) 1994 by Linus Torvalds
# #
# ROOT_DEV specifies the default root-device when making the image.
# This can be either FLOPPY, CURRENT, /dev/xxxx or empty, in which case
# the default of FLOPPY is used by 'build'.
ROOT_DEV := CURRENT
# If you want to preset the SVGA mode, uncomment the next line and
# set SVGA_MODE to whatever number you want.
# Set it to -DSVGA_MODE=NORMAL_VGA if you just want the EGA/VGA mode.
# The number is the same as you would ordinarily press at bootup.
SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
# If you want the RAM disk device, define this to be the size in blocks.
RAMDISK := -DRAMDISK=512
# ---------------------------------------------------------------------------
BOOT_INCL = $(TOPDIR)/include/linux/config.h \ BOOT_INCL = $(TOPDIR)/include/linux/config.h \
$(TOPDIR)/include/linux/autoconf.h \ $(TOPDIR)/include/linux/autoconf.h \
$(TOPDIR)/include/asm/boot.h $(TOPDIR)/include/asm/boot.h
......
...@@ -44,6 +44,6 @@ sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o ...@@ -44,6 +44,6 @@ sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o
sa1100_cs-objs-$(CONFIG_SA1100_TRIZEPS) += sa1100_trizeps.o sa1100_cs-objs-$(CONFIG_SA1100_TRIZEPS) += sa1100_trizeps.o
sa1100_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o sa1111_generic.o sa1100_cs-objs-$(CONFIG_SA1100_XP860) += sa1100_xp860.o sa1111_generic.o
sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o sa1100_cs-objs-$(CONFIG_SA1100_YOPY) += sa1100_yopy.o
sa1100_cs-objs := $(sa11000_cs-objs-y) sa1100_cs-objs := $(sa1100_cs-objs-y)
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
TARGET=$1
ARCH=$2
SMP=$3
CC=$4
# Generate a temporary compile.h
( echo /\* This file is auto generated, version `cat .version` \*/
echo \#define UTS_MACHINE \"$ARCH\"
echo -n \#define UTS_VERSION \"\#`cat .version`
if [ -n "$SMP" ] ; then echo -n " SMP"; fi
echo ' '`date`'"'
echo \#define LINUX_COMPILE_TIME \"`date +%T`\"
echo \#define LINUX_COMPILE_BY \"`whoami`\"
echo \#define LINUX_COMPILE_HOST \"`hostname`\"
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
echo \#define LINUX_COMPILER \"`$CC -v 2>&1 | tail -1`\"
) > .tmpcompile
# Only replace the real compile.h if the new one is different,
# in order to preserve the timestamp and avoid unnecessary
# recompilations.
# We don't consider the file changed if only the date/time changed.
# A kernel config change will increase the generation number, thus
# causing compile.h to be updated (including date/time) due to the
# changed comment in the
# first line.
if [ -r $TARGET ] && \
grep -v 'UTS_VERSION\|LINUX_COMPILE_TIME' $TARGET > .tmpver.1 && \
grep -v 'UTS_VERSION\|LINUX_COMPILE_TIME' .tmpcompile > .tmpver.2 && \
cmp -s .tmpver.1 .tmpver.2; then
echo $TARGET is unchanged;
rm -f .tmpcompile
else
mv -f .tmpcompile $TARGET
fi
rm -f .tmpver.1 .tmpver.2
TARGET=$1
KERNELRELEASE=$2
VERSION=$3
PATCHLEVEL=$4
SUBLEVEL=$5
# Generate a temporary version.h
( echo \#define UTS_RELEASE \"$KERNELRELEASE\"
echo \#define LINUX_VERSION_CODE `expr $VERSION \\* 65536 + $PATCHLEVEL \\* 256 + $SUBLEVEL`
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'
) > .tmpversion
mv -f .tmpversion $TARGET
\ No newline at end of file
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