| Index: src/tlcl/Makefile
|
| diff --git a/src/tlcl/Makefile b/src/tlcl/Makefile
|
| index cb59b95c7002a8274e91ae10eb87c30eac6e8076..791ff5da1fec74dad1f8ab34f20d53d221033929 100644
|
| --- a/src/tlcl/Makefile
|
| +++ b/src/tlcl/Makefile
|
| @@ -18,18 +18,25 @@ HOSTCC = cc
|
| libtlcl.a: tlcl.o
|
| ar rcs libtlcl.a tlcl.o
|
|
|
| -tlcl.o: tlcl.c tlcl_internal.h tlcl.h structures.h
|
| +tlcl.o: tlcl.c tlcl_internal.h tlcl.h \
|
| + update-structures structures.h update-version version.h
|
|
|
| -structures.h: generator
|
| - ./generator > structures.h
|
| - sed -e '0,/This file is automatically/d' < structures.h > x.tmp
|
| - sed -e '0,/This file is automatically/d' < saved-structures.h > y.tmp
|
| - cmp -s x.tmp y.tmp || \
|
| - (echo "Please update saved-structures.h" && false)
|
| +update-structures: generator
|
| + ./generator > structures.tmp
|
| + cmp -s structures.tmp structures.h || \
|
| + ( echo "%% Updating structures.h %%" && \
|
| + cp structures.tmp structures.h )
|
| +
|
| +update-version:
|
| + find \( -name '*.[ch]' -o -name 'Makefile*' \) -a \! -name version.h \
|
| + | sort | xargs cat | md5sum | cut -c 25-32 > x.tmp
|
| + echo "char* TlclVersion = \"TLCLv=$$(cat x.tmp)\";" > version.tmp
|
| + cmp -s version.tmp version.h || \
|
| + ( echo "** Updating version.h **" && cp version.tmp version.h )
|
|
|
| generator: generator.c tlcl.h
|
| $(HOSTCC) $(LOCAL_CFLAGS) -I$(ROOT)/usr/include \
|
| -fpack-struct generator.c -o generator
|
|
|
| clean:
|
| - rm -f generator *.o *.a structures.h x.tmp y.tmp *~
|
| + rm -f generator *.o *.a version.tmp structures.tmp x.tmp *~
|
|
|