Browse Source

- added tools version in INSTALL (e.g. gmake >=3.79)
- fixed test -e to test -f in Makefile (install-cfg)
- INSTALL, TAR, BASEDIR are now setable in the environment
(also PREFIX, LOCALBASE, CC, LEX, YACC)

Andrei Pelinescu-Onciul 23 years ago
parent
commit
5b9b8d2e98
3 changed files with 12 additions and 7 deletions
  1. 1 1
      INSTALL
  2. 1 1
      Makefile
  3. 10 5
      Makefile.defs

+ 1 - 1
INSTALL

@@ -55,7 +55,7 @@ Requirements:
 - bison or yacc (Berkley yacc)
 - flex
 - GNU make (on Linux this is the standard "make", on FreeBSD and Solaris is
- called "gmake")
+ called "gmake") version >= 3.79.
 - sed and tr (used in the makefiles)
 - GNU tar ("gtar" on Solaris) and gzip if you want "make tar" to work
 - GNU install or BSD install (on Solaris "ginstall") if you want "make

+ 1 - 1
Makefile

@@ -170,7 +170,7 @@ install-cfg: $(cfg-prefix)/$(cfg-dir)
 		sed -e "s#/usr/lib/ser/modules/#$(modules-target)#g" \
 			< etc/ser.cfg > $(cfg-prefix)/$(cfg-dir)ser.cfg.default
 		chmod 644 $(cfg-prefix)/$(cfg-dir)ser.cfg.default
-		if [ ! -e $(cfg-prefix)/$(cfg-dir)ser.cfg ]; then \
+		if [ ! -f $(cfg-prefix)/$(cfg-dir)ser.cfg ]; then \
 			cp -p $(cfg-prefix)/$(cfg-dir)ser.cfg.default \
 				$(cfg-prefix)/$(cfg-dir)ser.cfg; \
 		fi

+ 10 - 5
Makefile.defs

@@ -2,6 +2,9 @@
 #
 # makefile defs (CC, LD,a.s.o)
 #
+# Environment variables:
+#   PREFIX, LOCALBASE, BASEDIR
+#   INSTALL, TAR , CC, LEX, YACC
 #
 # History:
 # --------
@@ -34,7 +37,9 @@ prefix = $(PREFIX)
 #  creating a bin. archive in /tmp, which unpacks in /usr/local
 #  basedir=/tmp
 #  prefix=/usr/local
-basedir = 
+
+BASEDIR ?=
+basedir = $(BASEDIR)
 # install prefixes for various stuff
 cfg-prefix = $(basedir)$(prefix)
 bin-prefix = $(basedir)$(prefix)
@@ -67,11 +72,11 @@ modules-target = $(prefix)/$(modules-dir)
 
 ifeq ($(OS), solaris)
 #use GNU versions
-INSTALL = ginstall
-TAR = gtar
+INSTALL ?= ginstall
+TAR ?= gtar
 else
-INSTALL = install 
-TAR= tar
+INSTALL ?= install 
+TAR ?= tar
 endif
 
 # INSTALL-CFG = $(INSTALL) -m 644