+2004-10-21 Niels Möller <niels@s3.kth.se>
+
+ * examples/Makefile.in: Deleted all configure-related rules,
+ except the one rebuilding this Makefile. Run make at top level if
+ other configure related files change.
+ * tools/Makefile.in: Likewise.
+ * testsuite/Makefile.in: Likewise.
+
+ * configure.ac: Replaced AC_OUTPUT(list...) with an AC_OUTPUT
+ without arguments, and AC_CONFIG_FILES listing the files.
+
+ * Makefile.in: Changed the assembler rules as suffix rules.
+ Rewrote the configure-related rules, mostly based on the example
+ in the autoconf manual.
+
2004-10-20 Niels Möller <nisse@lysator.liu.se>
* examples/nettle-openssl.c (NCOMPAT): Disable openssl backwards
SOURCES = $(nettle_SOURCES) aesdata.c desdata.c shadata.c
-DISTFILES = $(SOURCES) $(HEADERS) .bootstrap aclocal.m4 configure.ac configure \
+DISTFILES = $(SOURCES) $(HEADERS) .bootstrap 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 \
README AUTHORS COPYING INSTALL NEWS TODO ChangeLog \
des.o: des.c des.h $(des_headers)
-# FIXME: For some reason, this rule breaks builds on Tru64 5.1B (on
-# alpha), with the system make. It fails with "Don't know how to make
-# aes.asm", which is very strange, since the make program on this
-# system is not supposed to know about %-style pattern rules, and
-# "aes.asm" doesn't occur explicitly in any target or dependency.
-
-@IF_ENABLE_ASM@%.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
-@IF_ENABLE_ASM@ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
-@IF_ENABLE_ASM@ $< >$*.s
-@IF_ENABLE_ASM@ $(CC) $(CFLAGS) $(CCPIC_MAYBE) -c $*.s -o $@
-@IF_ENABLE_ASM@ echo >$*.d
-
-# All assembler files should use pic-code only.
-@IF_ENABLE_ASM@%.p$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
-@IF_ENABLE_ASM@ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
-@IF_ENABLE_ASM@ $< >$*.s
-@IF_ENABLE_ASM@ $(CC) $(CFLAGS) $(CCPIC) -c $*.s -o $@
-@IF_ENABLE_ASM@ echo >$*.d
+.asm.$(OBJEXT):
+ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
+ $< >$*.s
+ $(COMPILE) $(CCPIC_MAYBE) -c $*.s
+ echo "$@ : $< $(srcdir)/asm.m4 machine.m4 config.m4" >$@.d
+
+.asm.p$(OBJEXT):
+ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
+ $< >$*.s
+ $(COMPILE) $(SHLIBCFLAGS) -c $*.s -o $@
+ echo "$@ : $< $(srcdir)/asm.m4 machine.m4 config.m4" >$@.d
# Texinfo rules
.texinfo.info:
&& test -s $@T && mv -f $@T $@
.texinfo.html:
- cd $(srcdir) && $(MAKEINFO) --html --no-split --output $@T `basename $<` \
- && test -s $@T && mv -f $@T $@
-
-# Configure-related rules
+ cd $(srcdir) && $(MAKEINFO) --html --no-split \
+ --output $@T `basename $<` \
+ && test -s $@T && mv -f $@T $@
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in config.status
- $(SHELL) ./config.status $@
+# Configure-related rules, mostly copied from the autoconf manual. No
+# $(srcdir) prefixes on the targets, though.
-config.make: $(srcdir)/config.make.in config.status
- $(SHELL) ./config.status $@
+configure: configure.ac aclocal.m4
+ cd $(srcdir) && $(AUTOCONF)
-config.status: $(srcdir)/configure
- $(SHELL) ./config.status --recheck
+# autoheader might not change config.h.in, so touch a stamp file.
+config.h.in: stamp-h.in
+stamp-h.in: configure.ac aclocal.m4
+ cd $(srcdir) && autoheader
+ echo timestamp > $(srcdir)/stamp-h.in
-config.m4: config.status $(srcdir)/config.m4.in
- $(SHELL) ./config.status $@
+config.status: configure
+ ./config.status --recheck
-configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
- cd $(srcdir) && $(AUTOCONF)
+config.h: stamp-h
+stamp-h: config.h.in config.status
+ ./config.status config.h
+ echo timestamp > stamp-h
-config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) stamp-h1; \
- else :; fi
+Makefile: Makefile.in config.status
+ ./config.status $@
-stamp-h1: $(srcdir)/config.h.in config.status
- @rm -f stamp-h1
- $(SHELL) ./config.status config.h
-$(srcdir)/config.h.in: $(srcdir)/configure.ac
- cd $(srcdir) && $(AUTOHEADER)
- rm -f stamp-h1
- touch $@
+config.make: config.make.in config.status
+ ./config.status $@
# Installation
install-here: install-info install-headers libnettle.a $(SHLIBINSTALL)
-rm -f $(TARGETS) *.$(OBJEXT) *.p$(OBJEXT) *.d
distclean-here: clean-here
- -rm -f config.h stamp-h1 config.log config.status \
+ -rm -f config.h stamp-h config.log config.status \
config.make config.m4 Makefile nettle-types.h
-include $(SOURCES:.c=.$(OBJEXT).d) $(SOURCES:.c=.p$(OBJEXT).d)