Support install/uninstall make targets.

This commit is contained in:
steve 1999-05-09 01:24:59 +00:00
parent a3002adf9d
commit eb6646bbcc
2 changed files with 71 additions and 2 deletions

View File

@ -18,7 +18,7 @@
# 59 Temple Place - Suite 330
# Boston, MA 02111-1307, USA
#
#ident "$Id: Makefile.in,v 1.2 1999/04/26 02:45:08 steve Exp $"
#ident "$Id: Makefile.in,v 1.3 1999/05/09 01:24:59 steve Exp $"
#
#
SHELL = /bin/sh
@ -63,12 +63,41 @@ libvvm.a: $O
clean:
rm -f *.o dep/*.d
install: all installdirs
install: all installdirs $(libdir)/libvvm.a \
$(includedir)/vvm.h \
$(includedir)/vvm_calltf.h \
$(includedir)/vvm_func.h \
$(includedir)/vvm_gates.h \
$(includedir)/vvm_thread.h
$(libdir)/libvvm.a: ./libvvm.a
$(INSTALL_PROGRAM) ./libvvm.a $(libdir)/libvvm.a
$(includedir)/vvm.h: $(srcdir)/vvm.h
$(INSTALL_DATA) $(srcdir)/vvm.h $(includedir)/vvm.h
$(includedir)/vvm_calltf.h: $(srcdir)/vvm_calltf.h
$(INSTALL_DATA) $(srcdir)/vvm_calltf.h $(includedir)/vvm_calltf.h
$(includedir)/vvm_func.h: $(srcdir)/vvm_func.h
$(INSTALL_DATA) $(srcdir)/vvm_func.h $(includedir)/vvm_func.h
$(includedir)/vvm_gates.h: $(srcdir)/vvm_gates.h
$(INSTALL_DATA) $(srcdir)/vvm_gates.h $(includedir)/vvm_gates.h
$(includedir)/vvm_thread.h: $(srcdir)/vvm_thread.h
$(INSTALL_DATA) $(srcdir)/vvm_thread.h $(includedir)/vvm_thread.h
installdirs: mkinstalldirs
$(srcdir)/mkinstalldirs $(includedir) $(bindir)
uninstall:
rm -f $(libdir)/libvvm.a
rm -f $(includedir)/vvm.h
rm -f $(includedir)/vvm_calltf.h
rm -f $(includedir)/vvm_func.h
rm -f $(includedir)/vvm_gates.h
rm -f $(includedir)/vvm_thread.h
-include $(patsubst %.o, dep/%.d, $O)

40
vvm/mkinstalldirs Executable file
View File

@ -0,0 +1,40 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.1 1999/05/09 01:24:59 steve Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here