Heavy Makefile.in updates. Real install target, clean now removes bins,

and make is now a little smarter about knowing when to rerun ./configure
and ./bootstrap
This commit is contained in:
Joseph Carter 2000-01-03 08:03:01 +00:00
parent 68785812de
commit 95dc2c6ebf
8 changed files with 110 additions and 32 deletions

View file

@ -1,6 +1,8 @@
SUBDIRS = qw_client qw_server uquake SUBDIRS = qw_client qw_server uquake
SRC_DIR = @srcdir@ SRC_DIR = @srcdir@
DESTDIR =
all: all:
@for dir in $(SUBDIRS); do \ @for dir in $(SUBDIRS); do \
$(MAKE) -C $$dir $@ || exit; \ $(MAKE) -C $$dir $@ || exit; \
@ -28,10 +30,11 @@ clean-autoconf mrproper: distclean
# Code to automatically re-configure, only runs if you are compiling in the # Code to automatically re-configure, only runs if you are compiling in the
# source directory # source directory
ifeq ($(SRC_DIR),.) ifeq ($(SRC_DIR),.)
configure: configure.in configure: configure.in acconfig.h
autoconf ./bootstrap
Makefile: Makefile.in configure Makefile: Makefile.in configure \
qw_client/Makefile qw_server/Makefile uquake/Makefile
./configure ./configure
qw_client/Makefile: qw_client/Makefile.in configure qw_client/Makefile: qw_client/Makefile.in configure

3
TODO
View file

@ -13,16 +13,13 @@ to quake-devel@lists.sourceforge.net with details.
possible buffer overruns possible buffer overruns
* Devise and implement a way to ensure original gameplay compatibility * Devise and implement a way to ensure original gameplay compatibility
while still letting us expand and extend the quake engine while still letting us expand and extend the quake engine
* configure.in: clean up the intel -mcpu stuff
* Audio support for more platforms * Audio support for more platforms
* Add OpenGL multi-pass texturing replacement for when multi-texturing * Add OpenGL multi-pass texturing replacement for when multi-texturing
extension isn't available extension isn't available
* README: add tested platforms and results * README: add tested platforms and results
* Makefile.in, */Makefile.in: Add install target
* Remove dependency on GNU make or migrate to automake * Remove dependency on GNU make or migrate to automake
* Quake/QW Client: Add proper XFree86 DGA/VideoMode support to X-based targets * Quake/QW Client: Add proper XFree86 DGA/VideoMode support to X-based targets
on systems with XFree86 available on systems with XFree86 available
* Merge in GGIQuake
* Merge SDLQuake (BigM created a patch against an older revision of our * Merge SDLQuake (BigM created a patch against an older revision of our
main tree) main tree)
* Add currently removed documentation to the README, and also add more * Add currently removed documentation to the README, and also add more

View file

@ -12,6 +12,9 @@
# define GLAPIENTRY APIENTRY # define GLAPIENTRY APIENTRY
#endif #endif
/* Define this to something sane if you don't have stricmp */
#undef stricmp
/* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */ /* Define this if you have GL_COLOR_INDEX8_EXT in GL/gl.h */
#undef HAVE_GL_COLOR_INDEX8_EXT #undef HAVE_GL_COLOR_INDEX8_EXT

View file

@ -331,13 +331,14 @@ AC_SUBST(TDFXGL_LIBS)
AC_SUBST(HAS_SDL) AC_SUBST(HAS_SDL)
AC_SUBST(SDL_CFLAGS) AC_SUBST(SDL_CFLAGS)
AC_SUBST(SDL_LIBS) AC_SUBST(SDL_LIBS)
AC_SUBST(prefix)
AC_SUBST(bindir)
AC_SUBST(mandir)
dnl Checks for library functions. dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNC(stricmp, AC_CHECK_FUNC(stricmp,,
[STRICMP_DEF=], AC_CHECK_FUNC(strcasecmp, AC_DEFINE(stricmp,strcasecmp)))
AC_CHECK_FUNC(strcasecmp, [STRICMP_DEF=-Dstricmp=strcasecmp]))
AC_SUBST(STRICMP_DEF)
########################################################## ##########################################################

40
mkinstalldirs Executable file
View file

@ -0,0 +1,40 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id$
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here

View file

