Added base/tools scripts functionality to base/Makefile, removed scripts

Moved base/tools/MakeRelease to base dir.
This commit is contained in:
Janet B. Anderson
1995-08-17 20:15:03 +00:00
parent b9a5acc88c
commit 300f38584b
4 changed files with 178 additions and 27 deletions

125
MakeRelease Executable file
View File

@@ -0,0 +1,125 @@
#!/bin/sh
#
# $Id$
#
# Make Release - Creates an EPICS release
# By Matthew Needes and Bob Zieman
#
# MakeRelease [-b]
#
# [-b] - For fully built release
#
# $Log$
# Revision 1.14 1994/12/19 18:42:08 tang
# Make the args length compatible for HP and SUN.
#
# Revision 1.13 1994/12/15 19:19:18 tang
# Replace -I opt by cat and xargs for tar for HP compatibility.
#
# Revision 1.12 1994/12/14 23:57:55 tang
# Take out \< and \> pair for hp compatible
#
# Revision 1.11 1994/10/31 21:44:17 jba
# Moved print stmnt, added cd $(EPICS)
#
# Revision 1.10 1994/10/05 18:29:34 jba
# Renamed version.h to epicsVersion.h
#
# Revision 1.9 1994/09/22 01:41:47 mcn
# MakeRelease - MAJOR bug fix. GetVar / MakeDirs - minor fix.
#
# Revision 1.8 1994/09/07 20:59:15 mcn
# Revamped GetVar, modified scripts for new GetVar.
#
# Revision 1.7 1994/09/02 20:58:00 mcn
# minor change.
#
# Revision 1.6 1994/08/21 00:56:41 mcn
# New Stuff
#
# Revision 1.5 1994/08/02 18:36:29 mcn
# Support new configuration.
#
# Revision 1.4 1994/07/14 22:13:32 mcn
# Now include SDR Makefile/Headers
#
#
EPICS=${1};
if [ ! -d include -o ! -d src ]; then
echo "Cannot find src or include, are you at the top of EPICS base ?"
exit 1
fi
cd $EPICS/base
FULLY_BUILT=NO
if [ "${2}" = "-b" ]; then
FULLY_BUILT=YES
shift
fi
# Retrieve EPICS release string from include/epicsVersion.h
grep EPICS_VERSION_STRING include/epicsVersion.h > /dev/null 2>&1 || ERR=1;
if [ "$ERR" = "1" ];
then
echo "TOP: Cannot retrieve release number from include/epicsVersion.h";
exit 1;
fi
RELS=`grep "EPICS_VERSION_STRING" include/epicsVersion.h \
| sed -e 's-.*Version--' \
-e 's-[ ][ ]*--g' \
-e 's-".*--' \
-e 's-\.0$--'`;
if [ -z "${RELS}" ];
then
echo "TOP: Cannot retrieve release number from include/epicsVersion.h";
exit 1;
fi
RELS="R${RELS}";
echo TOP: Creating ../${RELS}.Tar;
if [ -f ${RELS}.Tar* ];
then
echo "TOP: This release has already been created.";
echo "TOP: Remove Tar file or edit include/epicsVersion.h.";
exit 1;
fi
# Create list of files and dirs to include in Tar file
cd $EPICS
ls base/README* | xargs tar cvf ${RELS}.Tar
ls base/Makefile* > /tmp/make_release.out.$$;
find config base/include base/man base/tools -name CVS -prune -o \
! -type d -print >> /tmp/make_release.out.$$;
# binary / library / default.dctsdr / <rec>Record.h / etc.
if [ $FULLY_BUILT = "YES" ];
then
find base/bin -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
find base/lib -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
find base/rec -name CVS -prune -o ! -type d -print \
>> /tmp/make_release.out.$$;
fi
find base/src -name CVS -prune -o -name SCCS -prune -o ! -type d -print \
| grep -v '/O\..*$' >> /tmp/make_release.out.$$
cat /tmp/make_release.out.$$ | xargs tar rvf ${RELS}.Tar
rm /tmp/make_release.out.$$

View File

