1SHELL=/bin/sh
2
3# Makefile for WordNet 2.0 source code header files
4
5WN_ROOT = /usr/local/WordNet-2.0
6WN_INSTALLDIR = $(WN_ROOT)/include
7
8WN_FILES = license.h setutil.h wn.h wnconsts.h wnglobal.h wnhelp.h wnrtl.h wntypes.h
9
10all: $(WN_FILES)
11
12install: $(WN_FILES)
13	@if [ ! -d $(WN_INSTALLDIR) ] ; then \
14		echo "Making directory $(WN_INSTALLDIR)" ; \
15		mkdir -p $(WN_INSTALLDIR) ; \
16		chmod 755 $(WN_INSTALLDIR) ; \
17	fi ;
18	@for file in $(WN_FILES) ; \
19	 do \
20		filename=$(WN_INSTALLDIR)/$$file ; \
21		if [ -f $$filename ] ; then \
22			echo "Cannot install $$filename: file exists" ; \
23		else \
24			echo "Installing $$filename" ; \
25			cp -p $$file $$filename ; \
26		fi ; \
27	 done ;
28	@echo "Done installing include files in $(WN_INSTALLDIR)"
29
30uninstall:
31	@for file in $(WN_FILES) ; \
32	 do \
33		filename=$(WN_INSTALLDIR)/$$file ; \
34		if [ ! -f $$filename ] ; then \
35			echo "Cannot uninstall $$filename: not present" ; \
36		else \
37			echo "Uninstalling $$filename" ; \
38			rm -f $$filename ; \
39		fi ; \
40	 done ;
41	@echo "Done uninstalling include files from $(WN_INSTALLDIR)"
42
43clean:
44	@rm -f *~ "#"*
45
46distclean: clean uninstall
47