Bug fix: minimize the right thing.
[u/mdw/catacomb] / Makefile.m4
index 8c5d32a..42e4125 100644 (file)
@@ -1,6 +1,6 @@
 ## -*-makefile-*-
 ##
-## $Id: Makefile.m4,v 1.37 2000/07/29 10:02:36 mdw Exp $
+## $Id: Makefile.m4,v 1.40 2000/08/06 10:50:55 mdw Exp $
 ##
 ## Makefile for Catacomb
 ##
 ##----- Revision history ----------------------------------------------------
 ##
 ## $Log: Makefile.m4,v $
+## Revision 1.40  2000/08/06 10:50:55  mdw
+## (mkphrase): New program for generating random passphrases with measured
+## strength.
+##
+## Revision 1.39  2000/07/29 21:55:32  mdw
+## Make sure the pixie is installed setuid-root (workaround for an Automake
+## bug).  Install new manpages.
+##
+## Revision 1.38  2000/07/29 10:54:55  mdw
+## Further fixing to support building using normal `make' again. ;-)  I
+## think we're there now.
+##
 ## Revision 1.37  2000/07/29 10:02:36  mdw
 ## Lots of fixing to support `make -j' building.
 ##
@@ -194,15 +206,15 @@ modes-stamp: genmodes
        cd $(srcdir); ./genmodes "lit(`hashes')" "lit(`hash_modes')"
        echo datestamp >modes-stamp
 
-define(`tables', `dnl
+define(`gen_tables', `dnl
 _(des) _(blowfish) _(twofish) _(square) _(rijndael) _(tiger) dnl
 _(gfshare)')
 
-autoheaders: addsuffix(tables, `-tab.h') primetab.h mptypes.h
+autoheaders: addsuffix(`gen_tables', `-tab.h') primetab.h mptypes.h
 define(`emit', `
 _item`'-tab.h: _item`'-mktab
        ./_item`'-mktab >_item`'-tab.h')dnl
-tables
+gen_tables
 
 primetab.h: primetab.c
 primetab.c: genprimes
@@ -245,7 +257,7 @@ pkginclude_HEADERS = \
        addsuffix(`cipher_modes', `-def.h') \
        addsuffix(`hash_modes', `-def.h')
 
-define(`lib_sources', `\
+libcatacomb_la_SOURCES = \
        grand.c keysz.c \
        des-base.c des-base.h \
        cast-s.c cast-sk.c cast-base.h cast-tab.h \
@@ -271,10 +283,7 @@ define(`lib_sources', `\
        rho.c \
        key-data.c key-flags.c key-text.c key-binary.c key-pass.c \
        key-pack.c key-misc.c key-file.c key-attr.c key-io.c key-moan.c \
-       key-error.c key-fetch.c')
-LIBSRC = lib_sources
-libcatacomb_la_SOURCES = \
-       lib_sources \
+       key-error.c key-fetch.c \
        primetab.c \
        addsuffix(join(`ciphers', `-', `cipher_modes'), `.c') \
        addsuffix(join(`hashes', `-', `hash_modes'), `.c') \
@@ -287,11 +296,11 @@ square.lo: square-tab.h
 rijndael.lo: rijndael-tab.h
 tiger.lo: tiger-tab.h
 gfshare.lo: gfshare-tab.h
-$(LIBSRC) dsig.o keyutil.o rspit.o: mptypes.h primetab.h
+$(libcatacomb_la_OBJECTS) dsig.o keyutil.o rspit.o: mptypes.h primetab.h
 
 ## --- Utility programs ---
 
-bin_PROGRAMS = dsig key pixie rspit factorial hashsum
+bin_PROGRAMS = dsig key pixie rspit factorial hashsum mkphrase
 bin_SCRIPTS = catacomb-config xpixie
 noinst_PROGRAMS = \
        genprimes mptypes \
@@ -307,6 +316,7 @@ rspit_SOURCES = rspit.c
 factorial_SOURCES = factorial.c
 pixie_SOURCES = pixie.c pixie-common.c lmem.c arena.c
 pixie_LDADD =
+mkphrase_SOURCES = mkphrase.c
 
 des_mktab_SOURCES = des-mktab.c
 des_mktab_LDADD =
@@ -332,8 +342,12 @@ mptypes_SOURCES = mptypes.c
 mptypes_LDADD =
 
 ## --- Install the pixie setuid-root if we can ---
+##
+## Bodge around a bug in Automake: it doesn't call `install-exec-hook' from
+## `install' if there are subdirectories.
 
 changequote(<, >)
+install: install-exec-hook
 install-exec-hook:
        @pixie="$(bindir)/`echo pixie|sed $(transform)`"; \
        if chown root $$pixie && chmod 4755 $$pixie; then \
@@ -348,7 +362,7 @@ changequote(`, ')
 
 ## --- Documentation ---
 
-man_MANS = key.1 keyring.5
+man_MANS = key.1 hashsum.1 keyring.5 pixie.1
 
 ## --- Other handy definitions ---
 
@@ -419,7 +433,7 @@ TESTS = serpent-check testprogs
 CLEANFILES = \
        *.t *.to \
        mptypes.h primetab.c primetab.h \
-       des-tab.h twofish-tab.h blowfish-tab.h gfshare-tab.h rijndael-tab.h
+       addsuffix(`gen_tables', `-tab.h')
 
 ## --- Makefile building (haha!) ---