diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-01-31 21:07:32 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-01-31 21:07:32 (GMT) |
commit | 93eac4bc6784e365ef00479761641c9d88547498 (patch) | |
tree | 5721cc36c73d93f43e392a33438bbe695f7d331e | |
parent | c0346724aa6f661d735aa718f93c151be9f216c9 (diff) | |
download | blt-93eac4bc6784e365ef00479761641c9d88547498.zip blt-93eac4bc6784e365ef00479761641c9d88547498.tar.gz blt-93eac4bc6784e365ef00479761641c9d88547498.tar.bz2 |
simplify build
-rw-r--r-- | ds9/make.include | 54 | ||||
-rw-r--r-- | ds9/unix/Makefile.in | 77 |
2 files changed, 76 insertions, 55 deletions
diff --git a/ds9/make.include b/ds9/make.include index 76aa699..0664476 100644 --- a/ds9/make.include +++ b/ds9/make.include @@ -1,66 +1,76 @@ #--------------------------framework -framework: $(LIBDIR)/library $(LIBDIR)/doc $(LIBDIR)/cmaps $(LIBDIR)/template - -$(LIBDIR)/library : - cp -prf $(prefix)/ds9/library $(LIBDIR)/. +$(LIBDIR)/library : $(prefix)/ds9/library/*.tcl + mkdir -p $@ + cp -p $? $@ # must do it this way for win cd $@; \ echo "pkg_mkIndex . *.tcl; exit" | $(TCLSH_PROG) + touch $@ -$(LIBDIR)/msgs : - cp -prf $(prefix)/ds9/msgs $(LIBDIR)/. +$(LIBDIR)/msgs : $(prefix)/ds9/msgs/*.msg + mkdir -p $@ + cp -p $? $@ + touch $@ $(LIBDIR)/doc : cp -prf $(prefix)/ds9/doc $(LIBDIR)/. + touch $@ $(LIBDIR)/cmaps : cp -prf $(prefix)/ds9/cmaps $(LIBDIR)/. + touch $@ $(LIBDIR)/template : cp -prf $(prefix)/ds9/template $(LIBDIR)/. + touch $@ #--------------------------tkblt -$(LIBDIR)/tkblt : +$(LIBDIR)/tkblt : $(prefix)/tkblt/library/*.tcl mkdir -p $@ - cp -pf $(prefix)/tkblt/library/*.tcl $@/. + cp -p $? $@ # must do it this way for win cd $@; \ echo "pkg_mkIndex . *.tcl; exit" | $(TCLSH_PROG) + touch $@ #--------------------------tkcon -$(LIBDIR)/tkcon : +$(LIBDIR)/tkcon : $(prefix)/tkcon/*.tcl mkdir -p $@ - cp -pf $(prefix)/tkcon/*.tcl $@/. + cp -p $? $@ # must do it this way for win cd $@; \ echo "pkg_mkIndex . *.tcl; exit" | $(TCLSH_PROG) + touch $@ #--------------------------tcllib -tcllib : $(LIBDIR)/base64 $(LIBDIR)/ftp $(LIBDIR)/log $(LIBDIR)/textutil $(LIBDIR)/math - -$(LIBDIR)/base64: +$(LIBDIR)/base64: $(prefix)/tcllib/modules/base64/*.tcl mkdir -p $@ - cp -prf $(prefix)/tcllib/modules/base64/*.tcl $@ + cp -p $? $@ + touch $@ -$(LIBDIR)/ftp : +$(LIBDIR)/ftp : $(prefix)/tcllib/modules/ftp/*.tcl mkdir -p $@ - cp -prf $(prefix)/tcllib/modules/ftp/*.tcl $@ + cp -p $? $@ + touch $@ -$(LIBDIR)/log : +$(LIBDIR)/log : $(prefix)/tcllib/modules/log/*.tcl mkdir -p $@ - cp -prf $(prefix)/tcllib/modules/log/*.tcl $@ + cp -p $? $@ + touch $@ -$(LIBDIR)/textutil: +$(LIBDIR)/textutil: $(prefix)/tcllib/modules/textutil/*.tcl mkdir -p $@ - cp -prf $(prefix)/tcllib/modules/textutil/*.tcl $@ + cp -p $? $@ + touch $@ -$(LIBDIR)/math : +$(LIBDIR)/math : $(prefix)/tcllib/modules/math/*.tcl mkdir -p $@ - cp -prf $(prefix)/tcllib/modules/math/*.tcl $@/. + cp -p $? $@ + touch $@ #--------------------------distclean diff --git a/ds9/unix/Makefile.in b/ds9/unix/Makefile.in index 25e25b4..c6dd48d 100644 --- a/ds9/unix/Makefile.in +++ b/ds9/unix/Makefile.in @@ -77,22 +77,60 @@ ID = $(shell finger $(shell whoami) | egrep -o 'Name: [a-zA-Z0-9 ]{1,}' | cut -d OBJS = ds9.o tkAppInit.o +empty:= +space:=$(empty) $(empty) + +SPECS = \ + $(jpegtcl_LIB_SPEC) \ + $(pngtcl_LIB_SPEC) \ + $(tifftcl_LIB_SPEC) \ + $(zlibtcl_LIB_SPEC) \ + $(tclcheckdns_LIB_SPEC) \ + $(tcliis_LIB_SPEC) \ + $(tclsignal_LIB_SPEC) \ + $(tclxml_LIB_SPEC) \ + $(tclzvfs_LIB_SPEC) \ + $(tkblt_LIB_SPEC) \ + $(tkhtml1_LIB_SPEC) \ + $(tkimg_LIB_SPEC) \ + $(tkimggif_LIB_SPEC) \ + $(tkimgjpeg_LIB_SPEC) \ + $(tkimgpng_LIB_SPEC) \ + $(tkimgtiff_LIB_SPEC) \ + $(tkimgwindow_LIB_SPEC) \ + $(tkmpeg_LIB_SPEC) \ + $(tksao_LIB_SPEC) \ + $(tktable_LIB_SPEC) \ + $(TK_STUB_LIB_SPEC) \ + $(TK_LIB_SPEC) \ + $(TCL_STUB_LIB_SPEC) \ + $(TCL_LIB_SPEC) + +LLIBS = \ + $(libdir)/libfuntools.a \ + $(libdir)/libast.a \ + $(libdir)/libast_err.a \ + $(libdir)/libast_pal.a \ + $(libdir)/libxpa.a \ + $(subst /$(space),/,$(patsubst -L%,%/,$(patsubst -l%,lib%.a,$(SPECS)))) + PREQS = \ $(APPDIR) \ $(LIBDIR)/tcl$(TCL_VERSION) \ $(LIBDIR)/tcl8 \ $(LIBDIR)/tk$(TCL_VERSION) \ $(LIBDIR)/library \ + $(LIBDIR)/msgs \ $(LIBDIR)/doc \ $(LIBDIR)/cmaps \ $(LIBDIR)/template \ + $(LIBDIR)/tkblt \ + $(LIBDIR)/tkcon \ $(LIBDIR)/base64 \ $(LIBDIR)/ftp \ $(LIBDIR)/log \ $(LIBDIR)/textutil \ - $(LIBDIR)/math \ - $(LIBDIR)/tkblt \ - $(LIBDIR)/tkcon + $(LIBDIR)/math #--------------------------main @@ -135,43 +173,16 @@ debug: ds9base ds9.zip endif -ds9base : $(OBJS) +ds9base : $(OBJS) $(LLIBS) $(RM) $@ $(CC) $(CFLAGS) -o $@ \ $(OBJS) \ - $(libdir)/libfuntools.a \ - $(libdir)/libast.a \ - $(libdir)/libast_err.a \ - $(libdir)/libast_pal.a \ - $(libdir)/libxpa.a \ - $(jpegtcl_LIB_SPEC) \ - $(pngtcl_LIB_SPEC) \ - $(tifftcl_LIB_SPEC) \ - $(zlibtcl_LIB_SPEC) \ - $(tclcheckdns_LIB_SPEC) \ - $(tcliis_LIB_SPEC) \ - $(tclsignal_LIB_SPEC) \ - $(tclxml_LIB_SPEC) \ - $(tclzvfs_LIB_SPEC) \ - $(tkblt_LIB_SPEC) \ - $(tkhtml1_LIB_SPEC) \ - $(tkimg_LIB_SPEC) \ - $(tkimggif_LIB_SPEC) \ - $(tkimgjpeg_LIB_SPEC) \ - $(tkimgpng_LIB_SPEC) \ - $(tkimgtiff_LIB_SPEC) \ - $(tkimgwindow_LIB_SPEC) \ - $(tkmpeg_LIB_SPEC) \ - $(tksao_LIB_SPEC) \ - $(tktable_LIB_SPEC) \ - $(TK_STUB_LIB_SPEC) $(TK_LIB_SPEC) \ - $(TCL_STUB_LIB_SPEC) $(TCL_LIB_SPEC) \ + $(LLIBS) \ $(TK_LIBS) \ $(LIBS) ds9.zip : $(PREQS) - $(RM) $@ - zip -r ds9.zip $(APPDIR) + zip -ru ds9.zip $(APPDIR) tkAppInit.o : tkAppInit.c $(COMPILE) -DTK_LOCAL_APPINIT=SAOAppInit \ |