1 tplarson 1.16 # $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/Rules.mk,v 1.15 2015/05/20 19:17:10 tplarson Exp $
|
2 tplarson 1.2
|
3 tplarson 1.1 sp := $(sp).x
4 dirstack_$(sp) := $(d)
5 d := $(dir)
6
|
7 tplarson 1.7 # any modules specified in proj/globalhs/apps must appear in this list.
8 # one might think to add the libraries in proj/globalhs/libs as well,
9 # but it's actually unnecessary because they are forced to be recompiled
10 # every time the modules that use them are recompiled, whether they are
11 # out of date or not. see the phony targets in the corresponding Rules.mk files.
|
12 tplarson 1.10 # UPDATE: i'm adding the libraries after all, just in case someone wants to
13 # specify them as a target on the commandline. for the globalhs modules,
14 # this is never needed.
|
15 tplarson 1.12 GLOBALHSMODLIST := jv2ts jretile jtsfiddle jtsslice jpkbgn jpkbgn360d jrebinsmooth undistortmdi mkylms inv2d.x
|
16 tplarson 1.11 GLOBALHSLIBLIST := libdtgf.a libinv2d.a libpkbgn.a libpkbgn360d.a libprojection.a
|
17 tplarson 1.7
|
18 tplarson 1.8 define GHSWARNING1
19
20 WARNING: proj/globalhs is not tagged consistently. A build of any target
21 in proj/globalhs will fail. The output of script
22 proj/globalhs/scripts/checkglobalhstags is "$(GLOBALHS_TAG)".
23
24 To skip tag checking (FOR DEVELOPMENT ONLY!), specify GLOBALHSTAGOVERRIDE
|
25 tplarson 1.14 in either your environment or on the make command line. This value will
|
26 tplarson 1.8 be compiled into the modules and written to ancillary dataseries as CVSTAG.
27
28 To automatically create a consistent tag (FOR PRODUCTION ONLY!), one may run
29 proj/globalhs/scripts/setglobalhstags. This script will add a tag in cvs
30 for every file comprising the globalhs source code, so use it with care.
31
32 endef
33
|
34 tplarson 1.14 #the following is no longer used, GLOBALHSTAGOVERRIDE can be any string
|
35 tplarson 1.8 define GHSWARNING2
36
37 WARNING: GLOBALHSTAGOVERRIDE should contain the string "globalhs".
38 The value given was "$(GLOBALHSTAGOVERRIDE)".
39 A build of any target in proj/globalhs will fail.
40 Note that the value of GLOBALHSTAGOVERRIDE will be compiled into
41 the modules and written to ancillary dataseries as CVSTAG.
42
43 endef
44
|
45 tplarson 1.11 define GHSWARNING3
46
47 WARNING: the script proj/globalhs/scripts/checkglobalhstags gave no output (something
|
48 tplarson 1.14 crashed). You can force the build to succeed by specifying GLOBALHSTAGOVERRIDE. This
49 value will be compiled into the modules and written to ancillary dataseries as CVSTAG.
50 This option is FOR DEVELOPMENT ONLY!
|
51 tplarson 1.11
52 endef
53
|
54 tplarson 1.15 # commented lines below are to accomodate removal of globalhs from the default build
|
55 tplarson 1.11
|
56 tplarson 1.6 ifeq ($(GLOBALHSTAGOVERRIDE),)
|
57 tplarson 1.15 # ifeq ($(MAKECMDGOALS),)
58 # GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
59 # ifeq ($(GLOBALHS_TAG),)
60 # $(error $(GHSWARNING3))
61 # endif
62 # TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
63 # ifeq ($(TAGCHECK),)
64 # $(error $(GHSWARNING1))
65 # endif
66 # else
|
67 tplarson 1.6 GHSMODLIST_SOCK := $(GLOBALHSMODLIST:%=%_sock)
|
68 tplarson 1.16 GHSTARGETLIST := globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK) $(GLOBALHSLIBLIST)
69 # GHSTARGETLIST := all universe targets globalhs $(GLOBALHSMODLIST) $(GHSMODLIST_SOCK) $(GLOBALHSLIBLIST)
|
70 tplarson 1.7 # if we added '%' before all the words in GLOBALHSMODLIST, the following would work even if someone specified the full path to the modules.
71 # if we added '%' after, it would also work if someone wanted to compile the .o files.
72 # i'm not doing so at this time because inserting literal %'s is too much hassle for functionality we don't even use.
73 GHSTARGETTEST := $(filter $(GHSTARGETLIST),$(MAKECMDGOALS))
|
74 tplarson 1.6 ifneq ($(GHSTARGETTEST),)
75 GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
|
76 tplarson 1.11 ifeq ($(GLOBALHS_TAG),)
|
77 tplarson 1.13 $(error $(GHSWARNING3))
|
78 tplarson 1.11 endif
|
79 tplarson 1.6 TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
80 ifeq ($(TAGCHECK),)
|
81 tplarson 1.13 $(error $(GHSWARNING1))
|
82 tplarson 1.6 endif
83 endif
|
84 tplarson 1.15 # endif
|
85 tplarson 1.6 else
86 GLOBALHS_TAG := $(GLOBALHSTAGOVERRIDE)
|
87 tplarson 1.14 # TAGCHECK := $(findstring globalhs,$(GLOBALHS_TAG))
88 # ifeq ($(TAGCHECK),)
89 # $(error $(GHSWARNING2))
90 # endif
|
91 tplarson 1.2 endif
92
|
93 tplarson 1.1 # Subdirectories. Directory-specific rules are optional here. The
|
94 tplarson 1.2 # order does NOT matter.
95 dir := $(d)/libs
96 -include $(SRCDIR)/$(dir)/Rules.mk
|
97 tplarson 1.1 dir := $(d)/apps
98 -include $(SRCDIR)/$(dir)/Rules.mk
99
100 # Standard things
101 d := $(dirstack_$(sp))
102 sp := $(basename $(sp))
|