-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile.in
727 lines (587 loc) · 21.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
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
VERSION = NEMO V4.4 28-jun-2024 PJT
# ###############################################################################
# $(NEMO)/Makefile: top level Makefile for full NEMO installation
# do not edit, it is derived from Makefile.in
# ###############################################################################
SHELL = /bin/bash
JOBS =
# useful for MacOSX since it can't distinguish case for most users (grmpfff)
.PHONY: INSTALL install scripts docs nemopy
# The following subdirectories (1&2) are needed for installation, although only
# some may have been part of the tar file that was imported.
# The 2nd set of files need to exist, and must have world write permission :-(
# They are always architecture dependant files, that never get exported and
# created during a new installation.
# these are all relative to $(NEMO)
CHECKDIR1 = data inc news tmp csh \
man man/man1 man/man3 man/man5 man/man8 man/manl \
demo etc adm bin lib obj \
local adm/install
_ASCIIDIRS_ = text bugs man/doc $(SRC) $(USR) # check if ASCIIDIRS can go
# absolute (derived) directories & files
CHECKDIR2 = $(NEMOBIN) $(NEMOLIB) $(NEMOOBJ) \
$(NEMOOBJ)/bodytrans $(NEMOOBJ)/potential $(NEMOOBJ)/acc $(NEMOOBJ)/manip $(NEMOOBJ)/fit \
$(NEMO)/py $(NEMO)/py/modules \
opt opt/include opt/lib opt/bin
CHECKFIL2 = $(NEMO)/adm/Usage \
$(NEMO)/adm/install/mknemo.log \
$(NEMOOBJ)/bodytrans/BTNAMES
# ###############################################################################
# Top level sub-directories in NEMO that contain Makefiles for NEMO install.
# Currently accepted are:
# src - standard export (NEMO expects install targets)
# usr - user contributions (have their own install methods)
#MAKEDIRS = src usr
#MAKELIBS = corelibs dehnen
MAKEDIRS = @MAKEDIRS@
MAKELIBS = @MAKELIBS@
NEMOTARS = @NEMOTARS@
#MKNEMOS = hdf4 hdf5 cfitsio fftw wcslib gsl - things that can be made via mknemo
MKNEMOS =
# ###############################################################################
# The following files/directories will be saved to a tar file
# and used in incremental export tar files (Nightly/export.csh)
# SRC is to select subsections of the whole src tree
# To get all of NEMO, choose SRC=src usr (see e.g. tarkernel below)
# --deprecated--
#
SRC = src
USR =
#
ASCIIFILES = COPYING MANIFEST NEMORC PORTING README VERSION \
src/Makefile \
configure configure.ac \
Makefile.in makedefs.in config.h.in \
nemo_start.csh.in nemo_start.sh.in \
install-sh config.sub config.guess \
nemo.rc nemo_end \
man/tmac.an man/whatis man/Makefile
ASCIIDIRS = inc text data bugs csh demo \
man/doc man/man? $(SRC) $(USR)
EXPORTA = $(ASCIIFILES) $(ASCIIDIRS)
EXPORTB = $(EXPORTA) $(NEMOBIN) $(NEMOLIB) $(NEMOOBJ)
CHKFILE = adm/chkfile
# Some default macro names, they can be overridden by supplying them
# on the commandline, e.g. "make tarfile /usr/moi/nemo.tar
FILE = $(NEMO)/nemo.tar
BACKUP = $(NEMO)/nemo-fullbck.tar
#
MOTD = $(NEMO)/etc/motd
TIMESTAMP=$(NEMO)/adm/TIMESTAMP
# local NEMO enhanced installed manually by a NEMO administrator
NEMO_RC_CSH = $(NEMO)/nemo_local.csh
NEMO_RC_SH = $(NEMO)/nemo_local.sh
# Master site (Maryland) specific, and probably not used anywhere else
FTPDIR = /n/ftp/pub/nemo/
SFTPDIR = ssh.astro.umd.edu:$(FTPDIR)
WWWDIR = $(NEMO)/local/www
# ###############################################################################
# INSTALL:
# ----------Installation starts here------------
# make sure you're in $(NEMO) from here
# this should remain the first target in this Makefile, so a default "make" invocation goes here
# help: install lsb
## install: reminder on typical install steps
install:
@echo "There is no install because NEMO is build in place. The usual procedure is"
@echo ""
@echo " ./configure .... -- run configure, with lots of options; try --help here"
@echo " make build1 -- 1: postconfig (build would do all build1..3)"
@echo " make build2 -- 2: libs + falcon (build2a and build2b)"
@echo " make build3 -- 3: bins"
@echo " make build4 -- 4: mknemo build reconfirmation (advanced only)"
@echo " make check -- the testsuite"
@echo " make bench5 -- the NEMOBENCH5 benchmark"
@echo " source nemo_start.sh -- after this NEMO can be used in the shell"
@echo " similar ones' exist for csh and python"
@echo ""
@echo "Local site variations must go in nemo_local.(c)sh and ~/.nemo_local.(c)sh"
@echo ""
@echo "Type 'make help' to list all other targets"
.PHONY : help
## help: This Help
help : Makefile
@sed -n 's/^##//p' $<
lsb:
@lsb_release -a
## help2: show important variables in make
help2:
@echo ""
@echo " ### NEMO installation help menu ###"
@echo ""
@echo Some important environment variables to be used are:
@echo NEMO=$(NEMO)
@echo NEMOSITE=$(NEMOSITE)
@echo NEMOHOST=$(NEMOHOST)
@echo SHELL=$(SHELL)
@echo CC=$(CC) CFLAGS=$(CFLAGS)
@echo FC=$(FC) FFLAGS=$(FFLAGS)
@echo MAKE=$(MAKE) MFLAGS=$(MFLAGS)
@echo MKNEMOS=$(MKNEMOS)
@echo ""
@echo "Additional help targets: helpfind, helptar"
## start: show how to source nemo_start with full path
start:
@echo source $(NEMO)/nemo_start.sh
## pull: GIT pull to get the latest ('mknemo -u tsf' also does this)
pull:
@git pull
## mknemos: optional package installs, usually in $NEMO/opt via $NEMO/local during bootstrap
mknemos:
@echo MKNEMOS=$(MKNEMOS)
@for mkn in $(MKNEMOS); do \
echo mknemo $$mkn;\
mknemo $$mkn > install_mknemo_$$mkn.log 2>&1;\
done
## dirs: make sure all directories and files are present before install can take place
dirs:
@echo Checking directory structure on `date`
@echo By `whoami` on `hostname`
-@for i in $(CHECKDIR1) $(ASCIIDIRS); do \
(if [ ! -d $(NEMO)/$$i ]; then \
mkdir $(NEMO)/$$i; \
chmod a+w $(NEMO)/$$i; \
fi); done
-@for i in $(CHECKDIR2); do \
(if [ ! -d $$i ]; then \
mkdir $$i; \
chmod a+w $$i; \
fi); done
-@for i in $(CHECKFIL2); do \
(if [ ! -f $$i ]; then \
touch $$i; \
chmod a+w $$i; \
fi); done
@if [ -d $(NEMOTARS) ]; then \
echo 'Symlink tars'; \
rm tars; \
ln -s $(NEMOTARS) tars; \
else \
echo 'No tar symlink'; \
fi
@if [ ! -d include ]; then \
ln -s inc include; \
fi
@if [ ! -f $(TIMESTAMP) ]; then \
echo Updating $(TIMESTAMP) file on `date`; \
echo `date` `hostname` `whoami` > $(TIMESTAMP); \
echo "`cat $(NEMO)/VERSION` `date +%m%d%H%M%y` `whoami` `date` (install)" >> $(CHKFILE); \
else \
echo "TIMESTAMP exists:";\
ls -l $(TIMESTAMP);\
fi
@if [ ! -f $(MOTD) ]; then \
echo Creating $(MOTD) file on `date`; \
echo "***********************************************" > $(MOTD);\
echo "Nemo Release 4 ($(VERSION)) installed: " >> $(MOTD);\
echo " NEMOVER = $(NEMOVER)" >> $(MOTD); \
echo " `date` on `whoami`@`hostname`" >> $(MOTD); \
echo "***********************************************">> $(MOTD);\
else \
echo "MOTD exists:";\
ls -l $(MOTD);\
fi
@if [ ! -f $(NEMO_RC_CSH) ]; then \
echo Creating $(NEMO_RC_CSH) file on `date`; \
echo "# place your local NEMO csh commands here" > $(NEMO_RC_CSH);\
else \
echo "nemo_local.csh exists:";\
ls -l $(NEMO_RC_CSH);\
fi
@if [ ! -f $(NEMO_RC_SH) ]; then \
echo Creating $(NEMO_RC_SH) file on `date`; \
echo "# place your local NEMO sh commands here" > $(NEMO_RC_SH);\
else \
echo "nemo_local.sh exists:";\
ls -l $(NEMO_RC_SH);\
fi
@echo "`cat VERSION` `date`" >> .version
@if [ ! -f $(NEMOLIB)/maxsizes.h ]; then \
cp inc/max/maxsizes.h $(NEMOLIB)/maxsizes.h;\
else \
echo "$(NEMOLIB)/maxsizes.h exists:";\
ls -l $(NEMOLIB)/maxsizes.h;\
fi
@cp text/README.local local
@cp text/README.opt opt
@cp text/README.obj obj
@echo Done with dirs at `date`
## docs: built htmol docs
docs:
(cd docs/source; make html)
@echo open docs/source/_build/html/index.html
# @todo: deprecate?
pjt:
@if [ ! -f $(NEMOLIB)/makedefs ]; then \
if [ -f $(NEMO)/makedefs ]; then \
echo Copying $(NEMO)/makedefs $(NEMOLIB);\
cp $(NEMO)/makedefs $(NEMOLIB); \
else \
echo Creating dummy $(NEMOLIB)/makedefs;\
touch $(NEMOLIB)/makedefs ;\
fi \
else \
echo "$(NEMOLIB)/makedefs exists:";\
ls -l $(NEMOLIB)/makedefs;\
fi
## scripts: install scripts
scripts:
@echo Installing scripts on `date`
@echo By `whoami` on `hostname`
(cd $(NEMO)/src/scripts; $(MAKE) install)
# The next four targets are not currently supported
#all: nemo_lib nemo_bin
nemo_lib:
@echo Make all subdirectories on `date`
@echo By `whoami` on `hostname`
-@for i in ${MAKEDIRS}; do \
(cd $$i; echo `date` MAKE NEMO_LIB in `pwd`; \
$(MAKE) nemo_lib); done
@echo NEMO is installed in $(NEMO)
@echo all done `date`
nemo_bin:
-@for i in ${MAKEDIRS}; do \
(cd $$i; echo `date` MAKE NEMO_BIN in `pwd`; \
$(MAKE) nemo_bin); done
@echo all done `date`
nemo_src:
-@for i in ${MAKEDIRS}; do \
(cd $$i; $(MAKE) nemo_src); done
#
# #############################################################################
# HTML stuff
#
html: doxygen
doxygen:
(cd text; doxygen nemo-doxygen.cfg)
README.html: README.md
# markdown_py -x toc readme.md > readme.html
pandoc README.md -o README.html
# #############################################################################
# EXPORT
helptar:
@echo "Install tar targets:"
@echo " % make targit"
@echo " % make targit0"
@echo " % make tarfile [FILE=$(FILE)]"
@echo " % make tarbackup [BACKUP=$(BACKUP)]"
@echo " % make purge"
@echo " % make ftp"
@echo " % make usrftp [USR=$(USR)]"
@echo " % make tarkernel"
@echo " % make tarbima"
@echo " % make tarorbit"
@echo " % make dist"
@echo " % make distu"
@echo ""
# @todo warning: VER vs. $NEMOVER
VER = `cat $(NEMO)/VERSION`
GIT1 = https://github.com/teuben/nemo/
GIT2 = https://github.com/teuben/pgplot/
targit:
rm -rf nemo_$(VER)
git clone $(GIT1) nemo_$(VER)
mkdir nemo_$(VER)/local
git clone $(GIT2) nemo_$(VER)/local/pgplot
echo WARNING: snapshot gitless export `date` >> nemo_$(VER)/VERSION
rm -rf nemo_$(VER)/.git nemo_$(VER)/local/pgplot/.git
tar zcf nemo_$(VER).tar.gz nemo_$(VER)
targit0:
rm -rf nemo_git
git clone $(GIT1) nemo_git
mkdir nemo_git/local
git clone $(GIT2) nemo_git/local/pgplot
tar zcf nemo_git.tar.gz nemo_git
upstream:
-git remote add upstream https://github.com/teuben/nemo
@echo Reminder, to sync with the upsteam:
@echo " git checkout master"
@echo " git fetch upstream"
@echo " git merge upstream/master"
@echo " git status"
@echo "Always make sure you work in a branch, to keep your local master same as upstream/master"
# autoconf/GIT based export
#
DIST_DIR = nemo_$(NEMOVER)
## dist: reminder what to do for making a new distribution
dist:
@if [ ! -d $(DIST_DIR) ]; \
then \
echo 'TODO for a new DIST: -------------------------------------'; \
echo 'git pull' ;\
echo Date: `date`; \
echo 'Change this date in: www/nemo/lastftp {FIX THIS}'; \
echo 'Change: docs/whatsnew.html'; \
echo 'Change: docs/index.html'; \
echo 'Change: CITATION.cff'; \
echo 'Change: codemeta.json'; \
echo 'And run the following commands: '; \
echo 'make targit'; \
echo 'scp $(DIST_DIR).tar.gz $(SFTPDIR)'; \
echo "git tag `echo nemo_$(NEMOVER) | sed 's/\./_/g'`"; \
echo "git push origin `echo nemo_$(NEMOVER) | sed 's/\./_/g'`"; \
echo 'src/scripts/version inc'; \
echo 'git commit VERSION inc/version.h'; \
echo 'git push'; \
echo 'DONE: ----------------------------------------------------'; \
else \
echo Directory $(DIST_DIR) exists; \
fi;
# The following 'ftp' targets only supposed to work at the master site
COMPRESS = gzip -f
NEMOTAR = nemo_`cat $(NEMO)/VERSION`.tar
export:
@echo "Steps to update NEMO:"
@echo "make dist GIT based distribution maker"
@echo "make new to see what's new for ftp"
@echo "make ftp full compressed (src) export"
@echo "src/scripts/version inc increase patch level"
@echo " or:"
@echo "src/scripts/version set MA.MI.PA set new Major/Minor/Patch"
@echo "FTPDIR=$(FTPDIR)"
@echo "SFTPDIR=$(SFTPDIR)"
@echo "NEMOTAR=$(NEMOTAR)"
ftp:
@echo Working from FTPDIR=$(FTPDIR) :;df -k $(FTPDIR)
@$(MAKE) tarfile "SRC=$(SRC)" "USR=$(USR)" FILE=$(FTPDIR)/$(NEMOTAR)
@echo Compressing
@$(COMPRESS) $(FTPDIR)/$(NEMOTAR)
@cp VERSION src/scripts/bootstrap README $(FTPDIR)
@(cd $(FTPDIR); rm nemo.tar.gz; ln -s $(NEMOTAR).gz nemo.tar.gz)
@ls -l $(FTPDIR)
@echo "<A HREF=ftp://ftp.astro.umd.edu/pub/nemo/$(NEMOTAR).gz> $(NEMOTAR).gz </A>" > $(WWWDIR)/lastftp
@echo "(`date`)" >> $(WWWDIR)/lastftp
# @(cd $(FTPDIR) ; ls -l $(NEMOTAR).gz > $(WWWDIR)/lastftp)
# @echo `ls -l $(FTPDIR)/$(NEMOTAR).gz` > $(WWWDIR)/lastftp
# @echo "Last updated on `date` by `whoami`" > $(WWWDIR)/lastftp
# only do this when you really are done with "ftp"
stamp:
@echo "`cat $(NEMO)/VERSION` `date +%m%d%H%M%y` `whoami` `date`" >> $(CHKFILE)
@tail -1 $(CHKFILE)
@echo You should probably now increment the version:
@echo " src/scripts/version inc"
new_time:
@echo "`cat $(NEMO)/VERSION` `date +%m%d%H%M%y` `whoami` `date`" >> $(CHKFILE)
@tail -1 $(CHKFILE)
test2:
@echo "<A HREF=ftp://ftp.astro.umd.edu/pub/nemo/$(NEMOTAR).gz> $(NEMOTAR).gz </A>" > $(WWWDIR)/lastftp
@echo "(`date`)" >> $(WWWDIR)/lastftp
# #############################################################################
# Some helpful non-NEMO targets
# deprecated: needs doc files
miriad:
@echo "Installing miriad shells..."
(cd $(NEMO)/src/tools/miriad/miriad;\
$(MAKE) miriad ; mv miriad $(NEMOBIN); $(MAKE) clean)
(cd $(NEMO)/src/tools/miriad/mirtool;\
$(MAKE) nemotool ; mv nemotool $(NEMOBIN); $(MAKE) clean)
# deprecated: makeindex comes with latex
makeindex:
@echo "Installing makeindex utility for LaTeX manuals" (cd $(NEMO)/src/tools/makeindex;\
$(MAKE);mv indexsrc/index $(NEMOBIN)/makeindex;$(MAKE) clean)
## pgplot: internal PGPLOT install (not recommended anymore)
pgplot:
src/scripts/pgplot.install png=$(PNG) gif=$(GIF)
## cfitsio: some of the essentials that can be installed in $NEMO/opt
cfitsio:
(source nemo_start.sh ; src/scripts/mknemo.d/cfitsio)
## hdf4: install hdf4 via mknemo
hdf4:
(source nemo_start.sh ; src/scripts/mknemo.d/hdf4)
## hdf5: install hdf5 via mknemo
hdf5:
(source nemo_start.sh ; src/scripts/mknemo.d/hdf5)
# deprecated: superseded by glnemo2
vogl:
src/scripts/nemo.vogl
## build: perform the first 3 builds (build1, build2, build3)
build: build1 build2 build3
## build1: postconfig and mknemos
build1:
(source nemo_start.sh ; $(MAKE) postconfig mknemos)
@echo 'Continue with "make build2 (or build2a build2b)"'
## build2: scripts and library
build2:
(source nemo_start.sh ; $(MAKE) scripts libs)
@echo 'Continue with "make build3"'
## build3: binaries
build3:
(source nemo_start.sh ; $(MAKE) -j $(JOBS) bins)
@echo 'Continue with "make build4 for advanced runs"'
@echo ' and/or "make check bench5" for a final check'
# Advanced build examples that require opt=1 during the build.
# normally not needed
BINS4 = tsf tabhist tsd orboom sdinfo lmtinfo
BINS4H = nemo yapp hdf4 hdf5 cfitsio netcdf
## build4: advanced binaries that need various 3rd party libraries (hdf4/5, cfitsio, netcdf)
build4:
@echo "This will test linked with: $(BINS4H)"
(source nemo_start.sh ; mknemo $(BINS4))
@echo 'Continue with "make check"'
## rebuild: configure again and re-build
rebuild: config.status
./config.status
$(MAKE) build
# the exact python method under development
python: anaconda3
python_setup: nemo_start.py
python -c 'import sys; print(sys.path)'
testpython:
(source nemo_start.sh; cd src/scripts/python; make tests)
anaconda3:
(source nemo_start.sh ; src/scripts/install_anaconda3)
nemopy:
pip install -e .
helpconfig:
@echo config, configure, config_extra, config_clean
postconfig: dirs config_extra scripts
## reconfig: re-configure in case their dependent files changed (your call)
reconfig:
./config.status
config: configure
./configure
configure: configure.ac
autoconf
config_extra:
cp config.h makedefs $(NEMOLIB)
DIFF = diff
diff_new:
-$(DIFF) config.h $(NEMOLIB)
-$(DIFF) makedefs $(NEMOLIB)
# useful if you want to start with a clean slate
config_clean:
rm -f $(CONFIG_CLEAN)
CLEAN = bin lib obj adm/TIMESTAMP etc/motd $(CONFIG_CLEAN)
CONFIG_CLEAN = config.h makedefs config.cache config.log config.status \
nemo_start.sh nemo_start.csh
clean:
@echo There is no single clean, there is cleanall, config_clean and distclean:
@echo ""
@echo '"make config_clean" would remove'
@echo ""
@echo $(CONFIG_CLEAN)
@echo ""
@echo '2) "make cleanall" would remove'
@echo ""
@echo $(CLEAN)
@echo and clean the falcON related directories
@echo ""
@echo '3) "make cleansrc" would clean the src tree (of .o files and such)'
@echo ""
@echo '"make distclean" would remove NEMORC.local as well as'
@echo ""
@echo $(CHECKDIR2)
distclean: config_clean cleansrc
@echo Cleaning as much as one can to simulate a distribution
rm -rf $(CHECKDIR2)
cleanall:
rm -rf $(CLEAN)
$(MAKE) -C $(NEMO)/usr/dehnen clean
cleansrc:
(cd src; $(MAKE) clean)
# via configure it will select: MAKELIBS = corelibs dehnen
libs: $(MAKELIBS)
@echo Done at `date`
build2a: scripts corelibs
@echo Done at `date` - continue with build2b or build3
build2b: dehnen
@echo Done at `date` - continue with build3
# gyrfalcON
dehnen:
-(cd usr/dehnen; $(MAKE) -i clean all) >> install.log 2>&1
corelibs:
@echo Starting at `date`, tail -f $(NEMO)/install.log
@echo Starting at `date` on `uname -a` > install.log
-(cd src/tutor/main; rm -f maine.o; make -f $(NEMOLIB)/makedefs maine.o CFLAGS="-v -c") >> install.log 2>&1
-(cd src;$(MAKE) -i -j $(JOBS) clean install) >> install.log 2>&1
maine:
-(cd src/tutor/main; rm -f maine.o; make -f $(NEMOLIB)/makedefs maine.o CFLAGS="-v -c")
slib:
(cd $(NEMOLIB); \
ld -shared -o libnemo.so --whole-archive libnemo.a)
bins:
@echo Starting at `date`, tail -f $(NEMO)/install.log
cd src;$(MAKE) -i -j $(JOBS) bins >> ../install.log 2>&1
cd usr;$(MAKE) -i -j $(JOBS) bins >> ../install.log 2>&1
@echo Done at `date`
missingbins:
ls $(NEMO)/bin > bins.list
-$(DIFF) bins.list src/scripts
@echo This NEMO has `wc -l bins.list`, the benchmark is `wc -l src/scripts/bins.list`
test:
@echo ISSUE the following command:
@echo 'src/scripts/testsuite -b'
testbins:
src/scripts/testsuite -b
testsuite:
@echo ISSUE the following command:
@echo 'src/scripts/testsuite -b'
## check: basic regression test
check:
(source nemo_start.sh; src/scripts/testsuite | tee -a install.log )
checklog:
cat testsuite.log
# check help/man consistency after a build
checkpars:
src/scripts/checkpars.py -v > checkpars.log
@grep ^'Files read' checkpars.log
@grep ^'Bad files found' checkpars.log
TIME = /usr/bin/time
## bench: basic benchmark test based off all Benchfile's
bench: benchtest
benchtest:
(source nemo_start.sh; src/scripts/benchsuite)
@echo 'Found following timing results:'
@grep ^NEMOBENCH benchsuite.log
bench0:
(source nemo_start.sh; $(TIME) src/scripts/nemo.bench bsf=0)
bench1:
(source nemo_start.sh; $(TIME) src/scripts/nemo.bench bsf=1)
bench2:
(source nemo_start.sh; $(TIME) src/scripts/nemo.bench mode=2)
## bench4: 4 times the flops benchmarks
bench4:
(source nemo_start.sh; cd src/tutor/bench; make flops; ./flops 4)
## bench5: special nemobench5
bench5:
(source nemo_start.sh; $(TIME) src/scripts/nemo.bench mode=5 | tee -a install.log )
## bench8: OpenMP test
bench8:
(source nemo_start.sh; cd src/tutor/mp; make scaling2 bench8)
bench10:
(source nemo_start.sh; $(TIME) src/scripts/nemo.bench mode=10) | grep ^NEMOBENCH
## bench11: special gyrfalcON bench with 1e6 particles
bench11:
mkplummer - 1000000 seed=123 | gyrfalcON - . eps=0.05 kmax=7 tstop=0.125
@echo " 0.1250000000 -0.2499838110 0.2497201 -0.4997039 -0.4980992 1.0027 0.00018 1.0e-09 5 14 0.11 1.05 1.18 0:00:20.38 [bench11]"
## bench11a: like bench11 but run forever
bench11a:
mkplummer - 1000000 seed=123 | gyrfalcON - . eps=0.05 kmax=7
## bench12: special hackcode1 bench with 1e6 particles
bench12:
mkplummer - 200000 seed=123 | /usr/bin/time -f %Usec hackcode1 - . eps=0.05 tstop=0.125 freq=128 | grep 0.125
@echo " 0.125 -0.2461 -0.5038 82877192 22 391 0.29 [bench12]"
## bench12a: like bench12 but run forever
bench12a:
mkplummer - 200000 seed=123 | /usr/bin/time -f %Usec hackcode1 - . eps=0.05 tstop=999999 freq=128
## bench13: sorting a plummer sphere
bench13:
@t0=`xrandom -1`;mkplummer - 1000000 seed=123 | snapsort - - r | hackdens - . debug=-1; t1=`xrandom -1`; nemoinp "($$t1-$$t0)/100"
#
TEST=""
reinstall:
@echo 'It is adviced to "git update" before this step'
docs/test_a_new_nemo_git reuse=1 nemo=. $(TEST)
sure: libs bins
.makedefs:
$(MAKE) -f src/Makefile makedefs_help
## nemo-lesson: NEMO lessons in carpentry format (a separate repo)
nemo-lesson:
git clone -b gh-pages https://github.com/teuben/nemo-lesson
## install_apt: install apt packages (e.g. ubuntu, debian)
install_apt:
sudo apt install `grep -v ^# src/scripts/requirements/apt.txt`
## install_dnf: install dnf packages (e.g. fedora, redhat)
install_dnf:
sudo dnf install `grep -v ^# src/scripts/requirements/dnf.txt`
## Alas, there are many more undocumented targets