File: make.targets

package info (click to toggle)
hdf-eos5 5.1.13.dfsg.1-3
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 23,304 kB
  • sloc: ansic: 77,198; fortran: 32,428; sh: 9,521; makefile: 609; csh: 4
file content (76 lines) | stat: -rwxr-xr-x 2,339 bytes parent folder | download | duplicates (11)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#########################################################################
#
# Name
#	make.targets
#
# Purpose
#
#	Common targets for build. Must be included in the Makefile at
#	the end. See the template makefile for instructions.
#
##########################################################################


###############install####################################################
## Installs the files to release directory. CM use only.

LIBRARYFILES    := $(strip $(INSLIBFILES) )
BINARYFILES    := $(strip $(INSBINFILES) )
HEADERFILES    := $(strip $(INSHFILES) )
DOCUMENTATIONFILES := $(strip $(INSDOCFILES) )
EMPTY       := $(strip, " ")

install:: installbinaryfiles \
	installlibraryfiles

installbinaryfiles::
	@echo "$(B) Checking for binary files to Install ..."
	@if [ "$(BINARYFILES)" = "$(EMPTY)" ] ; then \
		echo "$(B) No binary files to Install ..." ; \
	else \
		if [ ! -d $(SUBSYSTOP)/install/bin ] ; then \
			mkdir -p $(SUBSYSTOP)/install/bin ; \
		fi ; \
		echo "$(B) Installing $(INSBINFILES) ..." ; \
		cp $(INSBINFILES) $(SUBSYSTOP)/install/bin ; \
		chmod ug+w $(SUBSYSTOP)/install/bin/* ; \
	fi

installlibraryfiles::
	@echo "$(B) Checking for library files to Install ..."
	@if [ "$(LIBRARYFILES)" = "$(EMPTY)" ] ; then \
		echo "$(B) No library files to Install ..." ; \
	else \
		echo "$(B) Installing $(INSLIBFILES) ..." ; \
		cd $(SUBSYSTOP)/lib/$(ARCH) ; \
		$(CMTOP)/COMMON/make/instvobele.sh $(INSLIBFILES) ; \
	fi


###############installdir#################################################
## install for te directory (access to others ??)
installdir:
	@echo Installdir target executed ! Nothing done !!


###############test#######################################################
## builds all the test subdirectories recursively. Uses variable
## TESTSUBDIRS specified in the makefile.

test::
	@for DIR in $(TESTSUBDIRS); do \
		(echo "$B Building directory $$DIR ..." ; B="${B}  "; export B; cd $$DIR; $(MAKECMD) ) \
	done
 
	
###############testclean##################################################
## cleans all the test subdirectories recursively. Uses variable
## TESTSUBDIRS specified in the makefile.

testclean::
	@for DIR in $(TESTSUBDIRS); do \
		(echo "$B Cleaning $$DIR ..."; B="${B}  "; export B; cd $$DIR; $(MAKECMD) clean ) \
	done
 

include $(CMTOP)/COMMON/make/makecm.targets