* Makefile.in: Only build testsuite directory on first 'make check'.

* configure.in: Remove testsuite from SUBDIRS.
* configure: Regenerate.
This commit is contained in:
Christopher Faylor 2001-10-24 21:56:54 +00:00
parent 1dd695651f
commit a9f20457f3
13 changed files with 78 additions and 35 deletions

View File

@ -1,3 +1,9 @@
2001-10-24 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Only build testsuite directory on first 'make check'.
* configure.in: Remove testsuite from SUBDIRS.
* configure: Regenerate.
2001-10-12 Christopher Faylor <cgf@redhat.com>
* Makefile.in: Add -nostdinc to CXXFLAGS.

View File

@ -36,7 +36,7 @@ datadir:=@datadir@
infodir:=@infodir@
includedir:=@includedir@
SUBDIRS=@SUBDIRS@
SUBDIRS=@SUBDIRS@ testsuite
INSTALL_SUBDIRS=${patsubst %,install_%,$(SUBDIRS)}
CLEAN_SUBDIRS=${patsubst %,clean_%,$(SUBDIRS)}
@ -66,13 +66,19 @@ install-info:
info:
$(SUBDIRS):
@$(MAKE) -C $@ all
@if cd $@ 2>/dev/null; then \
$(MAKE) all; \
fi || exit 0
$(INSTALL_SUBDIRS):
@$(MAKE) -C ${patsubst install_%,%,$@} install
@if cd ${patsubst install_%,%,$@} 2>/dev/null; then \
make install; \
fi || exit 0
$(CLEAN_SUBDIRS):
@$(MAKE) -C ${patsubst clean_%,%,$@} clean
@if cd ${patsubst clean_%,%,$@} 2>/dev/null; then \
make install; \
fi || exit 0
.PRECIOUS: Makefile
@ -82,5 +88,15 @@ Makefile: Makefile.in $(srcdir)/configure.in config.status
config.status: configure
$(SHELL) config.status --recheck
check:
@$(MAKE) -C testsuite check
check: cygwin
@if [ -d testsuite ]; then \
cd testsuite; \
else \
mkdir testsuite; \
cd testsuite; \
sed -n -e '1,/^done/{' -e 's%/cygwin%/testsuite%g; ' -e 'p; }' ../cygwin/config.status > config.status; \
chmod a+x config.status; \
sh ./config.status --recheck; \
sh ./config.status; \
fi; \
$(MAKE) check

4
winsup/configure vendored
View File

@ -922,7 +922,7 @@ case "$with_cross_host" in
test -d $srcdir/bz2lib && SUBDIRS="$SUBDIRS bz2lib"
test -d $srcdir/cinstall && SUBDIRS="$SUBDIRS cinstall"
test -d $srcdir/subauth && SUBDIRS="$SUBDIRS subauth"
SUBDIRS="$SUBDIRS utils doc testsuite"
SUBDIRS="$SUBDIRS utils doc"
;;
esac
@ -1121,7 +1121,7 @@ s%@CC@%$CC%g
s%@CXX@%$CXX%g
s%@subdirs@%$subdirs%g
s%@SET_MAKE@%$SET_MAKE%g
s%@SUBDIRS@%$SUBDIRS%g
s%@SUBDIRS testsuite@%$SUBDIRS testsuite%g
CEOF
EOF

View File

@ -72,7 +72,7 @@ case "$with_cross_host" in
test -d $srcdir/bz2lib && SUBDIRS="$SUBDIRS bz2lib"
test -d $srcdir/cinstall && SUBDIRS="$SUBDIRS cinstall"
test -d $srcdir/subauth && SUBDIRS="$SUBDIRS subauth"
SUBDIRS="$SUBDIRS utils doc testsuite"
SUBDIRS="$SUBDIRS utils doc"
;;
esac

View File

@ -165,6 +165,7 @@ struct init_cygheap
HANDLE shared_h;
HANDLE console_h;
HANDLE etc_changed_h;
char *cygwin_regname;
cwdstuff cwd;
dtable fdtab;

View File

