[eggheads-patches] PATCH: more-misc-fixes.diff

Tothwolf tothwolf at concentric.net
Sat Oct 16 11:29:45 CST 1999


more-misc-fixes.diff:
  Fixed 'make install' rebuilding $(EGGEXEC)
  Moved version checking of src/main.c from Makefile to configure
  $(LN_S) works in a sane way for older systems now
  Replaced src/md5/Makefile with src/md5/Makefile.in
  Use changequote() in configure.in to deal with [] in awk statements
  use $(top_srcdir) in doofus: redirect in Makefile.in files

-Toth
-------------- next part --------------
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/Makefile.in ./Makefile.in
--- ../eggdrop1.3.misc-fixes/Makefile.in	Fri Oct 15 17:14:25 1999
+++ ./Makefile.in	Sat Oct 16 00:04:00 1999
@@ -8,8 +8,7 @@
 prefix = @prefix@
 DEST = @DEST@
 EGGEXEC = @EGGEXEC@
-
-NEWVERSION = `grep 'char egg_version' src/main.c | @AWK@ '{gsub(/(\"|\;)/, "", $$4); print $$4}'`
+EGGVERSION = @EGGVERSION@
 
 # things you can put here:
 #   -Wall            if you're using gcc and it supports it (configure
@@ -94,7 +93,7 @@
 	@cd src/mod; $(MAKE) clean
 
 distclean: clean
-	@rm -f Makefile doc/Makefile scripts/Makefile src/Makefile src/mod/Makefile
+	@rm -f Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile
 	@rm -f config.cache config.log config.status config.h lush.h
 
 distrib: distclean Makefile.in
@@ -183,7 +182,7 @@
 	fi
 	@echo "stamp" >EGGMOD.stamp
 
-install: @DEFAULT_MAKE@ ainstall
+install: ainstall
 
 dinstall: eggdrop ainstall
 
@@ -194,14 +193,14 @@
 	install-scripts install-end
 
 install-start:
-	@if test "x$(DEST)" = "x"; then \
-		echo "You must specify a destination directory with DEST="; \
-		exit 1; \
-	fi
 	@if test ! -f $(EGGEXEC); then \
 		echo "You haven't compiled eggdrop yet."; \
 		exit 1; \
 	fi
+	@if test "x$(DEST)" = "x"; then \
+		echo "You must specify a destination directory with DEST="; \
+		exit 1; \
+	fi
 	@echo ""
 	@./$(EGGEXEC) -v
 	@echo
@@ -225,8 +224,8 @@
 		mv -f $(DEST)/$(EGGEXEC) $(DEST)/o$(EGGEXEC); \
 	fi
 	@echo "Copying new '$(EGGEXEC)' executable and creating symlink."
-	@$(INSTALL_PROGRAM) $(EGGEXEC) $(DEST)/$(EGGEXEC)-$(NEWVERSION)
-	@$(LN_S) $(EGGEXEC)-$(NEWVERSION) $(DEST)/$(EGGEXEC)
+	@$(INSTALL_PROGRAM) $(EGGEXEC) $(DEST)/$(EGGEXEC)-$(EGGVERSION)
+	@(cd $(DEST) && $(LN_S) $(EGGEXEC)-$(EGGVERSION) $(EGGEXEC))
 
 install-modules:
 	@if test -h $(DEST)/modules; then \
@@ -239,14 +238,14 @@
 		mv -f $(DEST)/modules $(DEST)/modules.old; \
 	fi
 	@if test ! "x`echo *.so`" = "x*.so"; then \
-		if test ! -d $(DEST)/modules-$(NEWVERSION); then \
-			echo "Creating modules-$(NEWVERSION) directory and symlink."; \
-			$(INSTALL) -d $(DEST)/modules-$(NEWVERSION); \
+		if test ! -d $(DEST)/modules-$(EGGVERSION); then \
+			echo "Creating modules-$(EGGVERSION) directory and symlink."; \
+			$(INSTALL) -d $(DEST)/modules-$(EGGVERSION); \
 		fi; \
-		$(LN_S) modules-$(NEWVERSION) $(DEST)/modules; \
+		(cd $(DEST) && $(LN_S) modules-$(EGGVERSION) modules); \
 		echo "Copying new modules."; \
 		for i in *.so; do \
