forked from casacore/casacore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
210 lines (177 loc) · 6.71 KB
/
makefile
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
#-----------------------------------------------------------------------------
# AIPS++ top directory makefile.
#-----------------------------------------------------------------------------
#
# Copyright (C) 1992-2004
# Associated Universities, Inc. Washington DC, USA.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# Correspondence concerning AIPS++ should be addressed as follows:
# Internet email: [email protected].
# Postal address: AIPS++ Project Office
# National Radio Astronomy Observatory
# 520 Edgemont Road
# Charlottesville, VA 22903-2475 USA
#
#-----------------------------------------------------------------------------
# GNU makefile used to build all of AIPS++.
#
# Original: 1992/05/01 by Mark Calabretta, ATNF.
# $Id$
#=============================================================================
# AIPS++ fundamentals.
#---------------------
AIPSROOT := $(word 1, $(AIPSPATH))
AIPSARCH := $(AIPSROOT)/$(word 2, $(AIPSPATH))
include $(AIPSARCH)/makedefs
# Directory containing symbolic links.
#-------------------------------------
SYMDIR := include
# Directory symlinks.
#--------------------
ifdef AIPSRCS
INCLINKS := $(patsubst $(AIPSRCS)/%/implement,include/%, \
$(wildcard $(AIPSRCS)/*/implement))
else
INCLINKS := $(patsubst $(AIPSCODE)/%/implement,include/%, \
$(wildcard $(AIPSCODE)/*/implement))
endif
# appsglish/apps symlink is needed to compile the megaserver
INCLINKS += include/appsglish
# Subdirectories in which to invoke "allsys", in order.
#------------------------------------------------------
ALLSYSD := install $(AIPSGLISH) $(PACKAGES)
# Should only exist in consortium installations.
ALLSYSD += admin
# Add auxiliary and consortium directories, if any.
ALLSYSD += $(AUXILIARY) $(CONSORTIA)
# Compile documentation?
ALLSYSD += $(DOCSYS)
# Check for existence and convert to absolute pathnames.
ALLSYSD := $(addprefix $(CODEDIR)/,$(wildcard $(ALLSYSD)))
# Reorder CODESUBS to match ALLSYSD as far as possible (mainly for "chkout").
#----------------------------------------------------------------------------
CODESUBS := $(filter $(CODESUBS),$(ALLSYSD)) \
$(filter-out $(ALLSYSD),$(CODESUBS))
# Static and static pattern rules.
#---------------------------------
.PHONY : symlinks
allsys : symlinks sysdirs $(ALLSYSD) $(DOCEXTR)
.cleansys ::
-$Q cd $(ARCHAUXD) && $(RM) docscan docscan.* docextr.*
symlinks : $(SYMDIR) $(INCLINKS) ;
$(SYMDIR) :
mkdir $@
chmod ug=rwx,g+s,o=rx $@
# appsglish/apps symlink is needed to compile the megaserver
$(INCLINKS) :
-@ rm -f $@
if [ -d $(@F)/implement ] ; then \
ln -s ../$(@F)/implement $@ ; \
else \
ln -s ../$(@F)/apps $@ ; \
fi
docsys : $(DOCSYS)
atoms :
$(MAKE) -C $(addprefix $(CODEDIR)/, doc/user) atoms
resolvedocs :
grep externallabels $(addprefix $(CODEDIR)/, doc/*/*.latex) | awk -F: '{print $$1}' | sort -u> $(ARCHTMPD)/labels.file ; \
grep externallabels $(addprefix $(CODEDIR)/, doc/*/*/*.latex) | awk -F: '{print $$1}' | sort -u>> $(ARCHTMPD)/labels.file ; \
for filename in `cat $(ARCHTMPD)/labels.file | sed -e 's/code.doc/docs/g' | sed -e 's/latex/ps.gz/g' | sed -e 's/\.dir.*gz/.ps.gz/g'` ; do \
echo $$filename ; \
if [ -e $$filename ] ; then \
rm $$filename ; \
fi \
done
$(MAKE) -C $(addprefix $(CODEDIR)/, doc)
docscan docextr :
@ for i in $(ALLSYSD) ; do \
echo "" ; \
echo gmake[$(MAKELEVEL)]: $(MAKE) -C $$i $@ ; \
$(MAKE) -C $$i $@ ; \
done
changelogs :
-@ rm -rf $(AIPSROOT)/docs/project/releasenotes/changelogs
mkdir $(AIPSROOT)/docs/project/releasenotes/changelogs
buildchangelog -split module -dir $(AIPSROOT)/docs/project/releasenotes/changelogs $(AIPSROOT)/code
docdoxy : $(AIPSDOCS)/doxygen
@ cp $(DOXYGENCFG) $</doxygen.cfg; \
if [ "$(DOXYDOT)" != "" ]; then \
echo "HAVE_DOT = YES" >> $</doxygen.cfg; \
echo "DOT_PATH = $(DOXYDOT)" >> $</doxygen.cfg; \
fi; \
echo "OUTPUT_DIRECTORY = $<" >> $</doxygen.cfg; \
echo "STRIP_FROM_PATH = $(AIPSCODE)" >> $</doxygen.cfg; \
echo "INPUT = $(DOXYPACKAGES)" >> $</doxygen.cfg; \
echo "INPUT_FILTER = $(AIPSARCH)/bin/doxygen_pp" >> $</doxygen.cfg; \
echo "GENERATE_TAGFILE = $</aipspp.tag" >> $</doxygen.cfg; \
$(RM) $</doxygen.log;
$(DOXYGEN) $</doxygen.cfg 2>&1 > $</doxygen.log
$(AIPSDOCS)/doxygen :
-@ echo ""
@ amkdir -p ug=rwx,g+s,o=rx -v $@
runtests :
@ for i in $(ALLSYSD) ; do \
echo "" ; \
echo gmake[$(MAKELEVEL)]: $(MAKE) -C $$i $@ ; \
$(MAKE) -C $$i $@ ; \
done
-@ if [ -f $(AIPSARCH)/bintest/runtests.report ] ; then \
echo "" ; \
echo "" ; \
echo "Summary of test results" ; \
echo "-----------------------" ; \
cat $(AIPSARCH)/bintest/runtests.report ; \
fi
##
## developer's release targets
##
drupdate :
@ mktree -l -r -s
@ $(MAKE) 'NODEP=1' cleancode
@ $(MAKE) 'NODEP=1' chkout
drbuild :
@ $(MAKE) allsys
# Programmer-oriented static and static pattern rules.
ifeq "$(MAKEMODE)" "programmer"
all : symlinks
endif
show_local :
-@ echo ""
-@ echo "Variables defined in the top-level makefile"
-@ echo "==========================================="
-@ echo ""
-@ echo "SYMDIR =$(SYMDIR)"
-@ echo "INCLINKS=$(INCLINKS)"
-@ echo "ALLSYSD =$(ALLSYSD)"
help ::
-@ echo ""
-@ echo "Targets defined in the top-level makefile"
-@ echo "========================================="
-@ echo ""
-@ echo "System"
-@ echo "------"
-@ echo " symlinks: create include file symlinks."
-@ echo " docsys: compile all documentation."
-@ echo " docscan: scan C++ sources for cxx2html class information."
-@ echo " docextr: extract cxx2html documentation from C++ headers."
-@ echo " docdoxy: extract doxygen documentation from C++ headers."
-@ echo " changelogs: build the changelog html files."
-@ echo " runtests: run all test programs."
-@ echo ""
-@ echo "Programmer"
-@ echo "----------"
-@ echo " symlinks: create include file symlinks."