From 2e6c8635389c11e90bf4405aa115f21b80af07c3 Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 26 Jan 2017 15:13:12 -0500 Subject: simplify Makefile --- macosx/Makefile.in | 46 +++++++++++++++++++++++----------------------- make.include | 12 ++++++++---- make.pkgs | 8 -------- unix/Makefile.in | 36 ++++++++++++++++++------------------ win/Makefile.in | 35 ++++++++++++++++++----------------- 5 files changed, 67 insertions(+), 70 deletions(-) diff --git a/macosx/Makefile.in b/macosx/Makefile.in index 386b615..e1c7cbd 100644 --- a/macosx/Makefile.in +++ b/macosx/Makefile.in @@ -13,27 +13,27 @@ OS = @OS@ ARCH = @ARCH@ JOBS = @CORES@ +include ./make.include + WITHTCL = --with-tcl=$(prefix)/build/tcl/Development WITHTK = --with-tk=$(prefix)/build/tk/Development $(WITHTCL) CACHE = --config-cache --cache-file=$(prefix)/config.cache -include ./make.include - #--------------------------defines -DS9APP =SAOImage\ DS9\ $(DS9VERSION) +DS9APP =SAOImage\ DS9\ $(DS9_VERSION) TCLFILES= \ - tcl$(TCLVER)/generic/tcl.h \ - tcl$(TCLVER)/generic/tclDecls.h \ - tcl$(TCLVER)/generic/tclPlatDecls.h + tcl$(TCL_VERSION)/generic/tcl.h \ + tcl$(TCL_VERSION)/generic/tclDecls.h \ + tcl$(TCL_VERSION)/generic/tclPlatDecls.h TKFILES = \ - tk$(TCLVER)/generic/tk.h \ - tk$(TCLVER)/generic/tkDecls.h \ - tk$(TCLVER)/generic/tkPlatDecls.h \ - tk$(TCLVER)/generic/tkIntXlibDecls.h \ - tk$(TCLVER)/macosx/tkMacOSX.h + tk$(TCL_VERSION)/generic/tk.h \ + tk$(TCL_VERSION)/generic/tkDecls.h \ + tk$(TCL_VERSION)/generic/tkPlatDecls.h \ + tk$(TCL_VERSION)/generic/tkIntXlibDecls.h \ + tk$(TCL_VERSION)/macosx/tkMacOSX.h #--------------------------build @@ -47,10 +47,10 @@ saods9 : dirs tcl tk \ tkmacosx \ tksao ds9 -tcl : tcl$(TCLVER)/macosx/Makefile +tcl : tcl$(TCL_VERSION)/macosx/Makefile @echo "" - @echo "*** Install tcl$(TCLVER) ***" - $(MAKE) -C tcl$(TCLVER)/macosx -j $(JOBS) + @echo "*** Install tcl$(TCL_VERSION) ***" + $(MAKE) -C tcl$(TCL_VERSION)/macosx -j $(JOBS) # install include, lib cp -p $(TCLFILES) include/. @@ -62,19 +62,19 @@ tcl : tcl$(TCLVER)/macosx/Makefile cp -p build/tcl/tclsh8.6 bin/. install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @executable_path/../build/tcl/Tcl.framework/Tcl bin/tclsh8.6 -tcl$(TCLVER)/macosx/Makefile : +tcl$(TCL_VERSION)/macosx/Makefile : @echo "" - @echo "*** Configure tcl$(TCLVER) ***" - cd tcl$(TCLVER)/macosx; \ + @echo "*** Configure tcl$(TCL_VERSION) ***" + cd tcl$(TCL_VERSION)/macosx; \ ./configure \ --enable-64bit \ --enable-symbols \ --config-cache --cache-file=$(prefix)/config.cache -tk : tk$(TCLVER)/macosx/Makefile +tk : tk$(TCL_VERSION)/macosx/Makefile @echo "" - @echo "*** Installing tk$(TCLVER) ***" - $(MAKE) -C tk$(TCLVER)/macosx -j $(JOBS) + @echo "*** Installing tk$(TCL_VERSION) ***" + $(MAKE) -C tk$(TCL_VERSION)/macosx -j $(JOBS) # install include, lib cp -p $(TKFILES) include/. @@ -86,10 +86,10 @@ tk : tk$(TCLVER)/macosx/Makefile install_name_tool -change /Library/Frameworks/Tcl.framework/Versions/8.6/Tcl @executable_path/../build/tcl/Tcl.framework/Tcl bin/wish8.6 install_name_tool -change /Library/Frameworks/Tk.framework/Versions/8.6/Tk @executable_path/../build/tk/Tk.framework/Tk bin/wish8.6 -tk$(TCLVER)/macosx/Makefile : +tk$(TCL_VERSION)/macosx/Makefile : @echo "" - @echo "*** Configure tk$(TCLVER) ***" - cd tk$(TCLVER)/macosx; \ + @echo "*** Configure tk$(TCL_VERSION) ***" + cd tk$(TCL_VERSION)/macosx; \ ./configure \ $(WITHTCL) \ --enable-64bit \ diff --git a/make.include b/make.include index f05b21c..c0eee8f 100644 --- a/make.include +++ b/make.include @@ -1,3 +1,7 @@ +DS9_VERSION = 7.6b1 +XPA_VERSION = 2.1.17 +TCL_VERSION = 8.6 + include ./make.pkgs #-------------------------- Defs @@ -422,7 +426,7 @@ localclean : -rm -f core *~ *# tclclean : - $(MAKE) -C tcl$(TCLVER)/$(OS) clean + $(MAKE) -C tcl$(TCL_VERSION)/$(OS) clean tclcheckdnsclean : $(MAKE) -C tclcheckdns clean @@ -440,7 +444,7 @@ tclzvfsclean: $(MAKE) -C tclzvfs clean tkclean : - $(MAKE) -C tk$(TCLVER)/$(OS) clean + $(MAKE) -C tk$(TCL_VERSION)/$(OS) clean tkbltclean: $(MAKE) -C tkblt clean @@ -497,7 +501,7 @@ localdistclean : localclean -rm -f config.log config.status config.cache Makefile tcldistclean : - $(MAKE) -C tcl$(TCLVER)/$(OS) distclean + $(MAKE) -C tcl$(TCL_VERSION)/$(OS) distclean tclcheckdnsdistclean : $(MAKE) -C tclcheckdns distclean @@ -515,7 +519,7 @@ tclzvfsdistclean: $(MAKE) -C tclzvfs distclean tkdistclean : - $(MAKE) -C tk$(TCLVER)/$(OS) distclean + $(MAKE) -C tk$(TCL_VERSION)/$(OS) distclean tkbltdistclean: $(MAKE) -C tkblt distclean diff --git a/make.pkgs b/make.pkgs index d0c87d7..b40d597 100644 --- a/make.pkgs +++ b/make.pkgs @@ -1,9 +1,3 @@ -#--------------------------basic - -DS9VERSION=7.6b1 -XPAVERSION=2.1.17 - -#--------------------------version # tcl 8.6.6 # tk 8.6.6 # tclcheckdns 1.1.1 @@ -27,7 +21,5 @@ XPAVERSION=2.1.17 # libxml2 2.9.4 # libxslt 1.1.29 -# unix/Makefile.in macosx/Makefile.in win/Makefile.in make.include -TCLVER=8.6 # make.include TKCONVER=2.7 diff --git a/unix/Makefile.in b/unix/Makefile.in index 681a8c0..399bda3 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -14,12 +14,12 @@ ARCH = @ARCH@ TKFLAGS = @TKFLAGS@ JOBS = @CORES@ -WITHTCL = --with-tcl=$(prefix)/tcl$(TCLVER)/unix -WITHTK = --with-tk=$(prefix)/tk$(TCLVER)/unix $(WITHTCL) -CACHE = --config-cache --cache-file=$(prefix)/config.cache - include ./make.include +WITHTCL = --with-tcl=$(prefix)/tcl$(TCL_VERSION)/unix +WITHTK = --with-tk=$(prefix)/tk$(TCL_VERSION)/unix $(WITHTCL) +CACHE = --config-cache --cache-file=$(prefix)/config.cache + #--------------------------build .PHONY : saods9 tcl tk @@ -31,29 +31,29 @@ saods9 : tcl tk \ tkmpeg tkhtml1 tkcon \ tksao ds9 -tcl : tcl$(TCLVER)/unix/Makefile +tcl : tcl$(TCL_VERSION)/unix/Makefile @echo "" - @echo "*** Install tcl$(TCLVER) ***" - $(MAKE) -C tcl$(TCLVER)/unix -j $(JOBS) install + @echo "*** Install tcl$(TCL_VERSION) ***" + $(MAKE) -C tcl$(TCL_VERSION)/unix -j $(JOBS) install -tcl$(TCLVER)/unix/Makefile : +tcl$(TCL_VERSION)/unix/Makefile : @echo "" - @echo "*** Configure tcl$(TCLVER) ***" - cd tcl$(TCLVER)/unix; \ + @echo "*** Configure tcl$(TCL_VERSION) ***" + cd tcl$(TCL_VERSION)/unix; \ ./configure \ --prefix $(prefix) --exec-prefix $(exec_prefix) --libdir $(libdir) \ --disable-shared --enable-symbols \ --config-cache --cache-file=$(prefix)/config.cache -tk : tk$(TCLVER)/unix/Makefile +tk : tk$(TCL_VERSION)/unix/Makefile @echo "" - @echo "*** Install tk$(TCLVER) ***" - $(MAKE) -C tk$(TCLVER)/unix -j $(JOBS) install + @echo "*** Install tk$(TCL_VERSION) ***" + $(MAKE) -C tk$(TCL_VERSION)/unix -j $(JOBS) install -tk$(TCLVER)/unix/Makefile : +tk$(TCL_VERSION)/unix/Makefile : @echo "" - @echo "*** Configure tk$(TCLVER) ***" - cd tk$(TCLVER)/unix; \ + @echo "*** Configure tk$(TCL_VERSION) ***" + cd tk$(TCL_VERSION)/unix; \ ./configure \ $(TKFLAGS) \ --prefix $(prefix) --exec-prefix $(exec_prefix) --libdir $(libdir) \ @@ -77,5 +77,5 @@ tkunixdistclean : .PHONY : dist dist : - cd bin; tar cvf - ds9* | gzip > $(prefix)/dist/ds9.$(ARCH).$(DS9VERSION).tar.gz - cd bin; tar cvf - xpa* | gzip > $(prefix)/dist/xpa.$(ARCH).$(XPAVERSION).tar.gz + cd bin; tar cvf - ds9* | gzip > $(prefix)/dist/ds9.$(ARCH).$(DS9_VERSION).tar.gz + cd bin; tar cvf - xpa* | gzip > $(prefix)/dist/xpa.$(ARCH).$(XPA_VERSION).tar.gz diff --git a/win/Makefile.in b/win/Makefile.in index 95c71bb..cb064e9 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -19,12 +19,13 @@ ASTFLAGS = CFLAGS=-DCMINPACK_NO_DLL XPAFLAGS = CFLAGS=-DSTATIC_BUILD TCLXMLFLAGS = --with-xml-static=yes TARGET = --build=x86_64-unknown-mingw32 -WITHTCL = --with-tcl=$(prefix)/tcl$(TCLVER)/win -WITHTK = --with-tk=$(prefix)/tk$(TCLVER)/win $(WITHTCL) -CACHE = --config-cache --cache-file=$(prefix)/config.cache include ./make.include +WITHTCL = --with-tcl=$(prefix)/tcl$(TCL_VERSION)/win +WITHTK = --with-tk=$(prefix)/tk$(TCL_VERSION)/win $(WITHTCL) +CACHE = --config-cache --cache-file=$(prefix)/config.cache + #--------------------------build .PHONY : saods9 tcl tk tkwin libxml2 libxslt zlib @@ -39,30 +40,30 @@ saods9 : tcl tk \ # posix- tclcheckdns tcliis tclsignal # no symbols -tcl : tcl$(TCLVER)/win/Makefile +tcl : tcl$(TCL_VERSION)/win/Makefile @echo "" - @echo "*** Install tcl$(TCLVER) ***" - $(MAKE) -C tcl$(TCLVER)/win -j $(JOBS) - $(MAKE) -C tcl$(TCLVER)/win install + @echo "*** Install tcl$(TCL_VERSION) ***" + $(MAKE) -C tcl$(TCL_VERSION)/win -j $(JOBS) + $(MAKE) -C tcl$(TCL_VERSION)/win install -tcl$(TCLVER)/win/Makefile : +tcl$(TCL_VERSION)/win/Makefile : @echo "" - @echo "*** Configure tcl$(TCLVER) ***" - cd tcl$(TCLVER)/win; \ + @echo "*** Configure tcl$(TCL_VERSION) ***" + cd tcl$(TCL_VERSION)/win; \ ./configure \ --prefix $(prefix) --exec-prefix $(exec_prefix) --libdir $(libdir) \ --disable-shared \ --config-cache --cache-file=$(prefix)/config.cache -tk : tk$(TCLVER)/win/Makefile +tk : tk$(TCL_VERSION)/win/Makefile @echo "" - @echo "*** Install tk$(TCLVER) ***" - $(MAKE) -C tk$(TCLVER)/win -j $(JOBS) install + @echo "*** Install tk$(TCL_VERSION) ***" + $(MAKE) -C tk$(TCL_VERSION)/win -j $(JOBS) install -tk$(TCLVER)/win/Makefile : +tk$(TCL_VERSION)/win/Makefile : @echo "" - @echo "*** Configure tk$(TCLVER) ***" - cd tk$(TCLVER)/win; \ + @echo "*** Configure tk$(TCL_VERSION) ***" + cd tk$(TCL_VERSION)/win; \ ./configure \ $(WITHTCL) \ $(TKFLAGS) \ @@ -165,5 +166,5 @@ zlibdistclean : .PHONY : dist dist : all - cd bin; tar cvf - ds9$(EXEEXT) $(ZIPFILE) | gzip > dist/ds9.$(ARCH).$(DS9VERSION).tar.gz + cd bin; tar cvf - ds9$(EXEEXT) $(ZIPFILE) | gzip > dist/ds9.$(ARCH).$(DS9_VERSION).tar.gz -- cgit v0.12