Overview
Comment: | add makerule, add include mode to typesize |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8b84a67d855a331c86c228b222bbc1e2 |
User & Date: | lexi on 2019-08-19 02:04:22 |
Other Links: | manifest | tags |
Context
2019-08-19
| ||
02:13 | add missing script check-in: a6aed292a5 user: lexi tags: trunk | |
02:04 | add makerule, add include mode to typesize check-in: 8b84a67d85 user: lexi tags: trunk | |
01:46 | updates, begin putting together error-handling mechanism check-in: b5f6f19923 user: lexi tags: trunk | |
Changes
Modified arch/typesize.c from [e15b370325] to [750b65151f].
1 1 #include <stdio.h> 2 2 #include <limits.h> 3 3 #include <stddef.h> 4 4 5 -#define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val) 6 -#define mflag(flag,val) printf("-D"#flag"=-%llu ", val + 1) 7 -#define iflag(flag,val) printf("-D"#flag"=%llu ", val) 8 -#define fflag(flag,val) printf("-D"#flag"=%Lf ", val) 5 +#ifndef _emit_m4_include 6 +# define sflag(flag,val) printf("-D"#flag"=\"%s\" ", val) 7 +# define mflag(flag,val) printf("-D"#flag"=-%llu ", val + 1) 8 +# define iflag(flag,val) printf("-D"#flag"=%llu ", val) 9 +# define fflag(flag,val) printf("-D"#flag"=%Lf ", val) 10 +#else 11 +# define sflag(flag,val) printf("define(`"#flag"',`%s')dnl\n", val) 12 +# define mflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val + 1) 13 +# define iflag(flag,val) printf("define(`"#flag"',`%llu')dnl\n", val) 14 +# define fflag(flag,val) printf("define(`"#flag"',`%Lf')dnl\n", val) 15 +#endif 9 16 #define type_found(val) (found_type & (val / 8)) 10 17 #define checkbits(type,x) \ 11 18 if(!type_found(x) && sizeof(type) == (x/CHAR_BIT)) \ 12 19 sflag(type_bit##x, #type), found_type |= (x / 8) 13 20 14 21 #define describe_integral(type,label) { \ 15 22 unsigned type maxval = -1; \
Added makerule version [9a8f61d2ca].
1 +#- makerule 2 +# this file contains definitions shared between modmake and 3 +# the top-leve makefile 4 +# vim: ft=make 5 + 6 +ARCH ?= ${ARCH} 7 +BITS ?= ${BITS} 8 +OS ?= ${OS} 9 + 10 +POSIX ?= ${POSIX} 11 +UNIX ?= ${UNIX} 12 + 13 +ROOT ?= ${ROOT} 14 +TMP ?= ${TMP} 15 +OUT ?= ${OUT} 16 + 17 +m4 ?= ${m4} 18 + 19 +cflags = -std=c11 -isystem $(OUT) -isystem $(TMP) -isystem $(ROOT)/arch -fPIC -nostdlib $(COMPLIB) -L$(OUT) 20 + 21 +m-env = atom_target_arch=$(ARCH) 22 +m-env += atom_target_os=$(OS) 23 +ifneq ($(BITS),) #!!! ifdef does NOT work with environment variables 24 + m-env += atom_target_bits=$(BITS) 25 +endif 26 +m-env += target_posix=$(POSIX) 27 +m-env += target_unix=$(UNIX) 28 + 29 +m-comp = $(m4) $(m-env:%=-D%)