From f374041570ddc22b4901a6fa6705efb9edf39a7e Mon Sep 17 00:00:00 2001 From: William Joye Date: Thu, 26 Jan 2017 17:21:21 -0500 Subject: simplify ./ds9 make --- ds9/macosx/Makefile.in | 7 ++-- ds9/make.include | 0 ds9/unix/Makefile.in | 101 +++++++++++++++++++++++++------------------------ ds9/win/Makefile.in | 10 ++--- 4 files changed, 60 insertions(+), 58 deletions(-) create mode 100644 ds9/make.include diff --git a/ds9/macosx/Makefile.in b/ds9/macosx/Makefile.in index f00280d..d6ba339 100644 --- a/ds9/macosx/Makefile.in +++ b/ds9/macosx/Makefile.in @@ -9,8 +9,6 @@ datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ -include $(prefix)/make.pkgs - TCL_VERSION = @TCL_VERSION@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_STUB_LIB_SPEC= @TCL_STUB_LIB_SPEC@ @@ -66,13 +64,16 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) .C.@OBJEXT@: $(COMPILE) -c $< -o $@ +include ../make.include + #--------------------------defines +APPDIR = $(bindir)/SAOImage\ DS9.app + ID = $(shell finger $(shell whoami) | egrep -o 'Name: [a-zA-Z0-9 ]{1,}' | cut -d ':' -f 2 | xargs echo) OBJS = ds9.o tkAppInit.o -APPDIR = $(bindir)/SAOImage\ DS9.app TKSAOFW = $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tksao.framework TKSAORES= $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tksao.framework/Resources TCLFW = $(bindir)/SAOImage\ DS9.app/Contents/Frameworks/Tcl.framework diff --git a/ds9/make.include b/ds9/make.include new file mode 100644 index 0000000..e69de29 diff --git a/ds9/unix/Makefile.in b/ds9/unix/Makefile.in index 03e4165..c25c3f8 100644 --- a/ds9/unix/Makefile.in +++ b/ds9/unix/Makefile.in @@ -66,25 +66,28 @@ system = @system@ .C.@OBJEXT@: $(COMPILE) -c `@CYGPATH@ $<` -o $@ +include ../make.include + #--------------------------defines +APPDIR = zvfsmntpt + ID = $(shell finger $(shell whoami) | egrep -o 'Name: [a-zA-Z0-9 ]{1,}' | cut -d ':' -f 2 | xargs echo) -ZDIR = zvfsmntpt OBJS = ds9.o tkAppInit.o FILES = \ - $(ZDIR)/tcl$(TCL_VERSION) \ - $(ZDIR)/tcl8 \ - $(ZDIR)/tk$(TCL_VERSION) \ - $(ZDIR)/tkblt \ - $(ZDIR)/tcllib \ - $(ZDIR)/tkcon \ - $(ZDIR)/library \ - $(ZDIR)/msgs \ - $(ZDIR)/doc \ - $(ZDIR)/cmaps \ - $(ZDIR)/template + $(APPDIR)/tcl$(TCL_VERSION) \ + $(APPDIR)/tcl8 \ + $(APPDIR)/tk$(TCL_VERSION) \ + $(APPDIR)/tkblt \ + $(APPDIR)/tcllib \ + $(APPDIR)/tkcon \ + $(APPDIR)/library \ + $(APPDIR)/msgs \ + $(APPDIR)/doc \ + $(APPDIR)/cmaps \ + $(APPDIR)/template #--------------------------main @@ -161,10 +164,10 @@ ds9base : $(OBJS) $(TK_LIBS) \ $(LIBS) -ds9.zip : $(ZDIR) framework $(FILES) +ds9.zip : $(APPDIR) framework $(FILES) $(RM) $@ - find $(ZDIR) -depth -name "CVS" -exec rm -r {} \; - zip -r ds9.zip $(ZDIR) + find $(APPDIR) -depth -name "CVS" -exec rm -r {} \; + zip -r ds9.zip $(APPDIR) tkAppInit.o : tkAppInit.c $(COMPILE) -DTK_LOCAL_APPINIT=SAOAppInit \ @@ -173,42 +176,42 @@ tkAppInit.o : tkAppInit.c tkAppInit.c : $(prefix)/tk$(TCL_VERSION)/unix/tkAppInit.c cp $(prefix)/tk$(TCL_VERSION)/unix/tkAppInit.c . -$(ZDIR) : - rm -rf $(ZDIR) +$(APPDIR) : + rm -rf $(APPDIR) mkdir $@ framework : - cp -r ../library $(ZDIR)/. - cp -r ../msgs $(ZDIR)/. - cp -r ../doc $(ZDIR)/. - cp -r ../cmaps $(ZDIR)/. - cp -r ../template $(ZDIR)/. - -$(ZDIR)/tcl$(TCL_VERSION) : $(prefix)/lib/tcl$(TCL_VERSION) - cp -r $(prefix)/lib/tcl$(TCL_VERSION) $(ZDIR)/. - -$(ZDIR)/tcl8 : $(prefix)/lib/tcl8 - cp -r $(prefix)/lib/tcl8 $(ZDIR)/. - -$(ZDIR)/tk$(TCL_VERSION) : $(prefix)/lib/tk$(TCL_VERSION) - cp -r $(prefix)/lib/tk$(TCL_VERSION) $(ZDIR)/. - rm -rf $(ZDIR)/tk$(TCL_VERSION)/images - rm -rf $(ZDIR)/tk$(TCL_VERSION)/demos - -$(ZDIR)/tcllib : - mkdir $(ZDIR)/tcllib - cp -r $(prefix)/tcllib/modules/base64 $(ZDIR)/tcllib/. - cp -r $(prefix)/tcllib/modules/ftp $(ZDIR)/tcllib/. - cp -r $(prefix)/tcllib/modules/log $(ZDIR)/tcllib/. - cp -r $(prefix)/tcllib/modules/textutil $(ZDIR)/tcllib/. - cp -r $(prefix)/tcllib/modules/math $(ZDIR)/tcllib/. - -$(ZDIR)/tkblt : - mkdir $(ZDIR)/tkblt - cp $(prefix)/tkblt/library/graph.tcl $(ZDIR)/tkblt/. - -$(ZDIR)/tkcon : - mkdir $(ZDIR)/tkcon + cp -r ../library $(APPDIR)/. + cp -r ../msgs $(APPDIR)/. + cp -r ../doc $(APPDIR)/. + cp -r ../cmaps $(APPDIR)/. + cp -r ../template $(APPDIR)/. + +$(APPDIR)/tcl$(TCL_VERSION) : $(prefix)/lib/tcl$(TCL_VERSION) + cp -r $(prefix)/lib/tcl$(TCL_VERSION) $(APPDIR)/. + +$(APPDIR)/tcl8 : $(prefix)/lib/tcl8 + cp -r $(prefix)/lib/tcl8 $(APPDIR)/. + +$(APPDIR)/tk$(TCL_VERSION) : $(prefix)/lib/tk$(TCL_VERSION) + cp -r $(prefix)/lib/tk$(TCL_VERSION) $(APPDIR)/. + rm -rf $(APPDIR)/tk$(TCL_VERSION)/images + rm -rf $(APPDIR)/tk$(TCL_VERSION)/demos + +$(APPDIR)/tcllib : + mkdir $(APPDIR)/tcllib + cp -r $(prefix)/tcllib/modules/base64 $(APPDIR)/tcllib/. + cp -r $(prefix)/tcllib/modules/ftp $(APPDIR)/tcllib/. + cp -r $(prefix)/tcllib/modules/log $(APPDIR)/tcllib/. + cp -r $(prefix)/tcllib/modules/textutil $(APPDIR)/tcllib/. + cp -r $(prefix)/tcllib/modules/math $(APPDIR)/tcllib/. + +$(APPDIR)/tkblt : + mkdir $(APPDIR)/tkblt + cp $(prefix)/tkblt/library/graph.tcl $(APPDIR)/tkblt/. + +$(APPDIR)/tkcon : + mkdir $(APPDIR)/tkcon cp $(prefix)/tkcon/*.tcl $@ #--------------------------cleanup @@ -218,7 +221,7 @@ $(ZDIR)/tkcon : clean : cd ../library; $(MAKE) clean $(RM) core *~ *# ds9base ds9 *.zip *.o - $(RM) -r $(ZDIR) + $(RM) -r $(APPDIR) distclean: clean -rm -f Makefile config.cache config.log config.status diff --git a/ds9/win/Makefile.in b/ds9/win/Makefile.in index 48224ac..20b19df 100755 --- a/ds9/win/Makefile.in +++ b/ds9/win/Makefile.in @@ -9,8 +9,6 @@ datarootdir = @datarootdir@ datadir = @datadir@ mandir = @mandir@ -include $(prefix)/make.pkgs - TCL_VERSION = @TCL_VERSION@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_STUB_LIB_SPEC= @TCL_STUB_LIB_SPEC@ @@ -65,14 +63,14 @@ STRIP = i686-w64-mingw32-strip.exe .C.@OBJEXT@: $(COMPILE) -DSTATIC_BUILD -c $< -o $@ -#--------------------------defines - -OBJS = ds9.o winMain.o ds9.res.o +include ../make.include -LLIBS = \ +#--------------------------defines APPDIR = $(bindir)/ds9app +OBJS = ds9.o winMain.o ds9.res.o + #--------------------------main .NOTPARALLEL : -- cgit v0.12