@ -11,6 +11,7 @@ Cygwin license. Please consult the file "CYGWIN_LICENSE" for
details. */
#include "winsup.h"
#include <errno.h>
#include "security.h"
#include "fhandler.h"
#include "sync.h"
@ -20,6 +21,11 @@ details. */
#include "shared_info.h"
#include "cygwin_version.h"
#include "perprocess.h"
#include "cygerrno.h"
#include "fhandler.h"
#include "path.h"
#include "dtable.h"
#include "cygheap.h"
static external_pinfo *
fillout_pinfo (pid_t pid, int winpid)
@ -175,6 +181,19 @@ cygwin_internal (cygwin_getinfo_types t, ...)
return get_cygdrive_info (user, system, user_flags, system_flags);
}
case CW_SET_CYGWIN_REGISTRY_NAME:
{
# define cr ((char *) arg)
if (check_null_empty_str_errno (cr))
return (DWORD) NULL;
cygheap->cygwin_regname = (char *) crealloc (cygheap->cygwin_regname,
strlen (cr) + 1);
strcpy (cygheap->cygwin_regname, cr);
case CW_GET_CYGWIN_REGISTRY_NAME:
return (DWORD) cygheap->cygwin_regname;
# undef cr
}
default:
return (DWORD) -1;
}

View File

@ -104,7 +104,7 @@ get_tty_stuff (int flags = 0)
if (shared_console_info)
return shared_console_info;
shared_console_info = (tty_min *) open_shared (NULL, cygheap->console_h,
shared_console_info = (tty_min *) open_shared (NULL, 0, cygheap->console_h,
sizeof (*shared_console_info),
NULL);
ProtectHandle (cygheap->console_h);

View File

@ -64,7 +64,9 @@ typedef enum
CW_GET_CYGDRIVE_PREFIXES,
CW_GETPINFO_FULL,
CW_INIT_EXCEPTIONS,
CW_GET_CYGDRIVE_INFO
CW_GET_CYGDRIVE_INFO,
CW_SET_CYGWIN_REGISTRY_NAME,
CW_GET_CYGWIN_REGISTRY_NAME
} cygwin_getinfo_types;
#define CW_NEXTPID 0x80000000 // or with pid to get next one

View File

