]> jfr.im git - irc/quakenet/newserv.git/commitdiff
rework build system, part 1:
authorChris Porter <redacted>
Mon, 22 Jul 2013 00:27:50 +0000 (01:27 +0100)
committerChris Porter <redacted>
Mon, 22 Jul 2013 00:27:50 +0000 (01:27 +0100)
- configure.ac -> configure.ini (and .local)
- kill settings.mk and defaults.mk, now in configure.ini
- step 1 of removal of pmake support

.hgignore
build.mk.in
configure.ac.local.example [deleted file]
defaults.mk [deleted file]

index b62d8c9134348241910498be6c5511df7f9209dc..e674b0afc575372c735cbdb0cf324fbcedede5dc 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -4,7 +4,6 @@ syntax: glob
 *.o
 *.so
 *.db
-local.mk
 build.mk
 newserv
 modules/
@@ -20,16 +19,13 @@ newserv.core
 *.dump
 chanservlog
 Makefile
-autobuild.mk
 chanserv/*/commandlist.c
 chanserv/achievements/achievementscanners.c
-configure.ac.local
+configure.ini.local
 config.h
-settings.mk
 graphing/dump
 silly
 y.tab.{c,h}
 lex.yy.c
-.settings.mk
 core.*
 core
index fca81a56e433b620ae1a0f02129a21d3e546642a..b1f3982e87f4535a7d05bff47f41c128f16ee7ad 100644 (file)
@@ -1,92 +1,72 @@
-@ifndef@ INCPATH
+ifndef INCPATH
 INCPATH=../
-@endif@
+endif
 
 CFLAGS=
 LEX=flex
 MFLAGS=
 
-@sinclude@ @includel@$(INCPATH)defaults.mk@includel@
-@sinclude@ @includel@$(INCPATH)settings.mk@includel@
-
-@ifeq@${HOOKS_NEW}@ifeqsep@1@ifeqend@
+ifeq (${HOOKS_NEW},1)
 HOOK_ENGINE=new
-@else@
+else
 HOOK_ENGINE=old
-@endif@
+endif
 
 # if USE_VALGRIND == 1
-@ifeq@${USE_VALGRIND}@ifeqsep@1@ifeqend@
+ifeq (${USE_VALGRIND},1)
   CFLAGS+=-DUSE_VALGRIND
   SSTRING_ENGINE=valgrind
 
 ## if SSTRING_NEW == 1
-@ifeq@${SSTRING_NEW}@ifeqsep@1@ifeqend@
+ifeq (${SSTRING_NEW},1)
     IMPOSSIBLE="USE_VALGRIND and SSTRING_NEW"
-@endif@ # SSTRING_NEW == 1
+endif # SSTRING_NEW == 1
 
 ## if SSTRING_MMAP == 1
-@ifeq@${SSTRING_MMAP}@ifeqsep@1@ifeqend@
+ifeq (${SSTRING_MMAP},1)
     IMPOSSIBLE="USE_VALGRIND and SSTRING_MMAP"
-@endif@ ## SSTRING_MMAP == 1
-@else@ # USE_VALGRIND == 1
+endif ## SSTRING_MMAP == 1
+else # USE_VALGRIND == 1
 
 ## if SSTRING_NEW == 1
-@ifeq@${SSTRING_NEW}@ifeqsep@1@ifeqend@
+ifeq (${SSTRING_NEW},1)
     SSTRING_ENGINE=new
-@else@ ## SSTRING_NEW == 1
+else ## SSTRING_NEW == 1
     SSTRING_ENGINE=old
 
 ### if SSTRING_MMAP == 1
-@ifeq@${SSTRING_MMAP}@ifeqsep@1@ifeqend@
+ifeq (${SSTRING_MMAP},1)
       IMPOSSIBLE="SSTRING_MMAP without SSTRING_NEW"
-@endif@ ### SSTRING_MMAP == 1
-@endif@ ## SSTRING_NEW == 1
-@endif@ # USE_VALGRIND == 1
+endif ### SSTRING_MMAP == 1
+endif ## SSTRING_NEW == 1
+endif # USE_VALGRIND == 1
 
-@ifdef@ IMPOSSIBLE
-@error@ impossible combination of settings: ${IMPOSSIBLE}@errorend@
-@endif@
+ifdef IMPOSSIBLE
+$(error impossible combination of settings: ${IMPOSSIBLE})
+endif
 
-@ifndef@ BUILDID
-BUILDID @shell@ (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" @shellend@
-@endif@
+ifndef BUILDID
+BUILDID = $(shell (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" )
+endif
 MFLAGS+=BUILDID=$(BUILDID)
 
 .SUFFIXES: .so .y .l
 
 .o.so:
-       @-ldline-@ $(LDFLAGS)
+       $(CC) -nostartfiles -shared -o $@ $^ $(LDFLAGS)
 
 .y.c:  ;
 
 .l.c:  ;
 
-.PHONY: checksettings default
-
-@ifndef@ CHECKEDSETTINGS
-default: checksettings all
-
-checksettings:
-       @touch ${INCPATH}/settings.mk
-       @test -f ${INCPATH}/.settings.mk || cp ${INCPATH}/settings.mk ${INCPATH}/.settings.mk
-       @diff ${INCPATH}/.settings.mk ${INCPATH}/settings.mk >/dev/null || $(MAKE) -e FORCECHECK=1 realchecksettings
-
-realchecksettings:
-
-@ifdef@ FORCECHECK
-@error@ you must run make clean if you change settings.mk@errorend@
-@endif@
-@endif@
-MFLAGS+=CHECKEDSETTINGS=1
+default: all
 
 CFLAGS+=-I./ -DBUILDID=$(BUILDID) -fPIC
 CFLAGS+=-Wall -g -finline-functions -funroll-loops -Werror=format-security
 
-@ifndef@ CLANG
-@ifndef@ NOC99
+ifndef CLANG
+ifndef NOC99
 CFLAGS+=-std=c99
-@endif@
+endif
 CFLAGS+=-export-dynamic
-@endif@
-
+endif
diff --git a/configure.ac.local.example b/configure.ac.local.example
deleted file mode 100644 (file)
index 2a2acc7..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-[search]
-lib=/home/q9test/src/lua-5.1.3/lib
-include=/home/q9test/src/lua-5.1.3/include/
-
-[modules]
-cloak=
-tinyr=
diff --git a/defaults.mk b/defaults.mk
deleted file mode 100644 (file)
index a01ef90..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# copy these into settings.mk, do NOT alter here
-EVENT_ENGINE=poll
-NEWSEARCH_NEWPARSER=0
-USE_VALGRIND=0
-SSTRING_NEW=0
-SSTRING_MMAP=0
-HOOKS_NEW=0
-XSB_ENGINE=pre
-#CLANG=0   # remember to set CC