Jacek Konieczny wrote: > Hello, > > I made a patch with automake support for crossfire server sources. > It is available at http://www.bnet.pl/~jajcus/crossfire/ > Filename contains timestamp of CVS sources it was build against. I gave this a try - some notes below - > > How to use it: > - apply the patch to crossfire CVS sources > - install: > automake-1.6.1-1 > autoconf-2.53-1 > libtool-1.4.2-10 > some other versions of these tools may also work. > - run: "autogen.sh" script > - run: make distcheck > If you get "crossfire-1.3.0.tar.gz is ready for distribution" message it > means everything seems OK. > > The "make distcheck" builds a dsitribution tarball and checks if it > works. How does distcheck determine what to pack in the archive? It appears that it just takes everything in the current directory? Distcheck failed on my system because there was a gmon.out. That is a minor case. I'm much more worried about say the doc directories, where there may be some left over files from the build process. I suppose the right approach for making archives with this system would be to have a completely cvs checkout (done after whatever checkins) to run this in. This is slightly more inconvenient than the current archive method, which knows to only archive files specifically mentioned. Clearing out gmon.out wouldn't be hard, but I'm also thinking about other things - perhaps I'm working on a new doc file but not yet ready to commit it - it would seem that having that in my working area may prevent archives from working. > Some changes not commented yet: > - DATADIR etc. are passed to compiler as -DLIBDIR=... options > instead of autoconf.h header. This is done according to > automake documentation ("datadir","libdir","localstatedir" > should be used only in Makefile) I personally find this new format annoying. In addition to all the passed compile options, each compiled file now takes numerous lines, eg: Eg, comparison of just touching server/main.c and recompiling: automake: Making all in common make[1]: warning: -jN forced in submake: disabling jobserver mode. make[1]: Nothing to be done for `all'. Making all in random_maps make[1]: warning: -jN forced in submake: disabling jobserver mode. make[1]: Nothing to be done for `all'. Making all in socket make[1]: warning: -jN forced in submake: disabling jobserver mode. make[1]: Nothing to be done for `all'. Making all in server make[1]: warning: -jN forced in submake: disabling jobserver mode. source='main.c' object='main.o' libtool=no \ depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \ depmode=gcc3 /bin/sh ../utils/depcomp \ gcc -DHAVE_CONFIG_H -I. -I. -I../include -I../include -DDATADIR=\"/export/home/crossfire/cf-installroot/share/crossfire\" -DCONFDIR=\"/export/home/crossfire/cf-installroot/etc/crossfire\" -DLIBDIR=\"/export/home/crossfire/cf-installroot/lib/crossfire\" -DLOCALDIR=\"/export/home/crossfire/cf-installroot/var/crossfire\" -DPLUGIN_SUFFIX=\".so\" -ggdb -pg -Wall -c `test -f 'main.c' || echo './'`main.c /bin/sh ../libtool --mode=link gcc -ggdb -pg -Wall -o crossfire -export-dynamic alchemy.o apply.o attack.o ban.o c_chat.o c_misc.o c_move.o c_new.o c_object.o c_party.o c_range.o c_wiz.o commands.o daemon.o disease.o egoitem.o hiscore.o gods.o init.o login.o main.o monster.o move.o pets.o player.o plugins.o resurrection.o rune.o shop.o skills.o skill_util.o spell_effect.o spell_util.o swamp.o swap.o time.o timers.o weather.o ../common/libcross.a ../random_maps/librandom_map.a ../socket/libsocket.a -ldl -ldmalloclp -lcrypt -lm -lnsl gcc -ggdb -pg -Wall -o crossfire alchemy.o apply.o attack.o ban.o c_chat.o c_misc.o c_move.o c_new.o c_object.o c_party.o c_range.o c_wiz.o commands.o daemon.o disease.o egoitem.o hiscore.o gods.o init.o login.o main.o monster.o move.o pets.o player.o plugins.o resurrection.o rune.o shop.o skills.o skill_util.o spell_effect.o spell_util.o swamp.o swap.o time.o timers.o weather.o -Wl,--export-dynamic ../common/libcross.a ../random_maps/librandom_map.a ../socket/libsocket.a -ldl -ldmalloclp -lcrypt -lm -lnsl Making all in include make[1]: warning: -jN forced in submake: disabling jobserver mode. <rest of make warnings truncated> Old method: making all in common... make[1]: Nothing to be done for `all'. making all in random_maps... make[1]: Nothing to be done for `all'. making all in socket... make[1]: Nothing to be done for `all'. making all in server... gcc -ggdb -pg -Wall -I../include -I./../include -c main.c gcc -ggdb -pg -Wall -I../include -I./../include -c time.c /bin/rm -f crossfire gcc -o crossfire alchemy.o apply.o attack.o ban.o c_chat.o c_misc.o c_move.o c_new.o c_object.o c_party.o c_range.o c_wiz.o commands.o daemon.o disease.o egoitem.o hiscore.o gods.o init.o login.o main.o monster.o move.o pets.o player.o plugins.o resurrection.o rune.o shop.o skills.o skill_util.o spell_effect.o spell_util.o swamp.o swap.o time.o timers.o weather.o ../common/libcross.a ../random_maps/random_map.a ../socket/socket.a -ldl -ldmalloclp -lcrypt -lm -lnsl making all in include... make[1]: Nothing to be done for `all'. making all in lib... make[1]: Nothing to be done for `all'. making all in utils... make[1]: Nothing to be done for `all'. making all in doc... make[1]: Nothing to be done for `all'. making all in plugin... make[1]: Nothing to be done for `all'. making all in crossedit... (cd Cnv; make -j 2 all) make[2]: warning: -jN forced in submake: disabling jobserver mode. make[2]: Nothing to be done for `all'. I personally find the old method greatly preferable - with the elimination of all those extra lines, it is much easier to see any possible warnings or errors that may happen during compilation. Its very easy to just one or two line errors/warnings to get lost with the automake setup. > - All perl script are called from Makefiles with $(PERL) not > directly. These solves two problems: > a) CVS doesn't handle file permissions well, so sometimes > these scripts may lack +x permission > b) this will work with any location of perl binary (as > long as configure can find it) without changing script > content This makes a lot of sense. It should also obviate the need for all the .pl files to be rewritten by configure, as make will pass the right location. This has been done for some - just never got around to doing it for all the perl files.