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