Просмотр исходного кода

* Fixed make dependancies problems

svn: 324
Bryan Drewery 22 лет назад
Родитель
Сommit
05a8e65faf
4 измененных файлов с 55 добавлено и 48 удалено
  1. 16 12
      Makefile.in
  2. 33 32
      src/Makefile.in
  3. 1 1
      src/makesalt.c
  4. 5 3
      src/stringfix.c

+ 16 - 12
Makefile.in

@@ -80,7 +80,7 @@ clean:  cleanutils
 	+@cd src/compat && $(MAKE) clean
 	+@cd src/mod && $(MAKE) distclean
 	@rm -f $(HUBEXEC) $(LEAFEXEC) *.stamp core DEBUG *~ key configure.temp .mangled
-	@rm -f $(HUBEXEC).* $(LEAFEXEC).* src/settings.c src/settings.tmp 
+	@rm -f $(HUBEXEC).* $(LEAFEXEC).* src/settings.c
 
 distclean: clean clean-modconfig
 	@rm -f Makefile src/Makefile src/compat/Makefile src/mod/Makefile
@@ -117,20 +117,27 @@ depend:
 eggautoconf:
 	@$(modconf) eggautoconf
 
-packconf: makesettings
-	@src/makesettings pack/pack.cfg src/settings.tmp
+packconf: makesettings pack/pack.cfg
+	@src/makesettings pack/pack.cfg src/settings.c~
 	@(if [ ! -f src/settings.c ]; then \
 	touch src/settings.c; \
 	fi)