@@ -12,6 +12,9 @@
# install because the release.% syntax is illegal.
#
# $Log$
# Revision 1.23 1995/02/13 15:00:09 jba
# Changed include file from CONFIG_SITE to CONFIG
#
# Revision 1.22 1994/11/14 23:12:17 tang
# Replace ARCH_TYPE with .
#
@@ -74,21 +77,27 @@ depends:
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
clean:
@(for ARCH in ${BUILD_ARCHS}; \
do \
ARCH_TYPE=$$ARCH \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
uninstall:
@(for ARCH in ${BUILD_ARCHS}; \
do \
ARCH_TYPE=$$ARCH \
${MAKE} ${MFLAGS} $@.$$ARCH; \
done)
release:
@echo TOP: Creating Release...
@tools/MakeRelease
@./MakeRelease ${EPICS}
built_release: install
@echo TOP: Creating Fully Built Release...
@tools/MakeRelease -b
clean:
@echo "TOP: Cleaning"
@tools/Clean
uninstall:
rm -rf bin/* lib/* rec.bak
rm -f rec/default.dctsdr rec/default.sdrSum rec/*.h
@./MakeRelease ${EPICS} -b
# Notes for single architecture build rules:
# CheckArch only has to be run for dirs.% . That
@@ -107,20 +116,15 @@ uninstall:
# some things may be included on a per architecture
# basis.
dirs.%:
@tools/CheckArch $*
@echo $*: Creating Directories
@tools/MakeDirs $*
build.%: dirs.%
build.%:
@echo $*: Building
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs build
install.%: dirs.%
install.%:
@echo $*: Installing
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs install
depends.%: dirs.%
depends.%:
@echo $*: Performing Make Depends
@${MAKE} ${MFLAGS} T_A=$* -f Makefile.subdirs depends
@@ -133,11 +137,10 @@ release.%:
@echo
uninstall.%:
@echo
@echo "The uninstall.arch syntax is not supported by this build."
@echo
@echo "TOP: Uninstalling $* "
@rm -rf ./bin/$* ./lib/$* rec.bak rec
clean.%:
@echo "$*: Cleaning"
@tools/Clean $*
@echo "TOP: Cleaning $* "
@find src -type d -name "O.$*" -prune -exec rm -rf {} \;

View File

@@ -5,6 +5,9 @@
# by Matthew Needes and Mike Bordua
#
# $Log$
# Revision 1.13 1994/09/09 17:32:29 jba
# Cleanup of files
#
# Revision 1.12 1994/09/08 17:25:41 mcn
# Changed clean to tools/Clean. Added "uninstall" dependency.
#
@@ -27,7 +30,7 @@ include $(EPICS)/config/CONFIG_BASE
all: build
build:
build: dirs
@(for DIR in ${DIRS}; \
do \
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
@@ -35,7 +38,7 @@ build:
cd $$TMP; \
done)
install:
install: dirs
@(for DIR in ${DIRS}; \
do \
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
@@ -43,7 +46,7 @@ install:
cd $$TMP; \
done)
depends:
depends: dirs
@(for DIR in ${DIRS}; \
do \
TMP=`pwd`; echo "${T_A}: $@: $$DIR"; \
@@ -51,3 +54,23 @@ depends:
cd $$TMP; \
done)
dirs:
@echo ${T_A}: Creating Directories
@for DIR in ${DIRS}; \
do \
TMP=`pwd`; \
cd $$DIR ; \
if [ -f Makefile.${BUILD_TYPE} ] ; then \
test -d O.${T_A} || \
mkdir O.${T_A}; \
test -f O.${T_A}/Makefile || \
ln -s ../Makefile.${BUILD_TYPE} O.${T_A}/Makefile \
> /dev/null 2> /dev/null; \
test -f O.${T_A}/Target.include || \
echo "T_A=${T_A}" > O.${T_A}/Target.include; \
test -f O.${T_A}/.DEPENDS || \
touch O.${T_A}/.DEPENDS; \
fi ; \
cd $$TMP; \
done

2
README
View File

@@ -74,7 +74,7 @@ gmake
be complete before this can be issued).
NOTES:
1. tools/MakeRelease will create tar files in the directory ABOVE
1. base/MakeRelease will create tar files in the directory ABOVE
base. These tar files are then meant to be untarred at that level.
This release will include the "epics/config" directory.