@ -6,10 +6,16 @@
PROJECT_DIR = @top_srcdir@ PROJECT_DIR = @top_srcdir@
SRC_DIR = @srcdir@ SRC_DIR = @srcdir@
QW_COMMON_DIR= $(PROJECT_DIR)/qw_common QW_COMMON_DIR= $(PROJECT_DIR)/qw_common
COMMON_DIR=$(PROJECT_DIR)/common COMMON_DIR = $(PROJECT_DIR)/common
BIN_PREFIX = qw-client BIN_PREFIX = qw-client
BUILD_DIR = ../targets/qw_client DESTDIR =
prefix = @prefix@
bindir = @bindir@
mandir = @mandir@
BUILD_DIR = ../targets/qw_client
LDFLAGS = @LDFLAGS@ @SND_LIBS@ LDFLAGS = @LDFLAGS@ @SND_LIBS@
LIBS = @LIBS@ LIBS = @LIBS@
@ -198,9 +204,9 @@ CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \
# #
# Directory specific stuff # Directory specific stuff
# #
DEFS = @DEFS@ @STRICMP_DEF@ DEFS = @DEFS@
CFLAGS = -Wall -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \ CFLAGS = @CFLAGS@ -Wall -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. \
-I$(QW_COMMON_DIR) -I$(COMMON_DIR) -I../common $(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_DIR)
ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(QW_X11_VID_SRC) model.c ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(QW_X11_VID_SRC) model.c
ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC) $(QW_GL_REND_SRC) ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC) $(QW_GL_REND_SRC)
ALL_TDFX_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(TDFX_VID_SRC) $(QW_GL_REND_SRC) ALL_TDFX_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(TDFX_VID_SRC) $(QW_GL_REND_SRC)
@ -522,9 +528,16 @@ distclean: clean
rm -f config.cache config.log config.status Makefile rm -f config.cache config.log config.status Makefile
clean: $(CLEAN_TARGETS) clean: $(CLEAN_TARGETS)
for i in $(targets); do \
rm -f $(BUILD_DIR)/../$$i; \
done
install: install: $(targets)
@echo Install not implemented $(PROJECT_DIR)/mkinstalldirs $(DESTDIR)$(prefix)$(bindir)
for i in $(targets); do \
$(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \
$(DESTDIR)$(prefix)$(bindir)/$$i; \
done
check: check:
@echo check not implemented @echo check not implemented

View file

@ -6,6 +6,12 @@
PROJECT_DIR = @top_srcdir@ PROJECT_DIR = @top_srcdir@
SRC_DIR = @srcdir@ SRC_DIR = @srcdir@
DESTDIR =
prefix = @prefix@
bindir = @bindir@
mandir = @mandir@
COMMON_DIR=$(PROJECT_DIR)/common COMMON_DIR=$(PROJECT_DIR)/common
QW_COMMON_DIR= $(PROJECT_DIR)/qw_common QW_COMMON_DIR= $(PROJECT_DIR)/qw_common
BUILD_DIR = ../targets/qw_server BUILD_DIR = ../targets/qw_server
@ -64,9 +70,9 @@ QW_GENERAL_SRC = pmove.c pmovetst.c
# #
# Directory specific stuff # Directory specific stuff
# #
CFLAGS = -DQUAKEWORLD -DSERVERONLY $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \ CFLAGS = @CFLAGS@ -DQUAKEWORLD -DSERVERONLY $(OPTFLAGS) $(DEFS) -I. \
-I$(QW_COMMON_DIR) -I$(COMMON_DIR) -I../common $(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_DIR)
DEFS = @DEFS@ @STRICMP_DEF@ DEFS = @DEFS@
SRVQUAKE = qw-server SRVQUAKE = qw-server
targets = $(SRVQUAKE) targets = $(SRVQUAKE)
@ -135,9 +141,16 @@ distclean: clean
rm -f config.cache config.log config.status Makefile rm -f config.cache config.log config.status Makefile
clean: $(CLEAN_TARGETS) clean: $(CLEAN_TARGETS)
for i in $(targets); do \
install: rm -f $(BUILD_DIR)/../$$i; \
@echo Install not implemented done
install: $(targets)
$(PROJECT_DIR)/mkinstalldirs $(DESTDIR)$(prefix)$(bindir)
for i in $(targets); do \
$(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \
$(DESTDIR)$(prefix)$(bindir)/$$i; \
done
check: check:
@echo check not implemented @echo check not implemented

View file

@ -7,6 +7,12 @@ PROJECT_DIR = @top_srcdir@
SRC_DIR = @srcdir@ SRC_DIR = @srcdir@
BIN_PREFIX = quake BIN_PREFIX = quake
DESTDIR =
prefix = @prefix@
bindir = @bindir@
mandir = @mandir@
COMMON_DIR=$(PROJECT_DIR)/common COMMON_DIR=$(PROJECT_DIR)/common
BUILD_DIR =../targets/uquake BUILD_DIR =../targets/uquake
@ -77,11 +83,6 @@ targets = $(GGIQUAKE) $(SVGAQUAKE) $(GLQUAKE) $(TDFXQUAKE) $(X11QUAKE) $(S
CLEAN_TARGETS = $(patsubst %,clean-%, $(targets)) CLEAN_TARGETS = $(patsubst %,clean-%, $(targets))
.PHONY: $(targets) ($CLEAN_TARGETS) .PHONY: $(targets) ($CLEAN_TARGETS)
x: Makefile
@echo binaries: $(targets)
@echo other targets: distclean
@echo all: makes all targets - $(targets)
all: $(targets) all: $(targets)
######################################################################## ########################################################################
@ -187,8 +188,8 @@ CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \
# Directory specific stuff # Directory specific stuff
# #
DEFS = @DEFS@ DEFS = @DEFS@
CFLAGS = $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) -I$(COMMON_DIR) \ CFLAGS = @CFLAGS@ $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) \
-I../common -I$(SRC_DIR)/include -I$(COMMON_DIR) -I$(SRC_DIR)/include
ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(X11_VID_SRC) model.c ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(X11_VID_SRC) model.c
ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC) ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC)
ALL_TDFX_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(TDFX_VID_SRC) ALL_TDFX_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(TDFX_VID_SRC)
@ -474,9 +475,16 @@ distclean: clean
rm -f config.cache config.log config.status Makefile rm -f config.cache config.log config.status Makefile
clean: $(CLEAN_TARGETS) clean: $(CLEAN_TARGETS)
for i in $(targets); do \
rm -f $(BUILD_DIR)/../$$i; \
done
install: install: $(targets)
@echo Install not implemented $(PROJECT_DIR)/mkinstalldirs $(DESTDIR)$(prefix)$(bindir)
for i in $(targets); do \
$(PROJECT_DIR)/install-sh -m 755 $(BUILD_DIR)/../$$i \
$(DESTDIR)$(prefix)$(bindir)/$$i; \
done
check: check:
@echo check not implemented @echo check not implemented