Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -1,12 +1,24 @@ -all: client/teapot-client.kit +include Makefile.defs +TCLKIT = tclkit +TCLCONFIGPATH = $(DESTDIR)/$(prefix)/lib $(DESTDIR)/$(prefix)/lib64 $(DESTDIR)/usr/lib $(DESTDIR)/usr/lib64 $(DESTDIR)/usr/local/lib $(DESTDIR)/usr/local/lib64 +TEAPOTCLIENTVERS = 0.1 +TCLDIR = +PREFIX = /usr/local +prefix = $(PREFIX) + +all: + make -C client all client/teapot-client.kit: - make -C client teapot-client.kit + make -C client teapot-client.kit TCLKIT="$(TCLKIT)" TCLCONFIGPATH="$(TCLCONFIGPATH)" TEAPOTCLIENTVERS="$(TEAPOTCLIENTVERS)" TCLDIR="$(TCLDIR)" PREFIX="$(PREFIX)" prefix="$(prefix)" + +install: + make -C client install TCLKIT="$(TCLKIT)" TCLCONFIGPATH="$(TCLCONFIGPATH)" TEAPOTCLIENTVERS="$(TEAPOTCLIENTVERS)" TCLDIR="$(TCLDIR)" PREFIX="$(PREFIX)" prefix="$(prefix)" clean: make -C client clean distclean: make -C client distclean -.PHONY: all clean distclean +.PHONY: all install clean distclean ADDED Makefile.defs Index: Makefile.defs ================================================================== --- /dev/null +++ Makefile.defs @@ -0,0 +1,6 @@ +TCLKIT = tclkit +TCLCONFIGPATH = $(DESTDIR)/$(prefix)/lib $(DESTDIR)/$(prefix)/lib64 $(DESTDIR)/usr/lib $(DESTDIR)/usr/lib64 $(DESTDIR)/usr/local/lib $(DESTDIR)/usr/local/lib64 +TEAPOTCLIENTVERS = 0.1 +TCLDIR = +PREFIX = /usr/local +prefix = $(PREFIX) Index: README.txt ================================================================== --- README.txt +++ README.txt @@ -19,10 +19,16 @@ but no "lib" or similar directory) c. If you wish to install into an alternate root directory (i.e., for packaging), execute: # make install DESTDIR=your_new_rootdir This will search for a "tclConfig.sh" in the destination directory. + d. If you wish to install into an alternate prefix (default is + "/usr/local"), execute: + # make install PREFIX=your_new_prefix + (note that this only affects the search path and where the + "teapot-client" script is installed, not where the package goes + directly) Note that the install directory is not encoded in the script in any way so it can be safely moved after installation. 2. Using Index: client/Makefile ================================================================== --- client/Makefile +++ client/Makefile @@ -1,11 +1,6 @@ -TCLKIT = tclkit -TCLCONFIGPATH = $(DESTDIR)/$(prefix)/lib $(DESTDIR)/$(prefix)/lib64 $(DESTDIR)/usr/lib $(DESTDIR)/usr/lib64 $(DESTDIR)/usr/local/lib $(DESTDIR)/usr/local/lib64 -TEAPOTCLIENTVERS = 0.1 -TCLDIR = -PREFIX = /usr/local -prefix = $(PREFIX) +include ../Makefile.defs all: @echo 'Nothing to do.' install: