2012-02-18 Niels Möller <nisse@lysator.liu.se>
+ * run-tests, getopt.c, getopt1.c, getopt.h: These files were moved
+ to the top-level in the conversion to an independent git
+ repository. They used to be symlinks to lsh files, from the
+ subdirectories which use them.
+
+ * Makefile.in: Build and distribute getopt files. Distribute
+ run-tests script.
+ * examples/Makefile.in: Adapt to getopt files and the run-tests
+ script now located in the parent directory.
+ * testsuite/Makefile.in: Likewise.
+ * tools/Makefile.in: Likewise.
+
* index.html: Converted to xhtml (from lsh repository, change
dated 2012-02-03). Updated git instructions.
LIBTARGETS = libnettle.a @IF_HOGWEED@ libhogweed.a
SHLIBTARGETS = $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK)
-TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) shadata$(EXEEXT) gcmdata$(EXEEXT)\
+getopt_SOURCES = getopt.c getopt1.c
+
+getopt_TARGETS = $(getopt_SOURCES:.c=.$(OBJEXT))
+
+TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) shadata$(EXEEXT) gcmdata$(EXEEXT) \
+ $(getopt_TARGETS) \
$(LIBTARGETS) @IF_SHARED@ $(SHLIBTARGETS)
IMPLICIT_TARGETS = @IF_DLL@ $(LIBNETTLE_FILE) $(LIBHOGWEED_FILE)
INSTALL_HEADERS = $(HEADERS) nettle-stdint.h
-SOURCES = $(nettle_SOURCES) $(hogweed_SOURCES) aesdata.c desdata.c shadata.c gcmdata.c
+SOURCES = $(nettle_SOURCES) $(hogweed_SOURCES) $(getopt_SOURCES) \
+ aesdata.c desdata.c shadata.c gcmdata.c
-DISTFILES = $(SOURCES) $(HEADERS) .bootstrap aclocal.m4 configure.ac \
+DISTFILES = $(SOURCES) $(HEADERS) getopt.h .bootstrap run-tests \
+ aclocal.m4 configure.ac \
configure stamp-h.in \
config.guess config.sub install-sh texinfo.tex \
config.h.in config.m4.in config.make.in Makefile.in \
TARGETS = nettle-benchmark$(EXEEXT) eratosthenes$(EXEEXT) @IF_HOGWEED@ $(RSA_TARGETS) next-prime$(EXEEXT) random-prime$(EXEEXT)
SOURCES = nettle-benchmark.c eratosthenes.c next-prime.c random-prime.c \
nettle-openssl.c \
- io.c read_rsa_key.c getopt.c getopt1.c \
+ io.c read_rsa_key.c \
rsa-encrypt.c rsa-decrypt.c rsa-keygen.c rsa-sign.c rsa-verify.c
-GETOPT_OBJS = getopt.$(OBJEXT) getopt1.$(OBJEXT)
+GETOPT_OBJS = ../getopt.$(OBJEXT) ../getopt1.$(OBJEXT)
TS_ALL = rsa-sign-test rsa-verify-test rsa-encrypt-test
-DISTFILES= $(SOURCES) Makefile.in $(TS_ALL) run-tests setup-env teardown-env \
- io.h rsa-session.h getopt.h
+DISTFILES= $(SOURCES) Makefile.in $(TS_ALL) setup-env teardown-env \
+ io.h rsa-session.h
all: $(TARGETS)
.c.$(OBJEXT):
$(COMPILE) -c $< && $(DEP_PROCESS)
+$(getopt_OBJS):
+ ( cd .. && $(MAKE) $@ )
+
# For Solaris and BSD make, we have to use an explicit rule for each executable
next-prime$(EXEEXT): next-prime.$(OBJEXT) $(GETOPT_OBJS) ../libhogweed.a
$(LINK) next-prime.$(OBJEXT) $(GETOPT_OBJS) \
check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
EMULATOR="$(EMULATOR)" EXEEXT="$(EXEEXT)" \
- "$(srcdir)"/run-tests $(TS_ALL)
+ "$(top_srcdir)"/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status examples/$@
SOURCES = $(TS_SOURCES) testutils.c
DISTFILES = $(SOURCES) $(EXTRA_SOURCES) cxx-test.cxx Makefile.in .test-rules.make \
- $(TS_SH) run-tests setup-env teardown-env \
+ $(TS_SH) setup-env teardown-env \
gold-bug.txt testutils.h
all: $(TARGETS) $(EXTRA_TARGETS)
../libnettle.a @IF_HOGWEED@ ../libhogweed.a
# The PATH update is for locating dlls on w*ndows.
-check: $(TS_ALL) $(srcdir)/run-tests
+check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \
- $(srcdir)/run-tests $(TS_ALL)
+ $(top_srcdir)/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status
all: $(TARGETS)
-sexp_conv_SOURCES = sexp-conv.c input.c output.c parse.c \
- getopt.c getopt1.c misc.c
-pkcs1_conv_SOURCES = pkcs1-conv.c getopt.c getopt1.c misc.c
-nettle_hash_SOURCES = nettle-hash.c getopt.c getopt1.c misc.c
+getopt_OBJS = ../getopt.$(OBJEXT) ../getopt1.$(OBJEXT)
+
+sexp_conv_SOURCES = sexp-conv.c input.c output.c parse.c misc.c
+pkcs1_conv_SOURCES = pkcs1-conv.c misc.c
+nettle_hash_SOURCES = nettle-hash.c misc.c
SOURCES = $(sexp_conv_SOURCES) nettle-hash.c nettle-lfib-stream.c pkcs1-conv.c
-DISTFILES = $(SOURCES) Makefile.in getopt.h input.h misc.h output.h parse.h
+DISTFILES = $(SOURCES) Makefile.in input.h misc.h output.h parse.h
-sexp_conv_OBJS = $(sexp_conv_SOURCES:.c=.$(OBJEXT))
+sexp_conv_OBJS = $(sexp_conv_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS)
sexp-conv$(EXEEXT): $(sexp_conv_OBJS) ../libnettle.a
$(LINK) $(sexp_conv_OBJS) -lnettle $(LIBS) -o $@
nettle-lfib-stream$(EXEEXT): nettle-lfib-stream.$(OBJEXT) ../libnettle.a
$(LINK) nettle-lfib-stream.$(OBJEXT) -lnettle $(LIBS) -o $@
-pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT))
+pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS)
pkcs1-conv$(EXEEXT): $(pkcs1_conv_OBJS) ../libnettle.a ../libhogweed.a
$(LINK) $(pkcs1_conv_OBJS) -lhogweed -lnettle $(LIBS) -o $@
# FIXME: Avoid linking with gmp
-nettle_hash_OBJS = $(nettle_hash_SOURCES:.c=.$(OBJEXT))
+nettle_hash_OBJS = $(nettle_hash_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS)
nettle-hash$(EXEEXT): $(nettle_hash_OBJS) ../libnettle.a
$(LINK) $(nettle_hash_OBJS) -lnettle $(LIBS) -o $@
.c.$(OBJEXT):
$(COMPILE) -c $< && $(DEP_PROCESS)
+$(getopt_OBJS):
+ ( cd .. && $(MAKE) $@ )
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status tools/$@