Diff

Differences From Artifact [05b26b611a]:

To Artifact [85aaa6526a]:


    17     17   PACKAGE_NAME = @PACKAGE_NAME@
    18     18   PACKAGE_VERSION = @PACKAGE_VERSION@
    19     19   
    20     20   TCLCONFIGPATH = @TCLCONFIGPATH@
    21     21   TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@
    22     22   tcllibdir = $(shell if echo "$(libdir)" | grep '^UNSPECIFIED' >/dev/null; then echo $(TCL_PACKAGE_PATH); else echo "$(libdir)"; fi)
    23     23   PACKAGE_INSTALL_DIR = $(tcllibdir)/$(PACKAGE_NAME)-$(PACKAGE_VERSION)
    24         -TCC_CONFIGURE_OPTS = --extra-cflags='$(CPPFLAGS) $(CFLAGS)' --with-tcl=$(TCLCONFIGPATH)
           24  +TCC_CONFIGURE_OPTS = --extra-cflags='$(CPPFLAGS) $(CFLAGS)' --with-tcl=$(TCLCONFIGPATH) --sysincludepaths='{B}/include' --libpaths='{B}/lib'
    25     25   srcdir = @srcdir@
    26     26   
    27     27   all: $(TARGETS)
    28     28   
    29     29   tcc/config.h:
    30     30   	if [ "$(srcdir)" = "." ]; then \
    31     31   		cd tcc && ./configure $(TCC_CONFIGURE_OPTS); \
................................................................................
    50     50   
    51     51   tcltcc-static.a: tcltcc.o tcc/libtcc.a
    52     52   	cp tcc/libtcc.a tcltcc-static.new.a
    53     53   	$(AR) rcu tcltcc-static.new.a tcltcc.o
    54     54   	-$(RANLIB) tcltcc-static.new.a
    55     55   	mv tcltcc-static.new.a tcltcc-static.a
    56     56   
    57         -install: $(TARGETS) pkgIndex.tcl tcc.tcl tcc/libtcc1.a $(shell echo tcc/include/*)
           57  +install: $(TARGETS) pkgIndex.tcl $(srcdir)/tcc.tcl tcc/libtcc1.a $(shell echo $(srcdir)/tcc/include/*) $(srcdir)/headers.awk
    58     58   	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
    59     59   	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
    60     60   	$(INSTALL) -d "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
    61     61   	$(INSTALL) -m 0755 $(TARGETS) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
    62     62   	$(INSTALL) -m 0644 pkgIndex.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
    63         -	$(INSTALL) -m 0644 tcc.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
           63  +	$(INSTALL) -m 0644 $(srcdir)/tcc.tcl "$(DESTDIR)$(PACKAGE_INSTALL_DIR)"
    64     64   	$(INSTALL) -m 0644 tcc/libtcc1.a "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/lib"
    65         -	$(INSTALL) -m 0644 $(shell echo tcc/include/*) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
           65  +	$(INSTALL) -m 0644 $(shell echo $(srcdir)/tcc/include/*) "$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include"
           66  +	( for file in tcl.h limits.h unistd.h; do echo "#include <$${file}>"; done ) | \
           67  +		$(CC) $(CPPFLAGS) $(CFLAGS) -I$(srcdir)/tcc/include -I$(srcdir)/tcc/include -E - | awk -f $(srcdir)/headers.awk | while read src dst; do \
           68  +			dst="$(DESTDIR)$(PACKAGE_INSTALL_DIR)/include/$$dst"; \
           69  +			if [ -e "$${dst}" ]; then continue; fi; \
           70  +			dstdir="$$(dirname "$$dst")"; \
           71  +			echo mkdir -p "$$dstdir"; \
           72  +			mkdir -p "$$dstdir"; \
           73  +			echo cp "$$src" "$$dst"; \
           74  +			cp "$$src" "$$dst"; \
           75  +		done
    66     76   
    67     77   clean:
    68     78   	rm -f tcltcc.o
    69     79   	rm -f tcltcc.@SHOBJEXT@ tcltcc-static.a
    70     80   	rm -f tcltcc.@SHOBJEXT@.a tcltcc.@SHOBJEXT@.def
    71     81   	-$(MAKE) -C tcc clean
    72     82