revert between 56095 -> 55830 in arch
[AROS.git] / workbench / devs / networks / atheros5000 / hal / makefile
blob7beab05c6ef6fae02cb39fc1cf152506029ccf48
2 # Copyright (c) 2002-2008 Sam Leffler, Errno Consulting
3 # Copyright (c) 2002-2008 Atheros Communications, Inc.
5 # Permission to use, copy, modify, and/or distribute this software for any
6 # purpose with or without fee is hereby granted, provided that the above
7 # copyright notice and this permission notice appear in all copies.
9 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 # $Id$
20 nop:
23 # Release-related support.
25 FILES= COPYRIGHT README \
26 ah.h ah_desc.h ah_devid.h ah_soc.h version.h \
27 public/[a-z]*.inc public/*.hal.o.uu public/*.opt_ah.h \
28 public/wackelf.c \
29 ${NULL}
31 # Tag the tree and build a release tarball suitable for open
32 # distribution (e.g. to sourceforge). The tag is date-based.
34 release:
35 DATE=`date +'%Y%m%d'`; TAG="ATH_HAL_$${DATE}"; \
36 cvs tag -F $${TAG} ${FILES} && make rerelease TAG=$${TAG}
39 # Rebuild a release tarball using an existing tag.
41 rerelease:
42 if [ -z "${TAG}" ]; then \
43 echo "You must specify a TAG to do a re-release"; \
44 exit 1; \
45 fi; \
46 expr "${TAG}" : '^ATH_HAL_' || { \
47 echo "TAG must be of the form ATH_HAL_YYYYMMDD"; \
48 exit 1; \
49 }; \
50 DATE=`echo "${TAG}" | sed 's/^ATH_HAL_//'`; \
51 DIR="ath_hal-$${DATE}"; \
52 rm -rf $${DIR}; \
53 mkdir $${DIR} && \
54 cvs export -d $${DIR} -r ${TAG} hal && \
55 tar zcf $${DIR}.tgz --exclude=CVS $${DIR} && \
56 rm -rf $${DIR}
59 # Build a release-like tarball suitable for open distribution
60 # using the current contents of the local directory. This is
61 # useful for distributing private changes that are not committed
62 # to cvs. Note that this should not be used to construct
63 # distributions as there is no cvs history or tag to use in
64 # tracking issues.
66 tarball:
67 DATE=`date +'%Y%m%d'`; DIR="ath_hal-$${DATE}"; \
68 ln -s . $${DIR}; \
69 TARFILES=`for i in ${FILES}; do echo $${DIR}/$$i; done`; \
70 tar zcf $${DIR}.tgz --exclude=CVS $${TARFILES}; \
71 rm -f $${DIR};
74 # Build a source distribution. Be sure to
75 # first tag the source files using src_tag then follow this with
76 # src_release to construct the tarball. Tags and filenames are
77 # constructed from the contents of version.h (as opposed to the
78 # current date) so be sure this file is up to date prior to rolling
79 # a release. Note that a source release does NOT include the
80 # pre-built binary hal files; it is assumed the recipient can/will
81 # do this themselves.
84 # tag the source code according to the current version
85 src_tag:
86 TAG=`awk '/ATH_HAL_VERSION/ \
87 { gsub("\\"","",$$3); \
88 gsub("[-.]", "_", $$3); print "v" $$3; }' version.h`; \
89 cvs tag ${TAGOPTS} $${TAG}; \
90 cvs tag -d $${TAG} */*.uu */*opt_ah.h
91 # create a tarball of the source for the current tagged version
92 src_release:
93 TAG=`awk '/ATH_HAL_VERSION/ \
94 { gsub("\\"","",$$3); \
95 gsub("[-.]", "_", $$3); print "v" $$3; }' version.h`; \
96 DIR=`awk '/ATH_HAL_VERSION/ \
97 { gsub("\\"","",$$3); print "hal-" $$3; }' version.h`; \
98 rm -rf $${DIR}; mkdir $${DIR}; \
99 cvs export -d $${DIR} -r $${TAG} hal; \
100 tar zcf $${DIR}.tgz --exclude=CVS $${DIR}; \
101 rm -rf $${DIR};