File: Imakefile

package info (click to toggle)
lcgdm 1.10.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,532 kB
  • sloc: ansic: 226,887; sh: 13,562; perl: 11,575; python: 11,572; cpp: 5,716; sql: 1,824; makefile: 1,301; fortran: 113
file content (145 lines) | stat: -rw-r--r-- 3,411 bytes parent folder | download | duplicates (3)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
COMM       @(#)$RCSfile: Imakefile,v $ $Revision: 1.34 $ $Date: 2009/02/18 23:14:09 $ CERN IT-PDP/DM Jean-Philippe Baud
COMM
COMM  Copyright (C) 1990-2008 by CERN/IT/PDP/DM
COMM  All rights reserved
COMM

COMM		Make DPM/LFC libraries and executables

#include <Project.tmpl>

include VERSION
#if BuildNameServerAsLFC
PACKAGE = LFC
#else
#if BuildNameServerAsDPNS
PACKAGE = DPM
#else
PACKAGE = lcg-dm-common
#endif
#endif

#if UseOracle
SPECFILE = $(PACKAGE)-oracle.spec
#else
#if UsePostgres
SPECFILE = $(PACKAGE)-postgres.spec
#else
SPECFILE = $(PACKAGE).spec
#endif
#endif

SUBDIRS = h $(LIBDIR) $(SHLIBDIR) $(COMMONDIR) $(NSDIR) $(RFIODIR) $(DPMDIR) \
	  $(SRMV1DIR) $(SRMV2DIR) $(SRMV2_2DIR) $(SECURITYDIR) $(DLIDIR) \
	  $(DICOMCOPYDIR) $(DPMCOPYDIR)
#if BuildSecurity
SECURITY = sec
#endif
distdir = $(PACKAGE)-$(VERSION)
sources = Imakefile Makefile.ini Makefile.ini.Win32 README VERSION \
	config test setosflags configure doc scripts $(SUBDIRS)

EXPORTSUBDIRS = $(LIBDIR) $(SHLIBDIR) $(COMMONDIR) $(NSDIR) h

DEPENDDIRS = $(COMMONDIR) $(NSDIR) $(RFIODIR) $(DPMDIR) $(SRMV1DIR) $(SRMV2DIR) \
	     $(SRMV2_2DIR) $(SECURITYDIR) $(DLIDIR) $(DICOMCOPYDIR) $(DPMCOPYDIR)

EXPORTBIN=$(EXPORT)/bin
EXPORTSBIN=$(EXPORT)/sbin
EXPORTLIB=$(EXPORT)/lib
EXPORTINC=$(EXPORTSHR)/include
EXPORTH=$(EXPORTINC)/shift

MakeSubdirs(all,$(SUBDIRS))
MakeSubdirs(install,$(SUBDIRS))
MakeSubdirs(install.man,$(SUBDIRS))
MakeSubdirs(clean,$(SUBDIRS))
MakeSubdirs(clobber,$(SUBDIRS))

export:
	(if [ "x$(EXPORT)" = "x" ] ; \
	 then \
	 echo "EXPORT must be set (thru make or environment)" ; exit 1 ; \
	 else \
	 echo "exporting to $(EXPORT)" ; \
	fi ; \
	for i in $(EXPORTSUBDIRS) ;\
	do (echo " $$i (EXPORT):" ; cd $$i ; \
	    $(MAKE) $(MFLAGS) EXPORTSBIN=$(EXPORTSBIN) EXPORTBIN=$(EXPORTBIN) EXPORTLIB=$(EXPORTLIB) $@ ; \
	 ) ; done ; \
	) ;

exportman:
	(if [ "x$(EXPORTMAN)" = "x" ] ; \
	 then \
	 echo "EXPORTMAN must be set (thru make or environment)" ; exit 1 ; \
	 else \
	 echo "exporting to $(EXPORTMAN)" ; \
	fi ; \
	for i in $(EXPORTSUBDIRS) ;\
	do (echo " $$i (EXPORTMAN):" ; cd $$i ; \
	    $(MAKE) $(MFLAGS) EXPORTMAN=$(EXPORTMAN) $@ ; \
	 ) ; done ; \
	) ;

exportshr:
	(if [ "x$(EXPORTSHR)" = "x" ] ; \
	 then \
	 echo "EXPORTSHR must be set (thru make or environment)" ; exit 1 ; \
	 else \
	 echo "exporting to $(EXPORTSHR)" ; \
	fi ; \
	for i in $(EXPORTSUBDIRS) ;\
	do (echo " $$i (EXPORTSHR):" ; cd $$i ; \
	    $(MAKE) $(MFLAGS) EXPORTSHR=$(EXPORTSHR) EXPORTINC=$(EXPORTINC) EXPORTH=$(EXPORTH) $@ ; \
	 ) ; done ; \
	) ;

#if defined(_WIN32)
test: Makefiles
	cd test & $(MAKE) all & cd ..

Makefiles:
	@for %i in ( $(SUBDIRS) test ) \
	do @(echo %i - & cd %i & \
		imake -Ui386 -I..\config ; \
		$(MAKE) $(MFLAGS) $@ & cd .. )

depend:
	@echo Not supported on this platform
#else
test: Makefiles
	(cd test; $(MAKE) all)

Makefiles:
	for i in $(SUBDIRS) test ;\
	do (echo " $$i:" ; cd $$i ;\
		imake -Ui386 -I../config ;\
		$(MAKE) $(MFLAGS) $@ \
	) ; done ;

depend:
	for i in $(DEPENDDIRS) test ;\
	do (echo " $$i:" ; cd $$i ;\
		$(MAKE) $(MFLAGS) $@ \
	) ; done ;

dist:
	-rm -rf $(distdir)
	mkdir $(distdir)
	-cp -rp $(sources) $(distdir)
	tar cvzf $(distdir).src.tar.gz $(distdir)
	-rm -rf $(distdir)

OS=$(shell scripts/get-platform-os)

rpm:
	$(MAKE) -C rpm rpm-$(PACKAGE)-mysql

rpm-oracle : 
	$(MAKE) -C rpm rpm-$(PACKAGE)-oracle

rpm-postgres : 
	$(MAKE) -C rpm rpm-$(PACKAGE)-postgres

#endif