@ -107,6 +107,8 @@ struct symlink_info
int pcheck_case = PCHECK_RELAXED; /* Determines the case check behaviour. */
#define CYGWIN_REGNAME (cygheap->cygwin_regname ?: CYGWIN_INFO_CYGWIN_REGISTRY_NAME)
/* Determine if path prefix matches current cygdrive */
#define iscygdrive(path) \
(path_prefix_p (mount_table->cygdrive, (path), mount_table->cygdrive_len))
@ -1711,8 +1713,7 @@ mount_info::from_registry ()
/* Then read mounts from system-wide mount table. */
reg_key r1 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
read_mounts (r1);
@ -1757,8 +1758,7 @@ mount_info::add_reg_mount (const char * native_path, const char * posix_path, un
{
/* reg_key for system mounts in HKEY_LOCAL_MACHINE. */
reg_key reg_sys (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
@ -1806,8 +1806,7 @@ mount_info::del_reg_mount (const char * posix_path, unsigned flags)
sys_mount_table_counter++;
cygwin_shared->sys_mount_table_counter++;
reg_key reg_sys (HKEY_LOCAL_MACHINE, KEY_ALL_ACCESS, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
res = reg_sys.kill (posix_path);
@ -1839,8 +1838,7 @@ mount_info::read_cygdrive_info_from_registry ()
/* reg_key for system path prefix in HKEY_LOCAL_MACHINE. */
reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
@ -1890,8 +1888,7 @@ mount_info::write_cygdrive_info_to_registry (const char *cygdrive_prefix, unsign
/* reg_key for user path prefix in HKEY_CURRENT_USER or system path prefix in
HKEY_LOCAL_MACHINE. */
reg_key r (top, KEY_ALL_ACCESS, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
@ -1947,8 +1944,7 @@ mount_info::remove_cygdrive_info_from_registry (const char *cygdrive_prefix, uns
/* reg_key for user path prefix in HKEY_CURRENT_USER or system path prefix in
HKEY_LOCAL_MACHINE. */
reg_key r (top, KEY_ALL_ACCESS, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
@ -1980,8 +1976,7 @@ mount_info::get_cygdrive_info (char *user, char *system, char* user_flags,
/* Get the system path prefix from HKEY_LOCAL_MACHINE. */
reg_key r2 (HKEY_LOCAL_MACHINE, KEY_READ, "SOFTWARE",
CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
CYGWIN_INFO_CYGWIN_REGISTRY_NAME,
CYGWIN_INFO_CYGNUS_REGISTRY_NAME, CYGWIN_REGNAME,
CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME,
NULL);
int res2 = r2.get_string (CYGWIN_INFO_CYGDRIVE_PREFIX, system, MAX_PATH, "");

View File

@ -55,7 +55,7 @@ shared_name (const char *str, int num)
}
void * __stdcall
open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
open_shared (const char *name, int n, HANDLE &shared_h, DWORD size, void *addr)
{
void *shared;
@ -66,7 +66,7 @@ open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr)
mapname = NULL;
else
{
mapname = shared_name (name, 0);
mapname = shared_name (name, n);
shared_h = OpenFileMappingA (FILE_MAP_READ | FILE_MAP_WRITE,
TRUE, mapname);
}
@ -127,6 +127,7 @@ memory_init ()
/* Initialize general shared memory */
HANDLE shared_h = cygheap ? cygheap->shared_h : NULL;
cygwin_shared = (shared_info *) open_shared ("shared",
CYGWIN_VERSION_SHARED_DATA,
shared_h,
sizeof (*cygwin_shared),
cygwin_shared_address);
@ -151,7 +152,8 @@ memory_init ()
ProtectHandle (cygheap->shared_h);
heap_init ();
mount_table = (mount_info *) open_shared (user_name, cygwin_mount_h,
mount_table = (mount_info *) open_shared (user_name, MOUNT_VERSION,
cygwin_mount_h,
sizeof (mount_info), 0);
debug_printf ("opening mount table for '%s' at %p", cygheap->user.name (),
mount_table_address);
@ -165,6 +167,9 @@ memory_init ()
debug_printf ("initializing mount table");
mount_table->init (); /* Initialize the mount table. */
}
else if (mount_table->version != MOUNT_VERSION)
multiple_cygwin_die ();
}
void __stdcall

View File

@ -40,7 +40,7 @@ class mount_item
scheme should be satisfactory for a long while yet. */
#define MAX_MOUNTS 30
#define MOUNT_VERSION 0x01010103
#define MOUNT_VERSION 27 // increment when mount table changes
class reg_key;
class mount_info
@ -158,4 +158,4 @@ void __stdcall shared_terminate (void);
#define cygheap_address shared_align_past ((mount_info *) shared_align_past (cygwin_shared))
char *__stdcall shared_name (const char *, int);
void *__stdcall open_shared (const char *name, HANDLE &shared_h, DWORD size, void *addr);
void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size, void *addr);

View File

@ -67,10 +67,9 @@ ALL_LDFLAGS:=-B$(newlib_build)/libc/ -B$(newlib_build)/libm/ -B$(w32api_lib)/ \
MINGW_LDFLAGS:=$(ALL_LDFLAGS) $(MINGW_LIB)
DUMPER_LDFLAGS:=$(ALL_LDFLAGS) $(DUMPER_LIB)
PROGS:=mount$(EXEEXT) umount$(EXEEXT) ps$(EXEEXT) kill$(EXEEXT) \
mkpasswd$(EXEEXT) mkgroup$(EXEEXT) cygpath$(EXEEXT) cygcheck$(EXEEXT) \
passwd$(EXEEXT) getfacl$(EXEEXT) setfacl$(EXEEXT) strace$(EXEEXT) \
regtool$(EXEEXT) ssp$(EXEEXT)
PROGS:= cygcheck.exe cygpath.exe cygme.exe getfacl.exe kill.exe mkgroup.exe \
mkpasswd.exe mount.exe passwd.exe ps.exe regtool.exe setfacl.exe \
ssp.exe strace.exe umount.exe
CLEAN_PROGS:=$(PROGS)
ifdef build_dumper

View File

@ -1,6 +1,6 @@
/* mount.cc
Copyright 1996, 1997, 1998, 1999 Cygnus Solutions.
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc.
This file is part of Cygwin.