-			$(INSTALL_PROGRAM) $$i $(DEST)/modules-$(NEWVERSION)/; \
+			$(INSTALL_PROGRAM) $$i $(DEST)/modules-$(EGGVERSION)/; \
 		done; \
 	fi
 
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/configure ./configure
--- ../eggdrop1.3.misc-fixes/configure	Sat Oct 16 00:01:41 1999
+++ ./configure	Fri Oct 15 23:39:32 1999
@@ -3234,6 +3234,8 @@
   fi
 fi
 
+EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
+
 if test "x$DEST" = "x"
 then
   DEST=\${prefix}
@@ -3249,6 +3251,7 @@
 
 
 
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -3350,7 +3353,7 @@
 ac_given_srcdir=$srcdir
 ac_given_INSTALL="$INSTALL"
 
-trap 'rm -fr `echo "Makefile doc/Makefile scripts/Makefile src/Makefile src/mod/Makefile lush.h config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
 EOF
 cat >> $CONFIG_STATUS <<EOF
 
@@ -3411,6 +3414,7 @@
 s%@SHLIB_STRIP@%$SHLIB_STRIP%g
 s%@DEFAULT_MAKE@%$DEFAULT_MAKE%g
 s%@EGGEXEC@%$EGGEXEC%g
+s%@EGGVERSION@%$EGGVERSION%g
 
 CEOF
 EOF
@@ -3452,7 +3456,7 @@
 
 cat >> $CONFIG_STATUS <<EOF
 
-CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile scripts/Makefile src/Makefile src/mod/Makefile lush.h"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/configure.in ./configure.in
--- ../eggdrop1.3.misc-fixes/configure.in	Sat Oct 16 00:01:42 1999
+++ ./configure.in	Fri Oct 15 23:38:30 1999
@@ -440,7 +440,9 @@
   then
     TCLLIB=`$DIRNAME $tcllibname`
     TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
-    TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[[j]]}'`"
+changequote(,)dnl
+    TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[j]}'`"
+changequote([, ])dnl
     TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
   else
     cat << EOF >&2
@@ -673,13 +675,17 @@
     fi
 
     # are we using a pre 7.5 Tcl version ?
-    OLD_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if (((i[[1]] == 7) && (i[[2]] >= 5)) || (i[[1]] >= 8)) print "no"; else print "yes"}'`
+changequote(,)dnl
+    OLD_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] >= 5)) || (i[1] >= 8)) print "no"; else print "yes"}'`
+changequote([, ])dnl
     if test "x${OLD_TCL}" = "xyes"
     then
       AC_DEFINE(HAVE_OLD_TCL)
     else
       # detect buggy Tcl 8.1 compiled with threads
-      BUGGY_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if ((i[[1]] == 8) && (i[[2]] == 1)) print "yes"; else print "no"}'`
+changequote(,)dnl
+      BUGGY_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if ((i[1] == 8) && (i[2] == 1)) print "yes"; else print "no"}'`
+changequote([, ])dnl
       if test "x${BUGGY_TCL}" = "xyes"
       then
 	AC_MSG_CHECKING(for buggy Tcl 8.1 threads)
@@ -720,7 +726,9 @@
       fi
 
       # are we using a pre 7.4 Tcl version ?
-      VERYOLDTCL=`echo $TCLVER | $AWK '{split($1, i, "."); print ((i[[1]] <= 7) && (i[[2]] <= 3)) ? "yes" : "no"}'`
+changequote(,)dnl
+      VERYOLDTCL=`echo $TCLVER | $AWK '{split($1, i, "."); print ((i[1] <= 7) && (i[2] <= 3)) ? "yes" : "no"}'`
+changequote([, ])dnl
       if test "x${VERYOLDTCL}" = "xno"
       then
 	# was the --with-tcllib option given ?
@@ -814,6 +822,8 @@
   fi
 fi
 
+EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
+
 if test "x$DEST" = "x"
 then
   DEST=\${prefix}
@@ -829,7 +839,8 @@
 AC_SUBST(SHLIB_STRIP)
 AC_SUBST(DEFAULT_MAKE)
 AC_SUBST(EGGEXEC)
-AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/mod/Makefile lush.h)
+AC_SUBST(EGGVERSION)
+AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)
 
 AC_MSG_RESULT()
 AC_MSG_RESULT(Configure is done.)
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/doc/Makefile.in ./doc/Makefile.in
--- ../eggdrop1.3.misc-fixes/doc/Makefile.in	Fri Oct 15 17:22:29 1999
+++ ./doc/Makefile.in	Fri Oct 15 22:03:04 1999
@@ -1,5 +1,7 @@
 # Makefile for doc/
 
