Changeset 9723


Ignore:
Timestamp:
2007-12-13T07:25:54+01:00 (8 years ago)
Author:
nbd
Message:

clean up openwrt version handling, use a separate script that is executed at the beginning of the build process, fix revision checking with git

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/toplevel.mk

    r9655 r9723  
    88 
    99RELEASE:=Kamikaze 
    10 #VERSION:=2.0 # uncomment for final release 
     10SHELL:=/usr/bin/env bash 
     11PREP_MK= OPENWRT_BUILD= QUIET=0 
    1112 
    12 SHELL:=/usr/bin/env bash 
    13 OPENWRTVERSION:=$(RELEASE) 
    14 PREP_MK= OPENWRT_BUILD= QUIET=0 
    1513include $(TOPDIR)/include/verbose.mk 
    16 ifneq ($(VERSION),) 
    17   OPENWRTVERSION:=$(VERSION) ($(OPENWRTVERSION)) 
    18 else 
    19   REV:=$(if $(wildcard .svn/entries),$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' )) 
    20   ifneq ($(REV),) 
    21     OPENWRTVERSION:=$(OPENWRTVERSION)/r$(REV) 
    22   endif 
    23 endif 
     14 
     15REVISION:=$(shell $(TOPDIR)/scripts/getver.sh) 
     16OPENWRTVERSION:=$(RELEASE)$(if $(REVISION), ($(REVISION))) 
     17export RELEASE 
     18export REVISION 
    2419export OPENWRTVERSION 
    2520export IS_TTY=$(shell tty -s && echo 1 || echo 0) 
  • trunk/package/base-files/Makefile

    r9083 r9723  
    1515PKG_FILE_DEPEND:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ 
    1616 
    17 REV:=$(shell LANG=C svn info | awk '/^Revision:/ { print$$2 }' ) 
    18 ifeq ($(REV),) 
    19   REV:=0 
    20 endif 
    2117include $(INCLUDE_DIR)/package.mk 
    2218 
    2319ifneq ($(DUMP),1) 
    24   TARGET:=-$(BOARD)-$(KERNEL) 
     20  TARGET:=-$(BOARD) 
    2521  LIBGCC_VERSION:=$(GCC_VERSION) 
    2622else 
     
    3632  TITLE:=Base filesystem for OpenWrt 
    3733  URL:=http://openwrt.org/ 
    38   VERSION:=$(PKG_RELEASE)-$(REV) 
     34  VERSION:=$(PKG_RELEASE)-$(REVISION) 
    3935  $(call Config,network.lan.proto,string,static,LAN Protocol) 
    4036  $(call Config,network.lan.ipaddr,ip,192.168.1.1,LAN IP Address) 
     
    139135                fi \ 
    140136        ) 
    141         $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner 
     137        $(SED) 's,$$$$R,r$(REVISION),g' $(1)/etc/banner 
    142138        $(SED) 's,$$$$S,$(BOARD),g' -e 's,$$$$A,$(ARCH),g' $(1)/etc/ipkg.conf 
    143139        mkdir -p $(1)/dev 
Note: See TracChangeset for help on using the changeset viewer.