1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Disable auto-generation of libpcre/pcre_chartables.c. That file is meant

to be automatically generated by the makefile; however we include a copy
to enable the Windows build to work. On Unix, the makefile was
overwriting the file with a symbolic link to
libpcre/pcre_chartables.c.dist, which was causing revision-control
headaches. Now that file is copied instead of linked to, so its contents
don't change.

It is safe to use a static copy of the file instead of an auto-generated
one because Nmap has never used the auto-generation feature. You need to
use a special flag --enable-rebuild-chartables to get that. So copying
the file has the same behavior as creating a link. Furthermore, it's not
desirable to generate that file (using dftables, an auxiliary program
that uses the current locale) because we don't want our regular
expressions to be locale-dependent.

pcre_chartables.c was also removed from CLEANFILES so it's not deleted
by "make clean" or "make distclean". pcre.h is still deleted by "make
distclean" because it's included in AC_CONFIG_FILES. That's not as big a
deal.
This commit is contained in:
david
2007-10-03 08:11:45 +00:00
parent 515d45ab9d
commit 9a43e5394c
3 changed files with 12 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ else
pcre_chartables.c: $(srcdir)/pcre_chartables.c.dist
rm -f $@
$(LN_S) $(srcdir)/pcre_chartables.c.dist $@
cp -p $(srcdir)/pcre_chartables.c.dist $@
endif # WITH_REBUILD_CHARTABLES
@@ -77,8 +77,6 @@ libpcre_a_SOURCES = \
## This file is generated as part of the building process, so don't distribute.
nodist_libpcre_a_SOURCES = pcre_chartables.c
CLEANFILES += pcre_chartables.c
# A compatibility line, the old build system worked with 'make test'
test: check ;

View File

@@ -42,9 +42,8 @@ subdir = .
DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/config.h.in $(srcdir)/pcre-config.in \
$(srcdir)/pcre.h.in $(top_srcdir)/configure AUTHORS COPYING \
ChangeLog INSTALL NEWS config.guess config.sub depcomp \
install-sh missing
$(srcdir)/pcre.h.in $(top_srcdir)/configure AUTHORS INSTALL \
config.guess config.sub depcomp install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -224,7 +223,7 @@ top_srcdir = @top_srcdir@
lib_LIBRARIES = libpcre.a
# Additional files to delete on 'make clean' and 'make maintainer-clean'.
CLEANFILES = pcre_chartables.c
CLEANFILES =
MAINTAINERCLEANFILES = pcre.h.generic
# These are the header files we'll install. We do not distribute pcre.h because
@@ -270,15 +269,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
cd $(srcdir) && $(AUTOMAKE) --gnu \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
cd $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
@@ -780,7 +779,7 @@ pcre.h.generic: configure.ac
@WITH_REBUILD_CHARTABLES_FALSE@pcre_chartables.c: $(srcdir)/pcre_chartables.c.dist
@WITH_REBUILD_CHARTABLES_FALSE@ rm -f $@
@WITH_REBUILD_CHARTABLES_FALSE@ $(LN_S) $(srcdir)/pcre_chartables.c.dist $@
@WITH_REBUILD_CHARTABLES_FALSE@ cp -p $(srcdir)/pcre_chartables.c.dist $@
# A compatibility line, the old build system worked with 'make test'
test: check ;

View File

@@ -40,7 +40,9 @@ o Got rid of the C++ wrapper, which included this step:
o Copied pcre.h.generic to pcre.h and pcre_chartables.c.dist to, you
guessed it, pcre_chartables.c (for Windows). Running ./configure in
UNIX just overwrites them with other ones.
UNIX just overwrites them with other ones. Made the rule that makes
pcre_chartables.c copy pcre_chartables.c.dist instead of making a
symbolic link to it. Remove pcre_chartables.c from CLEANFILES.
o Stripped down Makefile.am and configure.ac substantially to remove
libtool dependency (was having trouble on Mac OS X), remove Windows