+top_srcdir = @top_srcdir@
+ at SET_MAKE@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
@@ -11,6 +13,12 @@
 	tcl-commands.doc tricks
 
 MAN1 = man1/eggdrop.1
+
+doofus:
+	@echo ""
+	@echo "Let's try this from the right directory..."
+	@echo ""
+	@cd $(top_srcdir); $(MAKE)
 
 all: $(DOCS) $(MAN1)
 
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/scripts/Makefile.in ./scripts/Makefile.in
--- ../eggdrop1.3.misc-fixes/scripts/Makefile.in	Fri Oct 15 17:22:29 1999
+++ ./scripts/Makefile.in	Fri Oct 15 22:00:20 1999
@@ -1,5 +1,7 @@
 # Makefile for scripts/
 
+top_srcdir = @top_srcdir@
+ at SET_MAKE@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
@@ -9,6 +11,12 @@
 	klined.tcl notes2.tcl ques5.tcl sentinel1.54.tcl userinfo1.0.tcl
 
 EXESCRIPTS = autobotchk botchk weed
+
+doofus:
+	@echo ""
+	@echo "Let's try this from the right directory..."
+	@echo ""
+	@cd $(top_srcdir); $(MAKE)
 
 all: $(SCRIPTS) $(EXESCRIPTS)
 
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/src/Makefile.in ./src/Makefile.in
--- ../eggdrop1.3.misc-fixes/src/Makefile.in	Fri Oct 15 17:22:30 1999
+++ ./src/Makefile.in	Fri Oct 15 23:04:05 1999
@@ -1,5 +1,7 @@
 # Makefile for src/
 
+top_srcdir = @top_srcdir@
+ at SET_MAKE@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
@@ -14,7 +16,7 @@
 	@echo ""
 	@echo "Let's try this from the right directory..."
 	@echo ""
-	@cd ../; make
+	@cd $(top_srcdir); $(MAKE)
 
 modegg: $(OBJS) $(XREQ)
 	@echo ""
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/src/md5/Makefile ./src/md5/Makefile
--- ../eggdrop1.3.misc-fixes/src/md5/Makefile	Fri Oct 15 11:23:24 1999
+++ ./src/md5/Makefile	Wed Dec 31 18:00:00 1969
@@ -1,25 +0,0 @@
-# Makefile for src/md5/
-
-OBJS = md5c.o
-HDRS = global.h md5.h
-
-doofus:
-	@echo ""
-	@echo "Let's try this from the right directory..."
-	@echo ""
-	@cd ../..; make
-
-clean:
-	@rm -f *.o *~
-
-$(OBJS): $(HDRS)
-
-md5: $(OBJS)
-
-.SUFFIXES:
-.SUFFIXES: .c .o .h
-
-.c.o:
-	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
-
-#safety hash
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/src/md5/Makefile.in ./src/md5/Makefile.in
--- ../eggdrop1.3.misc-fixes/src/md5/Makefile.in	Wed Dec 31 18:00:00 1969
+++ ./src/md5/Makefile.in	Fri Oct 15 22:42:56 1999
@@ -0,0 +1,32 @@
+# Makefile for src/md5/
+
+top_srcdir = @top_srcdir@
+ at SET_MAKE@
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+
+OBJS = md5c.o
+HDRS = global.h md5.h
+
+doofus:
+	@echo ""
+	@echo "Let's try this from the right directory..."
+	@echo ""
+	@cd $(top_srcdir); $(MAKE)
+
+clean:
+	@rm -f *.o *~
+
+$(OBJS): $(HDRS)
+
+md5: $(OBJS)
+
+.SUFFIXES:
+.SUFFIXES: .c .o .h
+
+.c.o:
+	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
+
+#safety hash
diff -urNPX ../exclude ../eggdrop1.3.misc-fixes/src/mod/Makefile.in ./src/mod/Makefile.in
--- ../eggdrop1.3.misc-fixes/src/mod/Makefile.in	Fri Oct 15 17:22:30 1999
+++ ./src/mod/Makefile.in	Fri Oct 15 22:00:29 1999
@@ -1,5 +1,7 @@
 # Makefile for src/mod/
 
+top_srcdir = @top_srcdir@
+ at SET_MAKE@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
@@ -12,7 +14,7 @@
 	@echo ""
 	@echo "Let's try this from the right directory..."
 	@echo ""
-	@cd ../..; make
+	@cd $(top_srcdir); $(MAKE)
 
 clean:
 	@rm -f *.o *~ static.h


More information about the Patches mailing list