Index: .fossil-settings/ignore-glob ================================================================== --- .fossil-settings/ignore-glob +++ .fossil-settings/ignore-glob @@ -8,6 +8,7 @@ config.status configure install-sh Makefile pkgIndex.tcl +pkgIndex.tcl.tmpl tcc/* Index: Makefile.in ================================================================== --- Makefile.in +++ Makefile.in @@ -24,38 +24,45 @@ cd tcc && $(shell cd $(srcdir) && pwd)/tcc/configure; \ fi tcc/libtcc.a: tcc/config.h $(MAKE) -C tcc libtcc.a + +tcc/libtcc1.a: tcc/config.h + $(MAKE) -C tcc libtcc1.a tcltcc.o: $(srcdir)/tcltcc.c $(srcdir)/tcc/tcc.h $(srcdir)/tcc/libtcc.h tcc/config.h $(CC) $(CPPFLAGS) $(CFLAGS) -o tcltcc.o -c $(srcdir)/tcltcc.c -tcltcc-shared.@SHOBJEXT@: tcltcc.o tcc/libtcc.a - $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o tcltcc-shared.@SHOBJEXT@ tcltcc.o $(LIBS) +tcltcc.@SHOBJEXT@: tcltcc.o tcc/libtcc.a + $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(SHOBJLDFLAGS) -o tcltcc.@SHOBJEXT@ tcltcc.o $(LIBS) tcltcc-static.a: tcltcc.o tcc/libtcc.a cp tcc/libtcc.a tcltcc-static.new.a $(AR) rcu tcltcc-static.new.a tcltcc.o -$(RANLIB) tcltcc-static.new.a mv tcltcc-static.new.a tcltcc-static.a -install: $(TARGETS) pkgIndex.tcl +pkgIndex.tcl: pkgIndex.tcl.tmpl + if [ "${TARGETS}" = 'tcltcc-static.a' ]; then awk '/^STATIC:/{ $$1 = ""; print }'; else awk '/^SHARED:/{ $$1 = ""; print }'; fi < pkgIndex.tcl.tmpl | sed 's@^ @@' > pkgIndex.tcl + +install: $(TARGETS) pkgIndex.tcl tcc/libtcc1.a $(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" - $(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" $(INSTALL) -m 0755 $(TARGETS) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" + $(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" + $(INSTALL) -m 0644 tcc/libtcc1.a "$(DESTDIR)$(PACKAGE_INSTALL_DIR)" clean: rm -f tcltcc.o - rm -f tcltcc-shared.@SHOBJEXT@ tcltcc-static.a - rm -f tcltcc-shared.@SHOBJEXT@.a tcltcc-shared.@SHOBJEXT@.def + rm -f tcltcc.@SHOBJEXT@ tcltcc-static.a + rm -f tcltcc.@SHOBJEXT@.a tcltcc.@SHOBJEXT@.def -$(MAKE) -C tcc clean distclean: clean rm -rf autom4te.cache rm -f config.log config.status - rm -f pkgIndex.tcl + rm -f pkgIndex.tcl pkgIndex.tcl.tmpl rm -f Makefile -$(MAKE) -C tcc distclean mrproper: distclean rm -rf __TMP__ Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -20,11 +20,11 @@ if test "${target}" = "shared"; then dnl Determine how to make shared objects DC_GET_SHOBJFLAGS - TARGETS="tcltcc-shared.${SHOBJEXT}" + TARGETS="tcltcc.${SHOBJEXT}" else TARGETS="tcltcc-static.a" fi AC_SUBST(TARGETS) @@ -39,6 +39,6 @@ dnl Perform Tcl Extension required stuff TCLEXT_INIT dnl Produce output -AC_OUTPUT(Makefile pkgIndex.tcl) +AC_OUTPUT(Makefile pkgIndex.tcl.tmpl) DELETED pkgIndex.tcl.in Index: pkgIndex.tcl.in ================================================================== --- pkgIndex.tcl.in +++ /dev/null ADDED pkgIndex.tcl.tmpl.in Index: pkgIndex.tcl.tmpl.in ================================================================== --- /dev/null +++ pkgIndex.tcl.tmpl.in @@ -0,0 +1,2 @@ +STATIC: package ifneeded tcc4tcl @PACKAGE_VERSION@ [list source [file join $dir tcc.tcl]] +SHARED: package ifneeded tcc4tcl @PACKAGE_VERSION@ [list load [file join $dir tcc4tcl.@SHOBJEXT@]]\;\ [list source [file join $dir tcc.tcl]]