summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-16 03:09:42 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-16 03:09:42 +0000
commit0a0485ae2b8e33fc7ee30032e8d030b5fdc304e4 (patch)
tree85352eb6d5240440627c1f2aa24d95ee7688c0e2 /Makefile
parentf009b2be9fd50c90ad36fea9a2a1997f6ed1e232 (diff)
downloadATCD-0a0485ae2b8e33fc7ee30032e8d030b5fdc304e4.tar.gz
(release): automatically update ace/Version.h based on contents of VERSION
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a0641d852d1..57164277592 100644
--- a/Makefile
+++ b/Makefile
@@ -86,7 +86,8 @@ RELEASE_LIB_FILES = \
#### If creating the "official" ACE release:
#### 1) Check that the workspace is up-to-date, and bail out if not.
#### 2) Update the timestamp in the VERSION file.
-#### 3) Add a ChangeLog entry to the ChangeLog plain file.
+#### 3) Update ace/Version.h
+#### 4) Add a ChangeLog entry to the ChangeLog plain file.
#### Detect if we are creating the "official" release by looking at the PWD.
#### To disable this feature, add "TIMESTAMP=" to the make command line.
#### NOTE: if the version number in the VERSION file contains three components,
@@ -118,8 +119,17 @@ ifeq ($(shell pwd),/project/adaptive/ACE_wrappers)
while (<>) { \
if ( ! $$message_printed++ ) { print "$$message\n"; } \
print; } ' $$CHANGELOG; \
- cvs commit -m"$$ACE_VERSION" VERSION $$CHANGELOG; \
- chmod 644 VERSION $$CHANGELOG) &&
+ echo $$ACE_VERSION | perl -ne ' \
+ ($$version = $$_) =~ s/ACE version ([\d\.]+).*\n/$$1/; \
+ ($$major, $$minor, $$beta) = split /\./, $$version; \
+ print "// \$$Id\$$\n" . \
+ "// This is an automatically generated file.\n\n" . \
+ "\#define ACE_MAJOR_VERSION ($${major}u)\n" . \
+ "\#define ACE_MINOR_VERSION ($${minor}u)\n" . \
+ "\#define ACE_BETA_VERSION ($${beta}u)\n";' > \
+ ace/Version.h; \
+ chmod 644 VERSION $$CHANGELOG ace/Version.h; \
+ echo cvs commit -m"$$ACE_VERSION" VERSION $$CHANGELOG ace/Version.h) &&
else
TIMESTAMP =
endif
@@ -141,4 +151,3 @@ release:
find $(RELEASE_LIB_FILES) $(FILTER) | cpio -o -H tar | gzip -9 > ACE-lib.tar.gz; \
chmod a+r ACE.tar.gz ACE-lib.tar.gz; \
mv ACE.tar.gz ACE-lib.tar.gz ./ACE_wrappers/)
-