Sfoglia il codice sorgente

Merge branch 'build-cleanups' into next

* build-cleanups:
  Make building src/crypto non-recursive
  Make building src/compat non-recursive
  Consistently use tabs
  This too should not use $*
  Stringfix is used for help.h

Conflicts:
	build/autotools/configure.ac
	src/Makefile.in
Bryan Drewery 11 anni fa
parent
commit
c142a6e507

+ 2 - 7
Makefile.in

@@ -12,7 +12,7 @@ VPATH = @srcdir@
 CCDEPMODE = @CCDEPMODE@
 BINEXEC = wraith@EXEEXT@
 
-STATICMAKEFILES = lib/Makefile src/crypto/Makefile src/compat/Makefile src/Makefile Makefile
+STATICMAKEFILES = lib/Makefile src/Makefile Makefile
 CONFIGFILES = build/config.cache build/config.log build/config.status src/config.h src/buildinfo.h
 
 DISTROFILES = README.md LICENSE build doc scripts lib Makefile.in build.sh configure src BSDmakefile
@@ -70,7 +70,7 @@ MAKE_UTILS_NR = $(MAKE) 'CXX=$(CXX)' 'STRIP=touch' 'INCLUDES=$(INCLUDES)' \
 
 MAKE_CONFIG = $(MAKE) 'MAKE=$(MAKE)'
 
-.PHONY: checkclean.static checkclean.dynamic checkclean.debug lib wraith dwraith lib.debug debug test general crypto sorthelp sort indent tar distrib distclean clean cleanutils test all dynamic static tags
+.PHONY: checkclean.static checkclean.dynamic checkclean.debug lib wraith dwraith lib.debug debug test general sorthelp sort indent tar distrib distclean clean cleanutils test all dynamic static tags
 
 all: dynamic
 
@@ -83,8 +83,6 @@ cleanutils:
 
 clean:  cleanutils
 	+@cd src && $(MAKE) clean
