-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile.in
140 lines (130 loc) · 4 KB
/
Makefile.in
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
###############################################################################
# Sloan Digital Sky Survey (SDSS)
# N. Padmanabhan, D. Schlegel, D. Finkbeiner, R. H. Lupton, C. P. Loomis
###############################################################################
SHELL = /bin/sh
VERSION="`env EUPS_DIR=. PYTHONPATH=python bin/eups --version 2>&1 | awk '/Version/ {print $$3}'`"
#
# Set by configure
#
prefix = @prefix@
EUPS_PATH = @EUPS_PATH@
EUPS_DIR = @EUPS_DIR@
SETUP_ALIASES = @SETUP_ALIASES@
EUPS_PYTHON = @EUPS_PYTHON@
EUPS_DB = $(patsubst %,%/ups_db, $(subst :, ,$(EUPS_PATH)))
#
export prefix EUPS_PATH EUPS_DIR SETUP_ALIASES EUPS_PYTHON
#
SUBDIRS = @MAKE_SUBDIRS@
.PHONY : all show install clean test tests
all : show
@ echo
@ echo Please use \"make install\" if you want to install eups
install : show
@:
@: Check the inode number for . and $(EUPS_DIR) to find out if two
@: directories are the same\; they may have different names due to
@: symbolic links and automounters
@:
@if [ -d "$(EUPS_DIR)" ]; then \
if [ `ls -id "$(EUPS_DIR)" | awk '{print $$1}'` = `ls -id . | awk '{print $$1}'` ]; then \
echo "The destination directory is the same" \
"as the current directory; aborting." >&2; \
echo ""; \
exit 1; \
fi; \
fi
@:
@: Delete the contents of $EUPS_DIR, if exists, keeping only the 'site' subdirectory
@:
@ if [ -d "$(EUPS_DIR)" ]; then \
chmod -R u+w "$(EUPS_DIR)"/* ; \
for f in "$(EUPS_DIR)"/*; do \
if [ -d "$$f" ] && [ `basename "$$f"` != "site" ]; then \
rm -r "$$f"; \
fi; \
done; \
else \
mkdir -p "$(EUPS_DIR)"; \
fi
@:
@: Create EUPS database directories for each entry on EUPS_PATH
@:
@if [ "$(EUPS_PATH)" = "" ]; then \
echo You have not specified EUPS_PATH >&2; \
exit 1; \
fi
@ for d in "$(shell perl -e 'foreach $$d (split(":","$(EUPS_PATH)")) { print "$$d\n"}')"; do \
if [ ! -d "$$d" ]; then \
mkdir -p "$$d"; \
fi; \
done
@ for db in "$(EUPS_DB)"; do \
if [ -d "$$db" ]; then \
echo "EUPS database $$db already exists"; \
else \
mkdir -p "$$db"; \
fi; \
done
@:
@: Run make in each subdirectory
@:
@ for f in $(SUBDIRS); do \
(\
if [ ! -d "$(EUPS_DIR)"/$$f ]; then mkdir "$(EUPS_DIR)"/$$f; fi; \
cd $$f ; \
echo In $$f; $(MAKE) $(MFLAGS) install \
); \
done
- cp Makefile README Release_Notes gpl.txt "$(EUPS_DIR)"
echo $(VERSION) > "$(EUPS_DIR)/git.version"
@echo "Remember to source $(EUPS_DIR)/bin/setups.{c,z,}sh"
declare :
@vers="$(VERSION)"; \
eups declare --root $(EUPS_DIR) eups $$vers && \
echo eups declare --root $(EUPS_DIR) eups $$vers
show : git.version
@echo "Eups will use @EUPS_PYTHON@"
@echo "You will be installing ups in \$$EUPS_DIR = $(EUPS_DIR)"
@echo "Eups will look for products in \$$EUPS_PATH = $(EUPS_PATH)"
@echo "Your EUPS database[s] will be $(EUPS_DB)"
@echo "Your EUPS version is $(VERSION)"
@ \
EUPS_DB_DIR=`echo "$(EUPS_PATH)" | sed -e 's/:.*//'`; \
if [ -d "$$EUPS_DB_DIR/site" ]; then \
echo "Your site configuration files are:"; \
for f in "$$EUPS_DB_DIR"/site/*[a-z]; do \
if [ -n "`echo $$f | grep -v Makefile`" ]; then \
echo " $$f"; \
fi; \
done; \
else \
echo "Your site configuration files will be in $$EUPS_DB_DIR/site"; \
fi
git.version :
# Save the git version in case we have a copy of the source without a .git directory
@ env EUPS_DIR=. PYTHONPATH=python \
"$(EUPS_PYTHON)" -S -c "import eups.utils; print eups.utils.version()" > git.version
#
# Rebuild configure; almost no-one should need to do this
#
configure : configure.ac
@ echo "Rebuilding ./configure"
autoconf
#
# Run tests
#
tests : test
test :
@ echo "Running tests"
"$(EUPS_PYTHON)" -Wd tests/testAll.py
@ echo "Running server tests (requires network)"
"$(EUPS_PYTHON)" tests/testServerAll.py
clean :
- /bin/rm -f *~ core
@ for f in $(SUBDIRS); do \
(cd $$f ; echo In $$f; $(MAKE) $(MFLAGS) clean ); \
done
TAGS:
find . -type f -name '*.py' | xargs etags