source: pcp/src/Makefile.am@ 20a828

Last change on this file since 20a828 was ef87ee, checked in by Frederik Heber <heber@…>, 16 years ago

Added versioning to each executable.

  • credits to Ralf Wildenhues for writing the Makefile.am code
  • version.c section added to Makefile.am (pcp, molecuilder and util)
  • src/version.h to each pcp, molecuilder and util
  • each of the executables includes version.h and prints version in main()

Signed-off-by: Frederik Heber <heber@…>

  • Property mode set to 100755
File size: 1022 bytes
Line 
1SOURCE = density.c energy.c errors.c excor.c grad.c gramsch.c helpers.c init.c ions.c mergesort2.c myfft.c mymath.c opt.c output.c pcp.c pdbformat.c perturbed.c pseudo.c riemann.c run.c wannier.c
2HEADER = data.h defs.h density.h energy.h errors.h excor.h grad.h gramsch.h helpers.h init.h ions.h mergesort2.h myfft.h mymath.h opt.h output.h pcp.h pdbformat.h perturbed.h pseudo.h riemann.h run.h wannier.h
3
4bin_PROGRAMS = pcp
5pcp_SOURCES = ${SOURCE} ${HEADER}
6
7FORCE:
8$(srcdir)/.git-version: FORCE
9 @if (test -d $(top_srcdir)/../.git && cd $(srcdir) && git describe --tags HEAD) > .git-version-t 2>/dev/null \
10 && ! diff .git-version-t $(srcdir)/.git-version >/dev/null 2>&1; then \
11 mv -f .git-version-t $(srcdir)/.git-version; \
12 else \
13 rm -f .git-version-t; \
14 fi
15
16EXTRA_DIST = $(srcdir)/.git-version
17
18$(srcdir)/version.c: $(srcdir)/.git-version
19 echo "const char *ESPACKVersion = \"$(PACKAGE_NAME) -- git version: "`cat $(srcdir)/.git-version`"\";" > $@
20
21pcp_SOURCES += $(srcdir)/version.c
Note: See TracBrowser for help on using the repository browser.