further clean-up
- improve doc generation - update version handling no need for VERSION_{MAJ,MIN}
This commit is contained in:
parent
6cd8f2504b
commit
ea67579298
@ -22,8 +22,7 @@ doxy: doxygen
|
||||
#from the clean command! This is because most people would like to keep the
|
||||
#nice pre-compiled crypt.pdf that comes with libtomcrypt! We only need to
|
||||
#delete it if we are rebuilding it.
|
||||
.PHONY: crypt.pdf
|
||||
crypt.pdf: crypt.tex
|
||||
docs crypt.pdf: crypt.tex
|
||||
rm -f crypt.pdf $(LEFTOVERS)
|
||||
cp crypt.tex crypt.bak
|
||||
touch -r crypt.tex crypt.bak
|
||||
@ -52,3 +51,7 @@ docdvi: crypt.tex
|
||||
perl ../helper.pl --fixupind crypt.ind
|
||||
latex crypt $(silent_stdout)
|
||||
latex crypt $(silent_stdout)
|
||||
|
||||
clean:
|
||||
rm -f $(LEFTOVERS)
|
||||
rm -rf doxygen/
|
||||
|
@ -217,7 +217,7 @@ sub patch_makefile {
|
||||
sub version_form_tomcrypt_h {
|
||||
my $h = read_file(shift);
|
||||
if ($h =~ /\n#define\s*SCRYPT\s*"([0-9]+)\.([0-9]+)"/s) {
|
||||
return "VERSION_MAJ=$1", "VERSION_MIN=$2", "VERSION=$1.$2", "VERSION_LT=0:$1$2";
|
||||
return "VERSION=$1.$2", "VERSION_LT=0:$1$2";
|
||||
}
|
||||
else {
|
||||
die "#define SCRYPT not found in tomcrypt.h";
|
||||
|
@ -9,13 +9,10 @@ bins: $(USEFUL_DEMOS)
|
||||
all_test: test tv_gen $(DEMOS)
|
||||
|
||||
#build the doxy files (requires Doxygen, tetex and patience)
|
||||
doxygen:
|
||||
$(MAKE) -C doc/ doxygen V=$(V)
|
||||
doxygen doxy docs:
|
||||
$(MAKE) -C doc/ $@ V=$(V)
|
||||
|
||||
doxy:
|
||||
$(MAKE) -C doc/ doxy V=$(V)
|
||||
|
||||
docs:
|
||||
doc/crypt.pdf:
|
||||
$(MAKE) -C doc/ crypt.pdf V=$(V)
|
||||
|
||||
|
||||
@ -38,7 +35,7 @@ install_all: install install_bins install_docs install_test
|
||||
install -m 644 testprof/tomcrypt_test.h $(INCPATH)
|
||||
$(INSTALL_CMD) -m 644 $(LIBTEST) $(LIBPATH)
|
||||
|
||||
install_docs: docs
|
||||
install_docs: doc/crypt.pdf
|
||||
install -d $(DATAPATH)
|
||||
install -m 644 doc/crypt.pdf $(DATAPATH)
|
||||
|
||||
@ -48,28 +45,26 @@ install_hooks:
|
||||
#This rule cleans the source tree of all compiled code, not including the pdf
|
||||
#documentation.
|
||||
clean:
|
||||
rm -f `find . -type f -name "*.o" | xargs`
|
||||
rm -f `find . -type f -name "*.lo" | xargs`
|
||||
rm -f `find . -type f -name "*.a" | xargs`
|
||||
rm -f `find . -type f -name "*.la" | xargs`
|
||||
rm -f `find . -type f -name "*.obj" | xargs`
|
||||
rm -f `find . -type f -name "*.lib" | xargs`
|
||||
rm -f `find . -type f -name "*.exe" | xargs`
|
||||
rm -f `find . -type f -name "*.dll" | xargs`
|
||||
rm -f `find . -type f -name "*.so" | xargs`
|
||||
rm -f `find . -type f -name "*.gcov" | xargs`
|
||||
rm -f `find . -type f -name "*.gcda" | xargs`
|
||||
rm -f `find . -type f -name "*.gcno" | xargs`
|
||||
rm -f `find . -type f -name "*.il" | xargs`
|
||||
rm -f `find . -type f -name "*.dyn" | xargs`
|
||||
rm -f `find . -type f -name "*.dpi" | xargs`
|
||||
rm -rf `find . -type d -name "*.libs" | xargs`
|
||||
rm -f crypt.aux crypt.dvi crypt.idx crypt.ilg crypt.ind crypt.log crypt.toc
|
||||
find . -type f -name "*.o" \
|
||||
-o -name "*.lo" \
|
||||
-o -name "*.a" \
|
||||
-o -name "*.la" \
|
||||
-o -name "*.obj" \
|
||||
-o -name "*.lib" \
|
||||
-o -name "*.exe" \
|
||||
-o -name "*.dll" \
|
||||
-o -name "*.so" \
|
||||
-o -name "*.gcov"\
|
||||
-o -name "*.gcda"\
|
||||
-o -name "*.gcno"\
|
||||
-o -name "*.il" \
|
||||
-o -name "*.dyn" \
|
||||
-o -name "*.dpi" | xargs rm -f
|
||||
rm -f $(TIMING) $(TEST) $(DEMOS)
|
||||
rm -rf doc/doxygen
|
||||
rm -f `find . -type f -name "*.pdf" | grep -FL crypt.pdf | xargs`
|
||||
rm -f *.txt
|
||||
rm -f *_tv.txt
|
||||
rm -f *.pc
|
||||
rm -rf `find . -type d -name "*.libs" | xargs`
|
||||
$(MAKE) -C doc/ clean
|
||||
|
||||
zipup: docs
|
||||
@git diff-index --quiet HEAD -- || ( echo "FAILURE: uncommited changes or not a git" && exit 1 )
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Include makefile for libtomcrypt
|
||||
#
|
||||
|
||||
# The version
|
||||
# The version - BEWARE: VERSION and VERSION_LT are updated via ./updatemakes.sh
|
||||
VERSION=1.17
|
||||
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
|
||||
VERSION_LT=0:117
|
||||
|
@ -18,19 +18,14 @@ endif
|
||||
LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
|
||||
INSTALL_CMD = $(LT) --mode=install install
|
||||
|
||||
|
||||
#Output filenames for various targets.
|
||||
ifndef LIBTEST_S
|
||||
LIBTEST_S=libtomcrypt_prof.a
|
||||
endif
|
||||
ifndef LIBTEST
|
||||
LIBTEST=libtomcrypt_prof.la
|
||||
endif
|
||||
ifndef LIBNAME
|
||||
LIBNAME=libtomcrypt.la
|
||||
endif
|
||||
ifndef LIBNAME_S
|
||||
LIBNAME_S=libtomcrypt.a
|
||||
endif
|
||||
|
||||
#ciphers come in two flavours... enc+dec and enc
|
||||
src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
|
||||
|
@ -3,7 +3,7 @@
|
||||
version=$(git describe --tags --always --dirty 2>/dev/null)
|
||||
if [ ! -e ".git" ] || [ -z $version ]
|
||||
then
|
||||
version=$(grep "^VERSION=" makefile | sed "s/.*=//")
|
||||
version=$(grep "^VERSION=" makefile.include | sed "s/.*=//")
|
||||
fi
|
||||
echo "Testing version:" $version
|
||||
#grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"`
|
||||
|
Loading…
Reference in New Issue
Block a user