Commit graph

97 commits

Author SHA1 Message Date
7e2008e7f4 License upgrade to GPL version 3 or later
Why upgrade?  I'm not a lawyer, but here's my take on the differences
to version 2:

* Software patents: better protection against abuse of patents to
  prevent users from exercising the rights under the GPL.  I doubt
  we'll get hit with a patent suit, but it's a good move just on
  general principles.

* License compatibility: compatible with more free licenses, i.e. can
  "steal" more free software for use in Empire.  I don't expect to steal
  much, but it's nice to have the option.

* Definition of "source code": modernization of some details for today's
  networked world, to make it easier to distribute the software.  Not
  really relevant to us now, as we normally distribute full source code.

* Tivoization: this is about putting GPL-licensed software in hardware,
  then make the hardware refuse to run modified software.  "Neat" trick
  to effectively deny its users their rights under the GPL.  Abuse was
  "pioneered" by TiVo (popular digital video recorders).  GPLv3 forbids
  it.  Unlikely to become a problem for us.

* Internationalization: more careful wording, to harden the license
  outside the US.  The lawyers tell us it better be done that way.

* License violations: friendlier way to deal with license violations.
  This has come out of past experience enforcing the GPL.

* Additional permissions: Probably not relevant to us.

Also include myself in the list of principal authors.
2011-04-12 21:20:58 +02:00
37589489c6 Fix make clean to remove info.ps
Missed in commit 9067d7a4.
2011-01-09 15:27:26 +01:00
f9d6149db3 Update link to `Recursive Make Considered Harmful' 2010-02-13 21:04:01 +01:00
e93cc9934e Less verbose make output
Many commands, compiler invocations in particular, are rather long,
and warnings tend to get lost in the noise.  Suppress the command
details.  Run make with a V=1 parameter for full output.
2010-02-13 18:48:31 +01:00
73e25ff21e Update copyright notice 2010-01-19 08:40:17 +01:00
4d40a27542 Use src/lib/w32/w32sockets.c for client
Move client's w32_connect() to w32sockets.c.

Replace w32_recv() and w32_send() by read() and write().

Replace w32_close() by w32_close_function.

Replace call of WSAStartup() in w32_sysdep_init() by
w32_socket_init().

Remove the identical copies of fd_is_socket(),
w32_set_winsock_errno(), w32_socket().
2009-12-05 15:19:36 +01:00
1153d9c995 Use src/lib/w32/w32io.c for client
Replaces w32_writev_socket() and w32_readv_fd().  Split w32types.h off
w32misc.h, to avoid putting irrelevant stuff into client tarball.
2009-12-05 15:19:34 +01:00
c8231b120b Revert "MinGW provides random() in -liberty, no need to replace it"
This reverts commit 3ec807e99a.

Our nightly build test cases rely on the PRN sequence generated by GNU
libc's random().  We used to have such a PRNG in our tree (derived
from an old version of GNU libc's), for use under Windows.  Thus we
got the same PRN sequence on both our nightly test systems.  Commit
3ec807e9 switched to -liberty under Windows and removed our random().
Now we got a different sequence there, breaking the test cases.

Test cases still don't work on non-Windows systems where random()
doesn't match GNU libc's.  We should switch to a PRNG that produces
the same sequence everywhere.

Conflicts:

	src/lib/w32/w32misc.h
2009-12-05 15:09:19 +01:00
3ec807e99a MinGW provides random() in -liberty, no need to replace it 2009-11-30 19:45:28 +01:00
b8fccf7324 MinGW provides getopt(), no need to replace it 2009-11-30 19:45:28 +01:00
4c6deb1f98 Move Windows socket stuff out off posixio.c into w32sockets.c
This is so we can avoid linking utilities with socket libraries (see
commit 8b778634).

When using sockets, we need to replace close(), because Windows'
close() can't cope with socket file descriptors.  But replacing it
always would pull in the socket stuff again.  Define close() to call
function pointer w32_close_function, which is initially _close.
Rename posix_close() to w32_close_maybe_socket().  Make new
w32_socket_init() put it in w32_close_function.

Same for read() and write(): define read(), write() to call function
pointers w32_read_function, w32_write_function, initially _read(),
_write(); rename posix_read(), posix_write() to
w32_read_maybe_socket(), w32_write_maybe_socket(), and put them into
w32_read_function, w32_write_function in w32_socket_init().

Also call WSAStartup() there, and use that from loc_NTInit().
WSACleanup() now belongs next to w32_socket_init().  Don't bother,
just drop it, along with loc_NTTerm().
2009-11-30 19:45:27 +01:00
a977bd08f6 Rename m4/my_termlib.m4 to m4/my_terminfo.m4 2009-04-25 13:57:45 +02:00
cf4cb6c907 Fix generation of src/client/aclocal.m4
Revert commit c3d2786f, because the resulting aclocal.m4 includes
stuff from outside the standalone build.  Generate with cat instead.
2009-04-25 10:14:42 +02:00
8b7786340e Clean up autoconfiguration of libraries
Make configure compute three sets of libraries: LIBS_client for the
client, LIBS_server for the server, and LIBS for the rest.  This
replaces termlibs.

Unfortunately, LIBS doesn't work with Windows, because
src/lib/w32/posixio.c pulls in socket stuff.  Temporary workaround:
use LIBS_server instead.
2009-04-13 12:55:15 +02:00
c3d2786f1a Remake src/client/aclocal.m4 with aclocal instead of cp 2009-04-12 18:32:24 +02:00
2fb427b676 Fix distclean to remove generated files distributed in client tarball 2009-03-10 13:08:15 +01:00
ee20a9cd34 Update known contributors comments 2009-02-18 21:11:33 +01:00
dd8921218b Fix make dist in a separate build directory without git, really
Make didn't remake sources.mk even though it was a phony target.  I
don't understand why.  But we can just as well create it in its only
user, dist-source.
2009-02-17 23:00:07 +01:00
35ef345ecb Update copyright notice 2009-02-08 09:33:18 +01:00
e597257438 Fix make dist in a separate build directory without git
In that case, make copied the sources.mk from $srcdir, but unless it
existed already, the peculiar workings of VPATH did us in: make
searched for the target, found it in $srcdir, and the dependency
became circular.

Fix by keeping sources.mk in $srcdir always.  We can build it there,
because its contents depends only on git state, not on anything in the
build tree.  This avoids the need to copy sources.mk alltogether.
2008-12-07 18:14:46 -05:00
b4ecf7c7a6 Use 'git ls-files' instead of deprecated 'git-ls-files' 2008-12-02 21:26:32 -05:00
0d48dae06b Explicitly specify dependency output file with gcc -MF
Used to work without that, but somehow no longer does.
2008-10-28 19:27:23 -04:00
d702068457 Fix trailing whitespace 2008-09-17 21:31:40 -04:00
d72f9936db Fix remaking of sources.mk with git
Broken since commit 35db407d, v.4.3.12.  v4.3.14 and v4.3.15 were
distributed with a stale sources.mk in the tarball.  The latter does
not build out of the box because of that.
2008-07-25 08:34:35 -04:00
231947e41a Fix make distclean to remove generated sources.mk 2008-03-14 20:25:44 +01:00
0dd6702df1 Update known contributors comments 2008-03-14 20:25:44 +01:00
7ec0f0c0d0 New utility program empdump
empdump exports and imports game state as plain text.  Limitations: it
currently can't export player bmaps, power report, telegrams,
announcements, message of the day, no-login message and log files.
Exported floating-point values may be inexact.  Importing an exported
game state may not result in identical data files; besides the loss of
floating-point precision just mentioned, coordinates are normalized,
and characters beyond a string's terminating zero in a character array
are lost.  Bug: importing resets timestamps to zero.  It should set
them to the current time.
2008-03-14 20:25:42 +01:00
b3c5ba2f75 Tighten gcc warning options
Suppress only unused parameters, not all unused stuff.
2008-03-14 20:25:38 +01:00
adbcdf4335 Clean up dependencies after failed compile
If gcc's preprocessor chokes, it leaves an empty dependency file
behind, and doesn't touch the object file.  If an old object file
exists, and is newer than the .c file, make will then consider the
object file up-to-date.  This can lead to nasty version errors.
2008-03-14 20:25:09 +01:00
77e95bd788 Clean up library dependencies
Move stuff to untangle the ugly cyclic dependencies between the
archives built for selected subdirectories of src/lib/:

* Move common/io.c to empthread/ because it requires empthread stuff

* Move parts of subs/nstr.c to common/nstreval.c to satisfy
  common/ef_verify.o

* Move getstarg.c getstring.c onearg.c from gen/ to subs/ because they
  require stuff from there

* Move bridgefall.c check.c damage.c empobj.c journal.c maps.c
  sectdamage.c from common/ to subs/ because they require stuff from
  there

* Move cnumb.c from subs/ to common/ to satisfy common/type.o

* Move log.c fsize.c from common/ to gen/ because they really belong
  there

* Move emp_config.c mapdist.c from gen/ to common/ because they really
  belong there, and require stuff from libglobal.a

Also package as/ as libas.a to satisfy common/path.o.

Remaining dependencies:

    lib             needs
    --------------------------------------------
    libas.a         libglobal.a
    libcommon.a     libas.a libglobal.a libgen.a
    libgen.a
    libglobal.a
    liblwp.a        libgen.a
    libw32.a[*]     libgen.a

    [*] Except for service.o, which can only be linked into the server

Link order now: liblwp.a libcommon.a libas.a libgen.a libglobal.a
libw32.a.  The position of libw32.a is not quite right, but works
anyway.
2008-02-03 08:11:13 +01:00
db02dda32f Update copyright notice 2008-01-19 10:15:37 +01:00
35db407da0 Convert the build process from CVS to git
Detect .git instead of CVS.  Use git-ls-files with git, else
$(srcdir)/sources.mk.  info/findsubj.pl now gets the info files as
arguments rather than from sources.mk.

Remaking info subjects doesn't quite work, but it was broken similarly
before.
2008-01-13 11:17:26 +01:00
13a465edca Fix the previous revision. 2007-12-22 07:57:07 +00:00
Ron Koenderink
f082ef9fa6 (w32_getpw, w32_socket, w32_connect, w32_recv, w32_send,
w32_writev_socket, w32_close_socket, getpass, w32_openfd,
w32_openhandle, w32_readv_handle, w32_close_handle,
sysdep_init, sysdep_stdin_init, w32_select, w32_signal_handler,
sigaction, stdin_read_thread, w32_ring_from_file_to_bounce_buf)
[_WIN32]: New w32 equivalent functions for POSIX functions.
(recvline, sendcmd, tcp_connect, hostconnect, getpass,
main, intr, play, ring_to_file, ring_from_file, doexecute,
doredir) [_WIN32]: Use new WIN32 equivalent functions.
(main) [_WIN32]: Add sysdep_init() to support system dependent
initialization for equivalence functions.
(play) [_WIN32]: Add sysdef_stdin_init() to support system
dependent initialization for reading stdin.
(recv_input, play) [_WIN32]: Replace the calls to ring_to_file()
and select() with WIN32 specific enhanced versions.

Makefile.in: update dependencies with new files.
Make.mk: Add using of getopt.c and getopt.h
from src/lib/w32 directory.  Add getopt.c and getopt.h
to tar for client.
2007-12-11 22:00:25 +00:00
46c0410e9c (main): Rewrite argument parsing to use getopt(). New options -h and
-v.
(print_usage): New.
2007-11-16 20:33:08 +00:00
f757843ca5 (install): Be a bit more verbose about the update of econfig.
(uninstall): Point to the unremoved configuration directory, not just
to econfig.
2007-11-16 19:23:30 +00:00
535c8a06a7 (tarball): Fix missing -e required by shell script. 2007-11-15 07:11:15 +00:00
e7c9ca1186 (info.html/all.html): Fix to use the full 80 columns for the table.
(info.nr/all): Fix race between ls and output redirection.
2007-08-08 06:15:33 +00:00
6e3da4e1d0 Moving getopt.h to src/lib/w32/ broke the Windows build. Fix. 2007-08-08 05:27:49 +00:00
6498d66263 New home for stuff specific to Windows: src/lib/w32/
Move getopt.c getopt.h service.c from src/lib/gen/ there.
(lib/libw32.a): New.
(libs): Add it under Windows.
2007-08-04 05:23:39 +00:00
2c9b1ee80b (subst.in): Polish substitution of @configure_input@. 2007-07-28 19:33:35 +00:00
62c8eea544 Remove the ancient, crufty non-UCONTEXT system-dependent LWP code.
Using it required manual hackery since 4.3.0, and it hasn't been
missed.
2007-07-28 13:58:58 +00:00
f915f91b47 Update known contributors comment. 2007-07-27 20:16:19 +00:00
c1a0a42024 (util): Add empsched, belatedly. 2007-07-16 19:39:23 +00:00
27db04027e (schedule): New.
(install): Install a default schedule.
2007-07-11 22:37:31 +00:00
8da8e3fb3a Some variables were recursively expanded unintentionally. Fix. 2007-07-11 19:52:24 +00:00
530deef2fe Install all manual pages in section 6, where they belong. Source
files renamed.
2007-07-11 19:45:28 +00:00
63bdc89835 Update copyright notice. 2007-01-09 19:09:31 +00:00
aeff93394e Fix the previous revision again. 2006-06-18 20:45:01 +00:00
3d0f7dd383 Fix the previous revision. 2006-06-18 20:31:41 +00:00