Commit 20d4607f authored by Kai Germaschewski's avatar Kai Germaschewski

Hand merged.

parents 6e8b5dcf b51b9174
......@@ -13,14 +13,6 @@ DOCBOOKS := wanbook.sgml z8530book.sgml mcabook.sgml videobook.sgml \
writing_usb_driver.sgml scsidrivers.sgml sis900.sgml \
kernel-api.sgml journal-api.sgml lsm.sgml
JBDSOURCES := $(TOPDIR)/include/linux/jbd.h \
$(TOPDIR)/fs/jbd/journal.c \
$(TOPDIR)/fs/jbd/recovery.c \
$(TOPDIR)/fs/jbd/transaction.c
journal-api.sgml: journal-api.tmpl $(JBDSOURCES)
$(TOPDIR)/scripts/docgen $(JBDSOURCES) \
<journal-api.tmpl >journal-api.sgml
###
# The build process is as follows (targets):
# (sgmldocs)
......@@ -32,7 +24,7 @@ journal-api.sgml: journal-api.tmpl $(JBDSOURCES)
# The targets that may be used.
.PHONY: sgmldocs psdocs pdfdocs htmldocs clean mrproper
BOOKS := $(addprefix Documentation/DocBook/,$(DOCBOOKS))
BOOKS := $(addprefix $(obj)/,$(DOCBOOKS))
sgmldocs: $(BOOKS)
PS := $(patsubst %.sgml, %.ps, $(BOOKS))
......@@ -86,19 +78,19 @@ $(BOOKS): $(KERNELDOC)
###
# procfs guide uses a .c file as example code.
# This requires an explicit dependency
C-procfs-example = Documentation/DocBook/procfs_example.sgml
Documentation/DocBook/procfs-guide.sgml: $(C-procfs-example)
C-procfs-example = procfs_example.sgml
C-procfs-example2 = $(addprefix $(obj)/,$(C-procfs-example))
$(obj)/procfs-guide.sgml: $(C-procfs-example2)
###
# The parportbook includes a few images.
# Force them to be build before the books
IMG-parportbook := parport-share.fig parport-multi.fig parport-structure.fig
IMG-parportbook2 := $(addprefix Documentation/DocBook/,$(IMG-parportbook))
IMG-parportbook2 := $(addprefix $(obj)/,$(IMG-parportbook))
EPS-parportbook := $(patsubst %.fig,%.eps, $(IMG-parportbook2))
PNG-parportbook := $(patsubst %.fig,%.png, $(IMG-parportbook2))
Documentation/DocBook/parportbook.html: $(PNG-parportbook)
Documentation/DocBook/parportbook.ps Documentation/DocBook/parportbook.pdf:\
$(EPS-parportbook)
$(obj)/parportbook.html: $(PNG-parportbook)
$(obj)/parportbook.ps $(obj)/parportbook.pdf: $(EPS-parportbook)
###
# Rules to generate postscript, PDF and HTML
......@@ -155,21 +147,20 @@ dochelp:
###
# clean and mrproper as used by the top-level makefile
# Temporary files left by various tools
DVI := $(patsubst %.sgml, %.dvi, $(BOOKS))
AUX := $(patsubst %.sgml, %.aux, $(BOOKS))
TEX := $(patsubst %.sgml, %.tex, $(BOOKS))
LOG := $(patsubst %.sgml, %.log, $(BOOKS))
OUT := $(patsubst %.sgml, %.out, $(BOOKS))
clean:
@rm -f $(BOOKS)
@rm -f $(DVI) $(AUX) $(TEX) $(LOG) $(OUT)
@rm -f $(PNG-parportbook) $(EPS-parportbook)
@rm -f $(C-procfs-example)
mrproper:
@rm -f $(PS) $(PDF)
@rm -f -r $(HTML) $(patsubst %.html,%,$(HTML))
clean-files := $(DOCBOOKS) \
$(patsubst %.sgml, %.dvi, $(DOCBOOKS)) \
$(patsubst %.sgml, %.aux, $(DOCBOOKS)) \
$(patsubst %.sgml, %.tex, $(DOCBOOKS)) \
$(patsubst %.sgml, %.log, $(DOCBOOKS)) \
$(patsubst %.sgml, %.out, $(DOCBOOKS)) \
$(patsubst %.sgml, %.ps, $(DOCBOOKS)) \
$(patsubst %.sgml, %.pdf, $(DOCBOOKS)) \
$(patsubst %.sgml, %.html, $(DOCBOOKS)) \
$(patsubst %.fig,%.eps, $(IMG-parportbook)) \
$(patsubst %.fig,%.png, $(IMG-parportbook)) \
$(C-procfs-example)
clean-rule := rm -rf $(patsubst %.html,%,$(HTML))
include $(TOPDIR)/Rules.make
......@@ -661,84 +661,63 @@ allmodconfig:
defconfig:
yes '' | $(CONFIG_SHELL) $(src)/scripts/Configure -d arch/$(ARCH)/config.in
# Cleaning up
# ---------------------------------------------------------------------------
# files removed with 'make clean'
CLEAN_FILES += \
include/linux/compile.h \
vmlinux System.map \
drivers/char/consolemap_deftbl.c drivers/video/promcon_tbl.c \
drivers/char/conmakehash \
drivers/char/drm/*-mod.c \
drivers/char/defkeymap.c drivers/char/qtronixmap.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/aic7xxx_seq.h \
drivers/scsi/aic7xxx/aic7xxx_reg.h \
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 drivers/scsi/sim710_d.h \
drivers/scsi/53c7xx_d.h drivers/scsi/53c7xx_u.h \
drivers/scsi/53c8xx_d.h drivers/scsi/53c8xx_u.h \
net/802/cl2llc.c net/802/transit/pdutr.h net/802/transit/timertr.h \
net/802/pseudo/pseudocode.h \
net/khttpd/make_times_h net/khttpd/times.h \
submenu*
# files removed with 'make mrproper'
###
# Cleaning is done on three levels.
# make clean Delete all automatically generated files, including
# tools and firmware.
# make mrproper Delete the current configuration, and related files
# Any core files spread around is deleted as well
# make distclean Remove editor backup files, patch leftover files and the like
# Files removed with 'make clean'
CLEAN_FILES += vmlinux System.map MC*
# 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 \
.version .config .config.old config.in config.old \
.menuconfig.log \
include/asm \
.hdepend include/linux/modversions.h \
tags TAGS kernel.spec \
.tmp*
# directories removed with 'make mrproper'
# Directories removed with 'make mrproper'
MRPROPER_DIRS += \
.tmp_export-objs \
include/config \
include/linux/modules
clean: archclean
@echo 'Cleaning up'
@find . $(RCS_FIND_IGNORE) \
\( -name \*.[oas] -o -name core -o -name .\*.cmd -o \
-name .\*.tmp -o -name .\*.d \) -type f -print \
| grep -v lxdialog/ | xargs rm -f
@rm -f $(CLEAN_FILES)
+@$(call descend,Documentation/DocBook,clean)
# clean - Delete all intermidiate files
#
clean-dirs += $(ALL_SUBDIRS) Documentation/DocBook
cleanprint:
@echo ' Cleaning the srctree'
$(addprefix _clean_,$(clean-dirs)): cleanprint
+@$(call descend,$(patsubst _clean_%,%,$@), subdirclean)
quiet_cmd_rmclean = RM $$(CLEAN_FILES)
cmd_rmclean = rm -f $(CLEAN_FILES)
clean: archclean $(addprefix _clean_,$(clean-dirs))
$(call cmd,rmclean)
# mrproper - delete configuration + modules + core files
#
quiet_cmd_mrproper = RM $$(MRPROPER_DIRS) + $$(MRPROPER_FILES)
cmd_mrproper = rm -rf $(MRPROPER_DIRS) && rm -f $(MRPROPER_FILES)
mrproper: clean archmrproper
@echo 'Making mrproper'
@echo ' Making mrproper in the srctree'
@find . $(RCS_FIND_IGNORE) \
\( -name .depend -o -name .\*.cmd \) \
\( -name .depend -o -name .\*.cmd -o -name core \) \
-type f -print | xargs rm -f
@rm -rf $(MRPROPER_DIRS)
@rm -f $(MRPROPER_FILES)
$(call cmd,mrproper)
+@$(call descend,scripts,mrproper)
+@$(call descend,Documentation/DocBook,mrproper)
# distclean - remove all temporaries left behind by patch, vi, emacs etc.
#
distclean: mrproper
@echo 'Making distclean'
@echo ' Making distclean in the srctree'
@find . $(RCS_FIND_IGNORE) \
\( -not -type d \) -and \
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
......
......@@ -87,6 +87,7 @@ obj-m := $(filter-out %/, $(obj-m))
# Subdirectories we need to descend into
subdir-ym := $(sort $(subdir-y) $(subdir-m))
subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-))
# export.o is never a composite object, since $(export-objs) has a
# fixed meaning (== objects which EXPORT_SYMBOL())
......@@ -113,6 +114,10 @@ real-objs-m := $(foreach m, $(obj-m), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m
# Only build module versions for files which are selected to be built
export-objs := $(filter $(export-objs),$(real-objs-y) $(real-objs-m))
host-progs-single := $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m)))
host-progs-multi := $(foreach m,$(host-progs),$(if $($(m)-objs),$(m)))
host-progs-multi-objs := $(foreach m,$(host-progs-multi),$($(m)-objs))
# Add subdir path
EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS))
......@@ -127,12 +132,19 @@ multi-used-m := $(addprefix $(obj)/,$(multi-used-m))
multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y))
multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m))
subdir-ym := $(addprefix $(obj)/,$(subdir-ym))
subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn))
clean-files := $(addprefix $(obj)/,$(clean-files))
host-progs := $(addprefix $(obj)/,$(host-progs))
host-progs-single := $(addprefix $(obj)/,$(host-progs-single))
host-progs-multi := $(addprefix $(obj)/,$(host-progs-multi))
host-progs-multi-objs := $(addprefix $(obj)/,$(host-progs-multi-objs))
# The temporary file to save gcc -MD generated dependencies must not
# contain a comma
depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
# We're called for one of three purposes:
# We're called for one of four purposes:
# o subdirclean: Delete intermidiate files in the current directory
# o fastdep: build module version files (.ver) for $(export-objs) in
# the current directory
# o modules_install: install the modules in the current directory
......@@ -142,6 +154,13 @@ depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
# When targets are given directly (like foo.o), we just build these
# targets (That happens when someone does make some/dir/foo.[ois])
ifeq ($(MAKECMDGOALS),subdirclean)
subdirclean: $(subdir-ymn)
@/bin/true
@rm -f $(EXTRA_TARGETS) $(host-progs) $(clean-files) \
$(addprefix $(obj)/,*.[oas] .*.cmd .*.tmp .*.d)
@$(clean-rule)
else
ifeq ($(MAKECMDGOALS),fastdep)
# ===========================================================================
......@@ -399,14 +418,6 @@ targets += $(multi-used-y) $(multi-used-m)
# Compile programs on the host
# ===========================================================================
host-progs-single := $(foreach m,$(host-progs),$(if $($(m)-objs),,$(m)))
host-progs-multi := $(foreach m,$(host-progs),$(if $($(m)-objs),$(m)))
host-progs-multi-objs := $(foreach m,$(host-progs-multi),$($(m)-objs))
host-progs := $(addprefix $(obj)/,$(host-progs))
host-progs-single := $(addprefix $(obj)/,$(host-progs-single))
host-progs-multi := $(addprefix $(obj)/,$(host-progs-multi))
host-progs-multi-objs := $(addprefix $(obj)/,$(host-progs-multi-objs))
quiet_cmd_host_cc__c = HOSTCC $(echo_target)
cmd_host_cc__c = $(HOSTCC) -Wp,-MD,$(depfile) \
$(HOSTCFLAGS) $(HOST_EXTRACFLAGS) \
......@@ -431,6 +442,7 @@ $(host-progs-multi): %: $(host-progs-multi-objs) FORCE
targets += $(host-progs-single) $(host-progs-multi-objs) $(host-progs-multi)
endif # ! subdirclean
endif # ! modules_install
endif # ! fastdep
......@@ -480,9 +492,9 @@ cmd_gzip = gzip -f -9 < $< > $@
# Descending
# ---------------------------------------------------------------------------
.PHONY: $(subdir-ym)
.PHONY: $(subdir-ymn)
$(subdir-ym):
$(subdir-ymn):
+@$(call descend,$@,$(MAKECMDGOALS))
# Add FORCE to the prequisites of a target to force it to be always rebuilt.
......
......@@ -8,6 +8,10 @@ export-objs := uPD98402.o suni.o idt77105.o
fore_200e-objs := fore200e.o
host-progs := fore200e_mkfirm
# Files generated that shall be removed upon make clean
clean-files := {atmsar11,pca200e,pca200e_ecd,sba200e_ecd}.{bin,bin1,bin2}
# Firmware generated that shall be removed upon make clean
clean-files += fore200e_pca_fw.c fore200e_sba_fw.c
obj-$(CONFIG_ATM_ZATM) += zatm.o uPD98402.o
obj-$(CONFIG_ATM_NICSTAR) += nicstar.o
......@@ -61,6 +65,6 @@ $(obj)/fore200e_sba_fw.c: $(patsubst "%", %, $(CONFIG_ATM_FORE200E_SBA_FW)) \
-i $(CONFIG_ATM_FORE200E_SBA_FW) -o $@
# deal with the various suffixes of the binary firmware images
$(obj)/%.bin $(obj)/%.bin1 $(obj)/%.bin2: $(obj)/%.data
$(obj)/%.bin $(obj)/%.bin1 $(obj)/%.bin2: $(src)/%.data
objcopy -Iihex $< -Obinary $@.gz
gzip -df $@.gz
......@@ -103,6 +103,9 @@ obj-$(CONFIG_AGP) += agp/
obj-$(CONFIG_DRM) += drm/
obj-$(CONFIG_PCMCIA) += pcmcia/
# Files generated that shall be removed upon make clean
clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c
include $(TOPDIR)/Rules.make
$(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE)
......
......@@ -19,6 +19,12 @@ soundmodem-objs := $(soundmodem-y)
host-progs := gentbl
HOST_LOADLIBES := -lm
# Files generated that shall be removed upon make clean
clean-files := sm_tbl_afsk1200.h sm_tbl_afsk2400_7.h \
sm_tbl_afsk2400_8.h sm_tbl_afsk2666.h \
sm_tbl_psk4800.h sm_tbl_hapn4800.h \
sm_tbl_fsk9600.h
include $(TOPDIR)/Rules.make
# Dependencies on generates files need to be listed explicitly
......
......@@ -31,6 +31,9 @@ endif
host-progs := gen-devlist
# Files generated that shall be removed upon make clean
clean-files := devlist.h classlist.h
include $(TOPDIR)/Rules.make
# Dependencies on generated files need to be listed explicitly
......
......@@ -132,6 +132,10 @@ a100u2w-objs := inia100.o i60uscsi.o
cpqfc-objs := cpqfcTSinit.o cpqfcTScontrol.o cpqfcTSi2c.o \
cpqfcTSworker.o cpqfcTStrigger.o
# Files generated that shall be removed upon make clean
clean-files := 53c8xx_d.h 53c7xx_d.h sim710_d.h 53c700_d.h \
53c8xx_u.h 53c7xx_u.h sim710_u.h 53c700_u.h
include $(TOPDIR)/Rules.make
$(obj)/53c7,8xx.o: $(obj)/53c8xx_d.h $(obj)/53c8xx_u.h
......
......@@ -20,6 +20,13 @@ endif
#EXTRA_CFLAGS += -g
# Files generated that shall be removed upon make clean
clean-files := aic7xxx_seq.h aic7xxx_reg.h
# Command to be executed upon make clean
# Note: Assignment without ':' to force late evaluation of $(src)
clean-rule = @$(MAKE) -C $(src)/aicasm clean
include $(TOPDIR)/Rules.make
# Dependencies for generated files need to be listed explicitly
......@@ -30,12 +37,13 @@ $(addprefix $(obj)/,$(aic7xxx-objs)): $(obj)/aic7xxx_reg.h
ifeq ($(CONFIG_AIC7XXX_BUILD_FIRMWARE),y)
$(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h: $(src)/aic7xxx.seq \
$(src)/aic7xxx.reg \
$(obj)/aicasm/aicasm
$(obj)/aic7xxx_seq.h: $(src)/aic7xxx.seq $(src)/aic7xxx.reg \
$(obj)/aicasm/aicasm
$(obj)/aicasm/aicasm -I. -r $(obj)/aic7xxx_reg.h \
-o $(obj)/aic7xxx_seq.h $(src)/aic7xxx.seq
$(obj)/aic7xxx_reg.h: $(obj)/aix7xxx_seq.h
$(obj)/aicasm/aicasm: $(src)/aicasm/*.[chyl]
$(MAKE) -C $(src)/aicasm
......
......@@ -43,7 +43,7 @@ aicdb.h:
fi
clean:
rm -f $(CLEANFILES) $(PROG)
@rm -f $(CLEANFILES) $(PROG)
y.tab.h aicasm_gram.c: aicasm_gram.y
$(YACC) $(YFLAGS) aicasm_gram.y
......
......@@ -119,6 +119,9 @@ obj-$(CONFIG_FBCON_HGA) += fbcon-hga.o
obj-$(CONFIG_FBCON_STI) += fbcon-sti.o
obj-$(CONFIG_FBCON_ACCEL) += fbcon-accel.o
# Files generated that shall be removed upon make clean
clean-files := promcon_tbl.c
include $(TOPDIR)/Rules.make
$(obj)/promcon_tbl.c: $(src)/prom.uni
......
......@@ -9,6 +9,9 @@ obj-$(CONFIG_PROC_FS) += proc.o
host-progs := gen-devlist
# Files generated that shall be removed upon make clean
clean-files := devlist.h
include $(TOPDIR)/Rules.make
# Dependencies on generated files need to be listed explicitly
......
......@@ -4,17 +4,20 @@
obj-y := main.o version.o do_mounts.o
# files to be removed upon make clean
clean-files := ../include/linux/compile.h
include $(TOPDIR)/Rules.make
# dependencies on generated files need to be listed explicitly
$(obj)/version.o: $(objtree)/include/linux/compile.h
$(obj)/version.o: $(obj)/../include/linux/compile.h
# compile.h changes depending on hostname, generation number, etc,
# so we regenerate it always.
# mkcompile_h will make sure to only update the
# actual file if its content has changed.
$(objtree)/include/linux/compile.h: FORCE
@echo -n ' Generating $@'
$(obj)/../include/linux/compile.h: FORCE
@echo -n ' Generating $(echo_target)'
@sh $(srctree)/scripts/mkcompile_h $@ "$(ARCH)" "$(CONFIG_SMP)" "$(CC) $(CFLAGS)"
......@@ -96,6 +96,10 @@ wavefront-objs := wavfront.o wf_midi.o yss225.o
host-progs := bin2hex hex2hex
# Files generated that shall be removed upon make clean
clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
pss_boot.h trix_boot.h
include $(TOPDIR)/Rules.make
# Firmware files that need translation
......
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