-	@(if test "x`diff -qurN src/settings.tmp src/settings.c`" != "x"; then \
-	cp -f src/settings.tmp src/settings.c; \
+	@(if test "x`diff -qurN src/settings.c~ src/settings.c`" != "x"; then \
+	cp -f src/settings.c~ src/settings.c; \
 	fi)
 
-salt:	makesalt src/makesalt.c stringfix
+
+salt: pack/salt.h makesalt stringfix
 	@src/makesalt
-	@echo -n "[*] Encrypting salts..."
-	@src/stringfix pack/salt.h src/salt.h || echo "FAILED"
-	@echo "done."
+	@(if [ ! -f src/salt.h ]; then \
+	touch src/salt.h; \
+	fi)
+	@src/stringfix pack/salt.h src/salt.h~
+	@(if test "x`diff -qurN src/salt.h~ src/salt.h`" != "x"; then \
+	echo -n "[*] Encrypting salts..."; \
+	src/stringfix pack/salt.h src/salt.h; \
+	echo "done."; \
+	fi)
 
 config:
 	@$(modconf) modules-still-exist
@@ -157,9 +164,6 @@ makesettings: src/makesettings.c
 
 utils: makesettings makesalt stringfix
 
-#utils: src/stringfix.c src/makesalt.c src/makesettings.c
-#	+@cd src && ${MAKE_UTILS} utils
-
 dostrings: stringfix
 	@misc/dostrings
 

+ 33 - 32
src/Makefile.in

@@ -38,7 +38,7 @@ makesettings: makesettings.c
 	@$(CC) $(CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/pack $(CPPFLAGS) makesettings.c -o makesettings
 	@$(STRIP) makesettings
 
-stringfix: stringfix.c
+stringfix: stringfix.c main.h ../config.h ../pack/conf.h eggdrop.h
 	@echo -e "Compiling: \033[1mstringfix\033[0m"
 	@$(CC) $(CFLAGS) -I$(top_srcdir) -I$(top_srcdir)/pack $(CPPFLAGS) stringfix.c -o stringfix
 	@$(STRIP) stringfix
@@ -93,143 +93,144 @@ eggdrop.h:
 	@$(CC) $(CFLAGS) $(CPPFLAGS) -c _$< -o `basename $< .c`.o
 
 #safety hash
-auth.o: auth.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+auth.o: auth.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h chan.h users.h compat/compat.h compat/inet_aton.h \
  compat/inet_ntop.h ../src/main.h compat/snprintf.h  compat/memset.h \
  compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-bg.o: bg.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+bg.o: bg.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  bg.h
-botcmd.o: botcmd.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+botcmd.o: botcmd.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h modules.h mod/modvals.h
-botmsg.o: botmsg.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+botmsg.o: botmsg.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h
-botnet.o: botnet.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+botnet.o: botnet.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h
-chanprog.o: chanprog.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+chanprog.o: chanprog.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h
-cmds.o: cmds.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+cmds.o: cmds.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  tandem.h modules.h mod/modvals.h
-config.o: config.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+config.o: config.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h chan.h users.h compat/compat.h compat/inet_aton.h \
  compat/inet_ntop.h ../src/main.h compat/snprintf.h  compat/memset.h \
  compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-crypt.o: crypt.c main.h ../config.h salt.h eggdrop.h proto.h \
+crypt.o: crypt.c stringfix main.h ../config.h salt.h eggdrop.h proto.h \
  ../lush.h misc_file.h compat/compat.h compat/inet_aton.h \
  compat/inet_ntop.h ../src/main.h compat/snprintf.h  compat/memset.h \
  compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-dcc.o: dcc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+dcc.o: dcc.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  modules.h mod/modvals.h tandem.h 
-dccutil.o: dccutil.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+dccutil.o: dccutil.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h
-dns.o: dns.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+dns.o: dns.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  dns.h
-flags.o: flags.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+flags.o: flags.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-main.o: main.c main.h build.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+main.o: main.c stringfix main.h build.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  modules.h mod/modvals.h tandem.h bg.h 
-match.o: match.c ./main.h
-mem.o: mem.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+match.o: match.c stringfix ./main.h
+mem.o: mem.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  mod/modvals.h
-misc.o: misc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+misc.o: misc.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  stat.h
-misc_file.o: misc_file.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+misc_file.o: misc_file.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h stat.h
-modules.o: modules.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+modules.o: modules.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h
-net.o: net.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+net.o: net.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-rfc1459.o: rfc1459.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+rfc1459.o: rfc1459.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h
-settings.o: settings.c main.h ../config.h ../pack/conf.h eggdrop.h \
+settings.o: settings.c stringfix main.h ../config.h ../pack/conf.h eggdrop.h \
  proto.h ../lush.h misc_file.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h
-stringfix.o: stringfix.c main.h ../config.h ../pack/conf.h eggdrop.h
-tcl.o: tcl.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+tcl.o: tcl.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h
-tcldcc.o: tcldcc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tcldcc.o: tcldcc.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h modules.h mod/modvals.h
-tclhash.o: tclhash.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tclhash.o: tclhash.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h match.c
-tclmisc.o: tclmisc.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tclmisc.o: tclmisc.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h 
-tcluser.o: tcluser.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+tcluser.o: tcluser.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h tandem.h
-userent.o: userent.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+userent.o: userent.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h
-userrec.o: userrec.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
+userrec.o: userrec.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h \
  proto.h ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h \
  users.h compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h \
  compat/snprintf.h compat/memset.h compat/memcpy.h compat/strcasecmp.h \
  compat/strftime.h modules.h mod/modvals.h tandem.h
-users.o: users.c main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
+users.o: users.c stringfix main.h ../config.h ../pack/conf.h lang.h eggdrop.h flags.h proto.h \
  ../lush.h misc_file.h cmdt.h tclegg.h tclhash.h chan.h users.h \
  compat/compat.h compat/inet_aton.h compat/inet_ntop.h ../src/main.h compat/snprintf.h \
  compat/memset.h compat/memcpy.h compat/strcasecmp.h compat/strftime.h \
  modules.h mod/modvals.h tandem.h
+
+#safety hash

+ 1 - 1
src/makesalt.c

@@ -43,7 +43,7 @@ int main(void)
 
   if ((saltfd = fopen("pack/salt.h", "r"))!= NULL) {
     fclose(saltfd);
-    printf("Using existent Salt-File\n"); 
+    printf("[*] Using existent Salt-File\n"); 
     exit(0);
   }
   printf("Creating Salt File\n");

+ 5 - 3
src/stringfix.c

@@ -9,13 +9,15 @@
 #include <string.h>
 #include "conf.h"
 
+#define WTF 20000
+
 #ifdef S_GARBLESTRINGS
 void garble(char **inptr, char **outptr)
 {
   char *in = *inptr,
    *out,
    *p = NULL;
-  char obuf[1024];
+  char obuf[WTF];
   int chars = 0;
   unsigned char x;
 
@@ -94,8 +96,8 @@ char *outbuf = NULL;
 
 void processline(char *line)
 {
-  char tmpin[1024],
-    tmpout[1024];
+  char tmpin[WTF],
+    tmpout[WTF];
   char *in,
    *out;