mirror of
https://github.com/proski/madwifi
synced 2024-11-25 07:49:43 +03:00
Treat svnversion.h as a real target, not a phony one
Allow Linux 2.6 build system to generate svnversion.h if it's missing. This is useful for Debian "Linux module extra" package build infrastructure. Original patch from Kel Modderman. git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3770 0192ed92-7a03-0410-a25b-9323aeb14dbd
This commit is contained in:
parent
4878463bdb
commit
9dec64f9a8
12
Makefile
12
Makefile
@ -43,9 +43,7 @@
|
||||
obj := $(firstword $(obj) $(SUBDIRS) .)
|
||||
TOP = $(obj)
|
||||
|
||||
ifneq (svnversion.h,$(MAKECMDGOALS))
|
||||
include $(TOP)/Makefile.inc
|
||||
endif
|
||||
|
||||
obj-y := ath/ ath_hal/ ath_rate/ net80211/
|
||||
|
||||
@ -57,7 +55,7 @@ endif
|
||||
all: modules tools
|
||||
|
||||
.PHONY: modules
|
||||
modules: configcheck svnversion.h
|
||||
modules: configcheck $(TOP)/svnversion.h
|
||||
ifdef LINUX24
|
||||
for i in $(obj-y); do \
|
||||
$(MAKE) -C $$i || exit 1; \
|
||||
@ -66,9 +64,11 @@ else
|
||||
$(MAKE) -C $(KERNELPATH) SUBDIRS=$(shell pwd) modules
|
||||
endif
|
||||
|
||||
.PHONY: svnversion.h
|
||||
svnversion.h:
|
||||
@if [ -d .svn ]; then \
|
||||
$(addprefix $(obj)/, $(obj-y:/=)): $(TOP)/svnversion.h
|
||||
|
||||
$(TOP)/svnversion.h:
|
||||
@cd $(TOP) && \
|
||||
if [ -d .svn ]; then \
|
||||
ver=$$(svnversion -nc . | sed -e 's/^[^:]*://;s/[A-Za-z]//'); \
|
||||
echo "#define SVNVERSION \"svn r$$ver\"" > $@.tmp; \
|
||||
elif [ -d .git ]; then \
|
||||
|
Loading…
Reference in New Issue
Block a user