diff options
| author | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-07 12:14:08 +0200 |
|---|---|---|
| committer | Thomas Preud'homme <thomas.preudhomme@celest.fr> | 2011-07-07 12:14:08 +0200 |
| commit | 571465d32bdbb3e17612983d75e799183b94c268 (patch) | |
| tree | 28c12c47a1752e28adb70fee68feb5b69336a7eb | |
| parent | 4d6a4a26e08ef8581c70d29f578a42ab7d738c2d (diff) | |
| download | tinycc-571465d32bdbb3e17612983d75e799183b94c268.tar.gz tinycc-571465d32bdbb3e17612983d75e799183b94c268.tar.bz2 | |
Revert "Make examples' shebang use target tcc bindir path"
This reverts commit cb2138f8b098feb1b51a407343a4b99e25d5b506.
| -rw-r--r-- | Makefile | 14 | ||||
| -rw-r--r-- | README | 3 | ||||
| -rwxr-xr-x[-rw-r--r--] | examples/ex1.c (renamed from examples/ex1.c.template) | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | examples/ex4.c (renamed from examples/ex4.c.template) | 2 |
4 files changed, 7 insertions, 14 deletions
@@ -141,16 +141,15 @@ ifdef CONFIG_USE_LIBGCC LIBTCC1= endif -TCCLIBS := $(LIBTCC1) $(LIBTCC) $(BCHECK_O) -TCCDOCS := tcc.1 tcc-doc.html tcc-doc.info -TCCEXS := $(patsubst ex%.c.template,ex%.c,$(wildcard examples/ex*.c.template)) +TCCLIBS = $(LIBTCC1) $(LIBTCC) $(BCHECK_O) +TCCDOCS = tcc.1 tcc-doc.html tcc-doc.info ifdef CONFIG_CROSS PROGS+=$(PROGS_CROSS) TCCLIBS+=$(LIBTCC1_CROSS) endif -all: $(PROGS) $(TCCLIBS) $(TCCDOCS) $(TCCEXS) +all: $(PROGS) $(TCCLIBS) $(TCCDOCS) # Host Tiny C Compiler tcc$(EXESUF): tcc.o $(LIBTCC) @@ -325,11 +324,6 @@ tcc.1: tcc-doc.texi tcc-doc.info: tcc-doc.texi -makeinfo tcc-doc.texi -# examples -examples/ex%.c: examples/ex%.c.template - sed '1s/@BINDIR@/$(subst /,\/,$(bindir))/' $< > $@ - chmod a+x $@ - .PHONY: all clean tar distclean install uninstall FORCE # tar release (use 'make -k tar' on a checkouted tree) @@ -347,7 +341,7 @@ export LIBTCC1 $(MAKE) -C tests $@ clean: - rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF) $(TCCEXS) + rm -vf $(PROGS) tcc_p$(EXESUF) tcc.pod *~ *.o *.a *.so* *.out *.exe libtcc_test$(EXESUF) $(MAKE) -C tests $@ ifneq ($(LIBTCC1),) $(MAKE) -C lib $@ @@ -65,8 +65,7 @@ operations given a list of numbers (benchmark). ex3.c: compute fibonacci numbers (benchmark). ex4.c: more complicated: X11 program. Very complicated test in fact -because standard headers are being used ! As for ex1.c, can also be launched -directly as a script: './ex4.c'. +because standard headers are being used ! ex5.c: 'hello world' with standard glibc headers. diff --git a/examples/ex1.c.template b/examples/ex1.c index 8744f58..28139f9 100644..100755 --- a/examples/ex1.c.template +++ b/examples/ex1.c @@ -1,4 +1,4 @@ -#! @BINDIR@/tcc -run +#! /usr/local/bin/tcc -run #include <tcclib.h> int main() diff --git a/examples/ex4.c.template b/examples/ex4.c index 81aa00d..b33b033 100644..100755 --- a/examples/ex4.c.template +++ b/examples/ex4.c @@ -1,4 +1,4 @@ -#! @BINDIR@/tcc -run -L/usr/X11R6/lib -lX11 +#!./tcc -run -L/usr/X11R6/lib -lX11 #include <stdlib.h> #include <stdio.h> #include <X11/Xlib.h> |
