Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes: kbuild: remove unused -r option for module-init-tool depmod kbuild: fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree kbuild: fix mkspec to cleanup RPM_BUILD_ROOT kbuild: fix C libary confusion in unifdef.c due to getline()
This commit is contained in:
Коммит
9ead64974b
18
Makefile
18
Makefile
|
@ -904,12 +904,18 @@ localver = $(subst $(space),, $(string) \
|
||||||
# and if the SCM is know a tag from the SCM is appended.
|
# and if the SCM is know a tag from the SCM is appended.
|
||||||
# The appended tag is determined by the SCM used.
|
# The appended tag is determined by the SCM used.
|
||||||
#
|
#
|
||||||
# Currently, only git is supported.
|
# .scmversion is used when generating rpm packages so we do not loose
|
||||||
# Other SCMs can edit scripts/setlocalversion and add the appropriate
|
# the version information from the SCM when we do the build of the kernel
|
||||||
# checks as needed.
|
# from the copied source
|
||||||
ifdef CONFIG_LOCALVERSION_AUTO
|
ifdef CONFIG_LOCALVERSION_AUTO
|
||||||
_localver-auto = $(shell $(CONFIG_SHELL) \
|
|
||||||
$(srctree)/scripts/setlocalversion $(srctree))
|
ifeq ($(wildcard .scmversion),)
|
||||||
|
_localver-auto = $(shell $(CONFIG_SHELL) \
|
||||||
|
$(srctree)/scripts/setlocalversion $(srctree))
|
||||||
|
else
|
||||||
|
_localver-auto = $(shell cat .scmversion 2> /dev/null)
|
||||||
|
endif
|
||||||
|
|
||||||
localver-auto = $(LOCALVERSION)$(_localver-auto)
|
localver-auto = $(LOCALVERSION)$(_localver-auto)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -1537,7 +1543,7 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
|
||||||
cmd_depmod = \
|
cmd_depmod = \
|
||||||
if [ -r System.map -a -x $(DEPMOD) ]; then \
|
if [ -r System.map -a -x $(DEPMOD) ]; then \
|
||||||
$(DEPMOD) -ae -F System.map \
|
$(DEPMOD) -ae -F System.map \
|
||||||
$(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) -r) \
|
$(if $(strip $(INSTALL_MOD_PATH)), -b $(INSTALL_MOD_PATH) ) \
|
||||||
$(KERNELRELEASE); \
|
$(KERNELRELEASE); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,10 @@ $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
|
||||||
rpm-pkg rpm: $(objtree)/kernel.spec FORCE
|
rpm-pkg rpm: $(objtree)/kernel.spec FORCE
|
||||||
$(MAKE) clean
|
$(MAKE) clean
|
||||||
$(PREV) ln -sf $(srctree) $(KERNELPATH)
|
$(PREV) ln -sf $(srctree) $(KERNELPATH)
|
||||||
|
$(CONFIG_SHELL) $(srctree)/scripts/setlocalversion > $(objtree)/.scmversion
|
||||||
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
|
$(PREV) tar -cz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/.
|
||||||
$(PREV) rm $(KERNELPATH)
|
$(PREV) rm $(KERNELPATH)
|
||||||
|
rm -f $(objtree)/.scmversion
|
||||||
set -e; \
|
set -e; \
|
||||||
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
|
$(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
|
||||||
set -e; \
|
set -e; \
|
||||||
|
|
|
@ -96,7 +96,7 @@ echo "%endif"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "%clean"
|
echo "%clean"
|
||||||
echo '#echo -rf $RPM_BUILD_ROOT'
|
echo 'rm -rf $RPM_BUILD_ROOT'
|
||||||
echo ""
|
echo ""
|
||||||
echo "%files"
|
echo "%files"
|
||||||
echo '%defattr (-, root, root)'
|
echo '%defattr (-, root, root)'
|
||||||
|
|
|
@ -206,7 +206,7 @@ static void done(void);
|
||||||
static void error(const char *);
|
static void error(const char *);
|
||||||
static int findsym(const char *);
|
static int findsym(const char *);
|
||||||
static void flushline(bool);
|
static void flushline(bool);
|
||||||
static Linetype getline(void);
|
static Linetype get_line(void);
|
||||||
static Linetype ifeval(const char **);
|
static Linetype ifeval(const char **);
|
||||||
static void ignoreoff(void);
|
static void ignoreoff(void);
|
||||||
static void ignoreon(void);
|
static void ignoreon(void);
|
||||||
|
@ -512,7 +512,7 @@ process(void)
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
linenum++;
|
linenum++;
|
||||||
lineval = getline();
|
lineval = get_line();
|
||||||
trans_table[ifstate[depth]][lineval]();
|
trans_table[ifstate[depth]][lineval]();
|
||||||
debug("process %s -> %s depth %d",
|
debug("process %s -> %s depth %d",
|
||||||
linetype_name[lineval],
|
linetype_name[lineval],
|
||||||
|
@ -526,7 +526,7 @@ process(void)
|
||||||
* help from skipcomment().
|
* help from skipcomment().
|
||||||
*/
|
*/
|
||||||
static Linetype
|
static Linetype
|
||||||
getline(void)
|
get_line(void)
|
||||||
{
|
{
|
||||||
const char *cp;
|
const char *cp;
|
||||||
int cursym;
|
int cursym;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче