From 48beacf6e4438f457b33fddebaa8a81698dc77f8 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 20 Dec 2001 02:55:11 +0000 Subject: * Makefile.in (VPATH): Add regex directory. (NM): new variable. (OBSOLETE_FUNCTIONS): Ditto. (NEW_FUNCTIONS): Ditto. (install-headers): Install regex.h. (install-man): New target. (install): Use new target. (DLL_OFILES): Add v8_reg* stuff. (new-cygwin1.dll): Eliminate stamp-cygwin-lib creation. (libcygwin.a): Remove obsolete functions from import lib. Add new functions. * configure.in: Detect 'nm' tool. * configure: Regenerate. * cygwin.din: Export posix_reg* functions. Eliminate export of v8 reg* functions. This is now handled in object files themselves. * regex/*: New files. * regexp/v8_*.c: New files, renamed from non v8_ equivalents. --- winsup/cygwin/Makefile.in | 77 +++++++++++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 29 deletions(-) (limited to 'winsup/cygwin/Makefile.in') diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index ab49440b8..78ea72156 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -14,7 +14,7 @@ srcdir:=@srcdir@ objdir:=. CONFIG_DIR:=$(srcdir)/config/@CONFIG_DIR@ -VPATH:=$(srcdir):$(CONFIG_DIR):$(srcdir)/regexp:$(srcdir)/lib +VPATH:=$(srcdir):$(CONFIG_DIR):$(srcdir)/regex:$(srcdir)/regexp:$(srcdir)/lib target_alias:=@target_alias@ build_alias:=@build_alias@ @@ -44,8 +44,8 @@ INSTALL_PROGRAM:=@INSTALL_PROGRAM@ # # --enable options from configure # -MT_SAFE = @MT_SAFE@ -DEFS = @DEFS@ +MT_SAFE:=@MT_SAFE@ +DEFS:=@DEFS@ CC:=@CC@ # FIXME: Which is it, CC or CC_FOR_TARGET? @@ -65,7 +65,8 @@ LD:=@LD@ DLLTOOL:=@DLLTOOL@ WINDRES:=@WINDRES@ AS:=@AS@ -LDSCRIPT=cygwin.sc +NM:=@NM@ +LDSCRIPT:=cygwin.sc # # Include common definitions for winsup directory @@ -124,14 +125,21 @@ DLL_OFILES:=assert.o autoload.o cygheap.o dcrt0.o debug.o delqueue.o dir.o \ fhandler_tape.o fhandler_termios.o fhandler_tty.o fhandler_windows.o \ fhandler_zero.o fork.o glob.o grp.o heap.o init.o ioctl.o localtime.o \ malloc.o miscfuncs.o mmap.o net.o ntea.o passwd.o path.o pinfo.o pipe.o \ - poll.o pthread.o regexp.o regerror.o regsub.o registry.o resource.o \ - scandir.o sched.o sec_acl.o sec_helper.o security.o select.o shared.o \ - shortcut.o signal.o sigproc.o smallprint.o spawn.o strace.o strsep.o \ - sync.o syscalls.o sysconf.o syslog.o termios.o thread.o times.o tty.o \ - uinfo.o uname.o wait.o wincap.o window.o \ + poll.o pthread.o regcomp.o regerror.o regexec.o regfree.o registry.o \ + resource.o scandir.o sched.o sec_acl.o sec_helper.o security.o \ + select.o shared.o shortcut.o signal.o sigproc.o smallprint.o spawn.o \ + strace.o strsep.o sync.o syscalls.o sysconf.o syslog.o termios.o \ + thread.o times.o tty.o uinfo.o uname.o v8_regexp.o v8_regerror.o \ + v8_regsub.o wait.o wincap.o window.o \ $(EXTRA_DLL_OFILES) $(EXTRA_OFILES) $(MALLOC_OFILES) $(MT_SAFE_OBJECTS) -GMON_OFILES:= gmon.o mcount.o profil.o +GMON_OFILES:=gmon.o mcount.o profil.o + +OBSOLETE_FUNCTIONS:=regcomp regerror regexec regfree regsub +NEW_FUNCTIONS:=regcomp posix_regcomp \ + regerror posix_regerror \ + regexec posix_regexec \ + regfree posix_regfree .PHONY: all force dll_ofiles install all_target install_target all_host install_host \ install install_target install-libs install-headers @@ -150,7 +158,7 @@ all_host: new-$(LIB_NAME) cygrun.exe force: -install: install-libs install-headers $(install_host) $(install_target) +install: install-libs install-headers install-man $(install_host) $(install_target) install-libs: $(LIB_NAME) $(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME); \ @@ -165,43 +173,54 @@ install-headers: $(INSTALL_DATA) $$i $(tooldir)/$$sub/`basename $$i` ; \ done ; \ done ; \ - $(INSTALL_DATA) regexp/regexp.h $(tooldir)/include/regexp.h + $(INSTALL_DATA) regex/regex.h $(tooldir)/include/regex.h + +install-man: + cd $(srcdir); \ + for i in `find . -type f -name '*.2'`; do \ + $(INSTALL_DATA) $$i $(tooldir)/man/man2/`basename $$i` ; \ + done; \ + for i in `find . -type f -name '*.3'`; do \ + $(INSTALL_DATA) $$i $(tooldir)/man/man3/`basename $$i` ; \ + done; \ + for i in `find . -type f -name '*.5'`; do \ + $(INSTALL_DATA) $$i $(tooldir)/man/man5/`basename $$i` ; \ + done; \ + for i in `find . -type f -name '*.7'`; do \ + $(INSTALL_DATA) $$i $(tooldir)/man/man7/`basename $$i` ; \ + done install_host: clean: - -rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o winver_stamp *.exe *.d + -rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o winver_stamp *.exe *.d *stamp* maintainer-clean realclean: clean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." -rm -fr configure -# Rule to build libcygwin.a - -# Rule to make stub library used by testsuite - -# dependency set to $(LIB_NAME) to accommodate make -j2. -# Otherwise dlltool gets confused. cgf (11-16-2000) -new-$(LIB_NAME): $(LIB_NAME) - $(DLLTOOL) --as=$(AS) --dllname new-$(DLL_NAME) --def $(DEF_FILE) --output-lib new-templib.a - $(AR) rcv new-templib.a $(LIBCOS) - mv new-templib.a new-$(LIB_NAME) # Rule to build cygwin.dll - new-$(DLL_NAME): $(LDSCRIPT) $(DLL_OFILES) $(DEF_FILE) $(DLL_IMPORTS) $(LIBC) $(LIBM) Makefile winver_stamp $(CXX) $(CXXFLAGS) -nostdlib -Wl,-T$(firstword $^) -Wl,--out-implib,cygdll.a -shared -o $@ \ -e $(DLL_ENTRY) $(DEF_FILE) $(DLL_OFILES) version.o winver.o \ $(DLL_IMPORTS) $(MALLOC_OBJ) $(LIBM) $(LIBC) \ -lstdc++ -lgcc -lshell32 -luuid - @rm -f stamp-cygwin-lib -$(LIB_NAME): new-$(DLL_NAME) $(LIBCOS) stamp-cygwin-lib - (echo create $(LIB_NAME); echo addlib cygdll.a; echo addmod $(LIBCOS); echo save) | $(AR) -M +# Rule to build libcygwin.a +$(LIB_NAME): rmsym newsym new-$(DLL_NAME) $(LIBCOS) + /bin/sh ${word 1,$^} ./cygdll.a $(NM) $(AR) $(RANLIB) $(OBSOLETE_FUNCTIONS) || exit 0 + /bin/sh ${word 2,$^} ./cygdll.a $(AS) $(AR) $(RANLIB) $(NEW_FUNCTIONS) || exit 0 + (echo create $(LIB_NAME); echo addmod $(LIBCOS); echo addlib cygdll.a; echo save) | $(AR) -M -stamp-cygwin-lib: - @touch stamp-cygwin-lib +# Rule to make stub library used by testsuite +# dependency set to $(LIB_NAME) to accommodate make -j2. +# Otherwise dlltool gets confused. cgf (11-16-2000) +new-$(LIB_NAME): $(LIB_NAME) + $(DLLTOOL) --as=$(AS) --dllname new-$(DLL_NAME) --def $(DEF_FILE) --output-lib new-templib.a + $(AR) rcv new-templib.a $(LIBCOS) + mv new-templib.a new-$(LIB_NAME) dll_ofiles: $(DLL_OFILES) -- cgit v1.2.3