File: Makelocal-install

package info (click to toggle)
cod-tools 3.7.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 154,792 kB
  • sloc: perl: 57,588; sh: 36,842; ansic: 6,402; xml: 1,982; yacc: 1,117; makefile: 727; python: 166
file content (31 lines) | stat: -rw-r--r-- 1,372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#--*- Makefile -*--------------------------------------------------------------
#$Author: antanas $
#$Revision: 8840 $
#$Date: 2021-07-30 19:52:52 +0300 (Fri, 30 Jul 2021) $
#$URL: svn+ssh://www.crystallography.net/home/coder/svn-repositories/cod-tools/tags/v3.7.0/Makelocal-install $
#------------------------------------------------------------------------------

# Collecting Perl binaries and libraries:

CODTOOLS_LIBS = $(shell find src/lib/perl5 -name .svn -prune -o \
                                           -name lib -prune -o \
                                           -name AdHoc.pm -prune -o \
                                           -name Bison.pm -prune -o \
                                           -name IUCr.pm -prune -o \
                                           -name SPGLib.pm -prune -o \
                                           -name Yapp.pm -prune -o \
                                           -name \*.pm -print)

build:
	$(MAKE) -C src

install: build src/lib/perl5/COD/ToolsVersion.pm
	$(MAKE) install -C src PREFIX=${PREFIX}
	test -d ${BIN_INSTALL_DIR} || mkdir -p ${BIN_INSTALL_DIR}
	install ${CODTOOLS_SCRIPTS} ${BIN_INSTALL_DIR}
	for i in ${CODTOOLS_LIBS:src/lib/%=%}; \
	do \
		test -d ${PREFIX}/lib/$$(dirname $$i) \
			|| mkdir -p ${PREFIX}/lib/$$(dirname $$i); \
		install --mode 644 src/lib/$$i ${PREFIX}/lib/$$i; \
	done