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
|
#-----------------------------------------------------------------------------
# GNU makefile for building WCSLIB 4.8
#
# Summary of the main targets
# ---------------------------
# all: Do 'make all' in each subdirectory (excluding ./doxygen).
# check: Do 'make check' in each subdirectory (compile and run tests).
# tests: Do 'make tests' in each subdirectory (compile test programs but
# don't run them).
# install: Do 'make install' in each subdirectory.
# clean: Recursively delete intermediate files produced as part of the
# build, e.g. object modules, core dumps, etc.
# cleaner: Recursively clean, and also delete test executables, test
# input and output, and intermediates produced in compiling the
# programmers' manual.
# distclean (or realclean): Recursively delete all platform-dependent files
# generated during the build, preserving only the programmers'
# manual and man pages (which are normally provided pre-built).
# It is the one to use between builds for multiple platforms.
# cleanest: Like distclean, but deletes everything that can be regenerated
# from the source files, including the programmers' manual and
# man pages, but excluding 'configure'.
# show: Print the values of important variables used in this and the
# other makefiles.
# writable: Run chmod recursively to make all sources writable.
#
# Notes:
# 1) If you need to make changes then preferably modify makedefs.in instead.
#
# 2) Refer also to the makefiles in subdirectories, particularly
# C/GNUmakefile.
#
# Author: Mark Calabretta, Australia Telescope National Facility
# http://www.atnf.csiro.au/~mcalabre/index.html
# $Id: GNUmakefile,v 4.8.1.2 2011/10/04 07:49:19 cal103 Exp cal103 $
#-----------------------------------------------------------------------------
# Get configure settings.
include makedefs
.PHONY : build check chmod clean cleaner cleanest distclean install \
realclean show tests writable
build :
-@ for DIR in $(SUBDIRS) ; do \
echo '' ; \
$(TIMER) ; \
$(MAKE) -k -C $$DIR build ; \
done
check tests : show
-@ echo ''
-@ $(TIMER)
@ for DIR in $(SUBDIRS) ; do \
echo '' ; \
$(MAKE) -i -C $$DIR cleaner ; \
done
-@ echo ''
@ for DIR in $(TSTDIRS) ; do \
echo '' ; \
$(TIMER) ; \
$(MAKE) -k -C $$DIR $@ ; \
done
install :
@ for DIR in $(INSTDIR) ; do \
$(MAKE) -k -C $$DIR $@ ; \
done
$(INSTALL) -m 444 wcsconfig.h wcsconfig_f77.h $(INCDIR)
- if [ ! -d "$(DOCDIR)" ] ; then \
$(INSTALL) -d -m 2775 $(DOCDIR) ; \
fi
$(INSTALL) -m 444 CHANGES COPYING* README $(DOCDIR)
- if [ ! -d "$(PDFDIR)" ] ; then \
$(INSTALL) -d -m 2775 $(PDFDIR) ; \
fi
$(INSTALL) -m 444 wcslib.pdf $(PDFDIR)
- if [ ! -d "$(HTMLDIR)/html" ] ; then \
$(INSTALL) -d -m 2775 $(HTMLDIR)/html ; \
fi
$(INSTALL) -m 444 html/* $(HTMLDIR)/html
if [ ! -d "$(LIBDIR)/pkgconfig" ] ; then \
$(INSTALL) -d -m 2775 $(LIBDIR)/pkgconfig ; \
fi
$(INSTALL) -m 444 wcslib.pc $(LIBDIR)/pkgconfig/wcslib.pc
clean cleaner :
for DIR in $(SUBDIRS) doxygen ; do \
$(MAKE) -C $$DIR $@ ; \
done
cleanest distclean realclean :
for DIR in $(SUBDIRS) doxygen ; do \
$(MAKE) -C $$DIR $@ ; \
done
- $(RM) *.log
- $(RM) -r autom4te.cache autoscan.log
- $(RM) confdefs.h conftest.*
- $(RM) config.log config.status configure.lineno
- $(RM) makedefs wcslib.pc
- $(RM) wcsconfig.h wcsconfig_*.h
- $(RM) wcslib-*.tar.gz
show ::
-@ echo 'Subdirectories to be built...'
-@ echo ' SUBDIRS := $(SUBDIRS)'
-@ echo ' TSTDIRS := $(TSTDIRS)'
-@ echo ''
writable :
chmod -R u+w .
GNUmakefile : makedefs ;
makedefs : makedefs.in config.status
-@ echo ''
-@ $(TIMER)
./config.status
config.status : configure
-@ echo ''
-@ $(TIMER)
-@ echo ''
-@ echo "Environment variables that affect 'configure':"
-@ echo " CC = $${CC-(undefined)}"
-@ echo " CFLAGS = $${CFLAGS-(undefined)}"
-@ echo " CPP = $${CPP-(undefined)}"
-@ echo " CPPFLAGS = $${CPPFLAGS-(undefined)}"
-@ echo " F77 = $${F77-(undefined)}"
-@ echo " FFLAGS = $${FFLAGS-(undefined)}"
-@ echo " LDFLAGS = $${LDFLAGS-(undefined)}"
-@ echo ''
./configure --no-create
#-----------------------------------------------------------------------------
# These are for code management.
.PHONY : dist
dist :
$(MAKE) -C doxygen cleanest build
$(MAKE) -C utils man
$(MAKE) distclean
-@ echo $(WCSLIBPKG)/C/RCS > wcslib.X
-@ echo $(WCSLIBPKG)/C/flexed/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/C/test/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/doxygen/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/Fortran/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/Fortran/test/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/makedefs >> wcslib.X
-@ echo $(WCSLIBPKG)/other >> wcslib.X
-@ echo $(WCSLIBPKG)/pgsbox/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/TODO >> wcslib.X
-@ echo $(WCSLIBPKG)/utils/RCS >> wcslib.X
-@ echo $(WCSLIBPKG)/wcslib.T >> wcslib.X
-@ echo $(WCSLIBPKG)/wcslib.X >> wcslib.X
rm -f $(WCSLIBPKG).tar.bz2
tar cf - -C .. -X wcslib.X $(WCSLIBPKG) | \
tar t | \
grep -v '/$$' | \
sort > wcslib.T
rm -f wcslib.X
tar cvf $(WCSLIBPKG).tar -C .. -T wcslib.T
rm -f wcslib.T
bzip2 $(WCSLIBPKG).tar
chmod 444 $(WCSLIBPKG).tar.bz2
install_dist :
cp -fp $(WCSLIBPKG).tar.bz2 /nfs/ftp/software/wcslib/
mv -f $(WCSLIBPKG).tar.bz2 ../wcslib-releases/
(cd /nfs/ftp/software/wcslib/ && \
rm -f wcslib.tar.bz2 && \
ln -s $(WCSLIBPKG).tar.bz2 wcslib.tar.bz2)
cp -fp CHANGES wcslib.pdf ~/public_html/WCS/
rsync --archive --delete html/ ~/public_html/WCS/wcslib/
configure : configure.ac
-@ echo ''
-@ $(TIMER)
autoconf
# Code development overrides must be included specifically before 'configure'
# generates makedefs.
-include flavours
|