source: MondoRescue/branches/stable/mindi-busybox/scripts/Kbuild.include

Last change on this file was 1770, checked in by Bruno Cornec, 16 years ago
  • Better output for mindi-busybox revision
  • Remove dummy file created on NFS - report from Arnaud Tiger <arnaud.tiger_at_hp.com>
  • strace useful for debug
  • fix new versions for pb (2.0.0 for mindi and 1.7.2 for mindi-busybox)
  • fix build process for mindi-busybox + options used in that version (dd for label-partitions-as-necessary)
  • fix typo in label-partitions-as-necessary which doesn't seem to work
  • Update to busybox 1.7.2
  • perl is now required at restore time to support uuid swap partitions (and will be used for many other thigs

in the future for sure)

  • next mindi version will be 2.0.0 due to all the changes made in it (udev may break working distros)
  • small optimization in mindi on keyboard handling (one single find instead of multiple)
  • better interaction for USB device when launching mindi manually
  • attempt to automatically guess block disk size for ramdisk
  • fix typos in bkphw
  • Fix the remaining problem with UUID support for swap partitions
  • Updates mondoarchive man page for USB support
  • Adds preliminary Hardware support to mindi (Proliant SSSTK)
  • Tries to add udev support also for rhel4
  • Fix UUID support which was still broken.
  • Be conservative in test for the start-nfs script
  • Update config file for mindi-busybox for 1.7.2 migration
  • Try to run around a busybox bug (1.2.2 pb on inexistant links)
  • Add build content for mindi-busybox in pb
  • Remove distributions content for mindi-busybox
  • Fix a warning on inexistant raidtab
  • Solve problem on tmpfs in restore init (Problem of inexistant symlink and busybox)
  • Create MONDO_CACHE and use it everywhere + creation at start
  • Really never try to eject a USB device
  • Fix a issue with &> usage (replaced with 1> and 2>)
  • Adds magic file to depllist in order to have file working + ldd which helps for debugging issues
  • tty modes correct to avoid sh error messages
  • Use ext3 normally and not ext2 instead
  • USB device should be corrected after reading (take 1st part)
  • Adds a mount_USB_here function derived from mount_CDROM_here
  • usb detection place before /dev detection in device name at restore time
  • Fix when restoring from USB: media is asked in interactive mode
  • Adds USB support for mondorestore
  • mount_cdrom => mount_media
  • elilo.efi is now searched throughout /boot/efi and not in a fixed place as there is no standard
  • untar-and-softlink => untar (+ interface change)
  • suppress useless softlinks creation/removal in boot process
  • avoids udevd messages on groups
  • Increase # of disks to 99 as in mindi at restore time (should be a conf file parameter)
  • skip existing big file creation
  • seems to work correctly for USB mindi boot
  • Adds group and tty link to udev conf
  • Always load usb-torage (even 2.6) to initiate USB bus discovery
  • Better printing of messages
  • Attempt to fix a bug in supporting OpenSusE 10.3 kernel for initramfs (mindi may now use multiple regex for kernel initrd detection)
  • Links were not correctly done as non relative for modules in mindi
  • exclusion of modules denied now works
  • Also create modules in their ordinary place, so that classical modprobe works + copy modules.dep
  • Fix bugs for DENY_MODS handling
  • Add device /dev/console for udev
  • ide-generic should now really be excluded
  • Fix a bug in major number for tty
  • If udev then adds modprobe/insmod to rootfs
  • tty0 is also cretaed with udev
  • ide-generic put rather in DENY_MODS
  • udevd remove from deplist s handled in mindi directly
  • better default for mindi when using --usb
  • Handles dynamically linked busybox (in case we want to use it soon ;-)
  • Adds fixed devices to create for udev
  • ide-generic should not be part of the initrd when using libata v2
  • support a dynamically linked udev (case on Ubuntu 7.10 and Mandriva 2008.0 so should be quite generic) This will give incitation to move to dyn. linked binaries in the initrd which will help for other tasks (ia6 4)
  • Improvement in udev support (do not use cl options not available in busybox)
  • Udev in mindi
    • auto creation of the right links at boot time with udev-links.conf(from Mandriva 2008.0)
    • rework startup of udev as current makes kernel crash (from Mandriva 2008.0)
    • add support for 64 bits udev
  • Try to render MyInsmod silent at boot time
  • Adds udev support (mandatory for newest distributions to avoid remapping of devices in a different way as on the original system)
  • We also need vaft format support for USB boot
  • Adds libusual support (Ubuntu 7.10 needs it for USB)
  • Improve Ubuntu/Debian keyboard detection and support
  • pbinit adapted to new pb (0.8.10). Filtering of docs done in it
  • Suppress some mondo warnings and errors on USB again
  • Tries to fix lack of files in deb mindi package
  • Verify should now work for USB devices
  • More log/mesages improvement for USB support
  • - Supress g_erase_tmpdir_and_scratchdir
  • Improve some log messages for USB support
  • Try to improve install in mindi to avoid issues with isolinux.cfg not installed vene if in the pkg :-(
  • Improve mindi-busybox build
  • In conformity with pb 0.8.9
  • Add support for Ubuntu 7.10 in build process
  • Add USB Key button to Menu UI (CD streamer removed)
  • Attempt to fix error messages on tmp/scratch files at the end by removing those dir at the latest possible.
  • Fix a bug linked to the size of the -E param which could be used (Arnaud Tiger/René Ribaud).
  • Integrate ~/.pbrc content into mondorescue.pb (required project-builder >= 0.8.7)
  • Put mondorescue in conformity with new pb filtering rules
  • Add USB support at restore time (no test done yet). New start-usb script PB varibale added where useful
  • Unmounting USB device before removal of temporary scratchdir
  • Stil refining USB copy back to mondo (one command was not executed)
  • No need to have the image subdor in the csratchdir when USB.
  • umount the USB partition before attempting to use it
  • Remove useless copy from mindi to mondo at end of USB handling

(risky merge, we are raising the limits of 2 diverging branches. The status of stable is not completely sure as such. Will need lots of tests, but it's not yet done :-()
(merge -r1692:1769 $SVN_M/branches/2.2.5)

File size: 5.3 KB
Line 
1####
2# kbuild: Generic definitions
3
4# Convinient variables
5comma := ,
6squote := '
7empty :=
8space := $(empty) $(empty)
9
10###
11# The temporary file to save gcc -MD generated dependencies must not
12# contain a comma
13depfile = $(subst $(comma),_,$(@D)/.$(@F).d)
14
15###
16# Escape single quote for use in echo statements
17escsq = $(subst $(squote),'\$(squote)',$1)
18
19###
20# filechk is used to check if the content of a generated file is updated.
21# Sample usage:
22# define filechk_sample
23# echo $KERNELRELEASE
24# endef
25# version.h : Makefile
26# $(call filechk,sample)
27# The rule defined shall write to stdout the content of the new file.
28# The existing file will be compared with the new one.
29# - If no file exist it is created
30# - If the content differ the new file is used
31# - If they are equal no change, and no timestamp update
32# - stdin is piped in from the first prerequisite ($<) so one has
33# to specify a valid file as first prerequisite (often the kbuild file)
34define filechk
35 $(Q)set -e; \
36 echo ' CHK $@'; \
37 mkdir -p $(dir $@); \
38 $(filechk_$(1)) < $< > $@.tmp; \
39 if [ -r $@ ] && cmp -s $@ $@.tmp; then \
40 rm -f $@.tmp; \
41 else \
42 echo ' UPD $@'; \
43 mv -f $@.tmp $@; \
44 fi
45endef
46
47######
48# gcc support functions
49# See documentation in Documentation/kbuild/makefiles.txt
50
51# as-option
52# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)
53
54as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
55 -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
56 else echo "$(2)"; fi ;)
57
58# cc-option
59# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)
60
61cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
62 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
63
64# hostcc-option
65# Usage: hostcflags-y += $(call hostcc-option, -march=winchip-c6, -march=i586)
66
67hostcc-option = $(shell if $(HOSTCC) $(HOSTCFLAGS) $(1) -S -o /dev/null -xc /dev/null \
68 > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
69
70# cc-option-yn
71# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
72cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
73 > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
74
75# cc-option-align
76# Prefix align with either -falign or -malign
77cc-option-align = $(subst -functions=0,,\
78 $(call cc-option,-falign-functions=0,-malign-functions=0))
79
80# cc-version
81# Usage gcc-ver := $(call cc-version, $(CC))
82cc-version = $(shell PATH="$(PATH)" $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \
83 $(if $(1), $(1), $(CC)))
84
85# cc-ifversion
86# Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1)
87cc-ifversion = $(shell if [ $(call cc-version, $(CC)) $(1) $(2) ]; then \
88 echo $(3); fi;)
89
90###
91# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=
92# Usage:
93# $(Q)$(MAKE) $(build)=dir
94build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
95
96# Prefix -I with $(srctree) if it is not an absolute path
97addtree = $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)
98# Find all -I options and call addtree
99flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o)))
100
101# If quiet is set, only print short version of command
102cmd = @$(echo-cmd) $(cmd_$(1))
103
104# Add $(obj)/ for paths that is not absolute
105objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o)))
106
107###
108# if_changed - execute command if any prerequisite is newer than
109# target, or command line has changed
110# if_changed_dep - as if_changed, but uses fixdep to reveal dependencies
111# including used config symbols
112# if_changed_rule - as if_changed but execute rule instead
113# See Documentation/kbuild/makefiles.txt for more info
114
115ifneq ($(KBUILD_NOCMDDEP),1)
116# Check if both arguments has same arguments. Result in empty string if equal
117# User may override this check using make KBUILD_NOCMDDEP=1
118arg-check = $(strip $(filter-out $(1), $(2)) $(filter-out $(2), $(1)) )
119endif
120
121# echo command. Short version is $(quiet) equals quiet, otherwise full command
122echo-cmd = $(if $($(quiet)cmd_$(1)), \
123 echo ' $(call escsq,$($(quiet)cmd_$(1)))';)
124
125make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))
126
127# function to only execute the passed command if necessary
128# >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file
129# note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars
130#
131if_changed = $(if $(strip $(filter-out $(PHONY),$?) \
132 $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
133 @set -e; \
134 $(echo-cmd) $(cmd_$(1)); \
135 echo 'cmd_$@ := $(make-cmd)' > $(@D)/.$(@F).cmd)
136
137# execute the command and also postprocess generated .d dependencies
138# file
139if_changed_dep = $(if $(strip $(filter-out $(PHONY),$?) \
140 $(filter-out FORCE $(wildcard $^),$^) \
141 $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \
142 @set -e; \
143 $(echo-cmd) $(cmd_$(1)); \
144 scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(@D)/.$(@F).tmp; \
145 rm -f $(depfile); \
146 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd)
147
148# Usage: $(call if_changed_rule,foo)
149# will check if $(cmd_foo) changed, or any of the prequisites changed,
150# and if so will execute $(rule_foo)
151if_changed_rule = $(if $(strip $(filter-out $(PHONY),$?) \
152 $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\
153 @set -e; \
154 $(rule_$(1)))
Note: See TracBrowser for help on using the repository browser.