-	+@cd src/compat && $(MAKE) clean
-	+@cd src/crypto && $(MAKE) clean
 	-+@cd lib && $(MAKE) clean
 	@rm -f $(BINEXEC) build/stamp.* *~ src/*~ configure.temp .mangled stamp.*
 	@rm -f utctime@EXEEXT@ ts@EXEEXT@
@@ -145,9 +143,6 @@ sort: sorthelp
 sorthelp: src/sorthelp.cc
 	+@cd src && ${MAKE_UTILS} sorthelp
 
-crypto:
-	+@cd src/crypto && ${MAKE_UTILS} crypto
-
 general:
 
 .NOTPARALLEL: checkclean.static checkclean.dynamic checkclean.debug

+ 1 - 1
build/autotools/configure.ac

@@ -229,7 +229,7 @@ EGG_SUBST_VERSION
 #FIND_WRAPS
 DO_DEPS
 
-AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/buildinfo.h])
+AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile src/buildinfo.h])
 
 AH_TEMPLATE(HAVE_ST_MTIM, [Define to 1 if your struct stat has an st_mtim member])
 AH_TEMPLATE(HAVE_ST_MTIMESPEC, [Define to 1 if your struct stat has an st_mtimespec member])

+ 1 - 1
build/autotools/includes/depend.m4

@@ -24,7 +24,7 @@ AC_SUBST(GCC4DEB)dnl
 
 AC_DEFUN([DO_DEPS],
 [
-files="src/Makefile.in src/compat/Makefile.in src/crypto/Makefile.in"
+files="src/Makefile.in"
 for mf in $files; do
   # Strip MF so we end up with the name of the file.
   mf=${mf%%:*}

+ 2 - 4
configure

@@ -9024,7 +9024,7 @@ _ACEOF
 
 #FIND_WRAPS
 
-files="src/Makefile.in src/compat/Makefile.in src/crypto/Makefile.in"
+files="src/Makefile.in"
 for mf in $files; do
   # Strip MF so we end up with the name of the file.
   mf=${mf%%:*}
@@ -9064,7 +9064,7 @@ for mf in $files; do
 done
 
 
-ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile src/compat/Makefile src/crypto/Makefile src/buildinfo.h"
+ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile src/buildinfo.h"
 
 
 
@@ -9806,8 +9806,6 @@ do
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
     "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
     "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-    "src/compat/Makefile") CONFIG_FILES="$CONFIG_FILES src/compat/Makefile" ;;
-    "src/crypto/Makefile") CONFIG_FILES="$CONFIG_FILES src/crypto/Makefile" ;;
     "src/buildinfo.h") CONFIG_FILES="$CONFIG_FILES src/buildinfo.h" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;

+ 26 - 19
src/Makefile.in

@@ -61,14 +61,29 @@ OBJS = auth.So \
 	userent.So \
 	userrec.So \
 	users.So \
-        mod/channels.mod/channels.So \
-        mod/console.mod/console.So \
-        mod/ctcp.mod/ctcp.So \
-        mod/irc.mod/irc.So \
-        mod/server.mod/server.So \
-        mod/share.mod/share.So \
-        mod/transfer.mod/transfer.So \
-        mod/update.mod/update.So
+	mod/channels.mod/channels.So \
+	mod/console.mod/console.So \
+	mod/ctcp.mod/ctcp.So \
+	mod/irc.mod/irc.So \
+	mod/server.mod/server.So \
+	mod/share.mod/share.So \
+	mod/transfer.mod/transfer.So \
+	mod/update.mod/update.So \
+	compat/dirname.o \
+	compat/dn_expand.o \
+	compat/inet_ntop.o \
+	compat/snprintf.o \
+	compat/memcpy.o \
+	compat/memmem.o \
+	compat/memset.o \
+	compat/memutil.o \
+	compat/strcasecmp.o \
+	compat/strftime.o \
+	compat/strlcpy.o \
+	compat/strsep.o \
+	crypto/aes_util.o \
+	crypto/bf_util.o \
+	crypto/dh_util.o
 
 MAKE_GENERIC = $(MAKE) 'MAKE=$(MAKE)' 'MAKEFLAGS=$(MAKEFLAGS)' 'CXX=$(CXX)' 'LD=$(LD)' 'STRIP=$(STRIP)' 'CXXFLAGS=$(CXXFLAGS)' 'CFLGS=$(CFLGS)' 'CCDEPMODE=$(CCDEPMODE)'
 
@@ -92,7 +107,7 @@ responses.cc: $(RESPONSESFILE) $(top_srcdir)/build/makeres.sh
 cmds.cc: help.h
 
 help.h: $(HELPFILE) $(top_srcdir)/build/makehelp.sh $(STRINGFIX)
-	@echo -e "[H]	\033[1m$*\033[0m"
+	@echo -e "{H}	\033[1m$@\033[0m"
 	@$(top_srcdir)/build/makehelp.sh < $(HELPFILE) | $(STRINGFIX) > $@
 
 sorthelp: sorthelp.cc ../lib/bdlib/libbdlib.a
@@ -100,12 +115,12 @@ sorthelp: sorthelp.cc ../lib/bdlib/libbdlib.a
 	@$(CXX) $(CPPFLAGS) -I$(top_srcdir)/src -I$(top_srcdir)/pack $(CXXFLAGS) $< ../lib/bdlib/libbdlib.a $(LDFLAGS) -o $@
 	@$(STRIP) $@@EXEEXT@
 
-../$(EGGEXEC): build_msg $(OBJS) mycrypto compatability ../lib/bdlib/libbdlib.a @LIBELF_BUNDLED@
+../$(EGGEXEC): build_msg $(OBJS) ../lib/bdlib/libbdlib.a @LIBELF_BUNDLED@
 	@echo "[*] Linking"
 	@echo ""
 	@echo "Linking wraith... $(EGGBUILD)"
 	@echo ""
-	$(LD) $(LDFLAGS) -o ../$(EGGEXEC) $(OBJS) compat/*.o crypto/*.o ../lib/bdlib/libbdlib.a $(LIBS) @LIBELF_LIB@
+	$(LD) $(LDFLAGS) -o ../$(EGGEXEC) $(OBJS) ../lib/bdlib/libbdlib.a $(LIBS) @LIBELF_LIB@
 	@$(STRIP) ../$(EGGEXEC)
 	@$(OBJCOPY) ../$(EGGEXEC)
 	@echo "Successful compile: $(EGGEXEC)"
@@ -119,12 +134,4 @@ clean:
 build_msg:
 	@echo "[*] Compiling core components"
 
-compatability:
-	@echo "[*] Compiling compatability components"
-	+@cd compat && $(MAKE_GENERIC) compat
-
-mycrypto:
-	@echo "[*] Compiling crypto"
-	+@cd crypto && $(MAKE_GENERIC) crypto
-
 include ./.deps/includes

+ 0 - 41
src/compat/Makefile.in

@@ -1,41 +0,0 @@
-# Makefile for src/compat/
-
-SHELL = @SHELL@
-top_srcdir = @top_srcdir@
-srcdir = @srcdir@
-VPATH = @srcdir@
-
-include $(top_srcdir)/build/build.mk
-
-@SET_MAKE@
-
-STRIP = @STRIP@
-CXXFLAGS = $(CXXFLAGS)
-CFLAGS = $(CFLGS)
-CPPFLAGS = @CPPFLAGS@ -I../.. -I$(top_srcdir) -I$(top_srcdir)/lib -I$(top_srcdir)/src @DEFS@
-
-OBJS = dirname.o \
-	dn_expand.o \
-	inet_ntop.o \
-	snprintf.o \
-	memcpy.o \
-	memmem.o \
-	memset.o \
-	memutil.o \
-	strcasecmp.o \
-	strftime.o \
-	strlcpy.o \
-	strsep.o
-
-doofus:
-	@echo ""
-	@echo "Let's try this from the right directory..."
-	@echo ""
-	@cd ../.. && $(MAKE)
-
-clean:
-	@rm -f .depend *.o *~
-
-compat: $(OBJS)
-
-include ./.deps/includes

+ 0 - 32
src/crypto/Makefile.in

@@ -1,32 +0,0 @@
-
-top_srcdir = @top_srcdir@
-srcdir = @srcdir@
-
-SHELL = @SHELL@
-CXXFLAGS = $(CXXFLAGS)
-CFLAGS = $(CFLGS)
-CPPFLAGS = @CPPFLAGS@ -I.. -I$(top_srcdir) -I$(top_srcdir)/lib @DEFS@
-STRIP = @STRIP@
-VPATH = @srcdir@
-
-include $(top_srcdir)/build/build.mk
-
-@SET_MAKE@
-
-OBJS = \
-       aes_util.o \
-       bf_util.o \
-       dh_util.o
-
-doofus:
-	@echo ""
-	@echo "Let's try this from the right directory..."
-	@echo ""
-	@cd ../../.. && $(MAKE)
-
-clean:
-	@rm -f .depend *.o *~
-
-crypto: $(OBJS)
-
-include ./.deps/includes