[mirmince commits] {mirmince} branch master updated. 12f146c45e6a2dc061d490d1614763cb6b8715ff
tg at freewrt.org
tg at freewrt.org
Thu Jan 24 00:35:24 UTC 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Main git repository for FreeWRT project mirmince".
The branch, master has been updated
via 12f146c45e6a2dc061d490d1614763cb6b8715ff (commit)
from 1fba1d016da9326857d158595b0785e1c212991d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 12f146c45e6a2dc061d490d1614763cb6b8715ff
Author: Thorsten Glaser <tg at mirbsd.org>
Date: Thu Jan 24 00:35:02 2013 +0000
the generated header files must also be co-installable
hm now only Makefile.gen and the *.o/*.a files aren't...
but I guess switching trees is easy enough, and do-install
is not made for eternity anyway
-----------------------------------------------------------------------
Summary of changes:
Makefile | 27 ++++++++++++++++++++-------
cvsyscls | 4 ++--
do-install | 2 +-
include/mirmince/asm.h | 8 ++++----
include/mirmince/c.h | 10 +++++-----
5 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/Makefile b/Makefile
index c8a2362..dbf7adc 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,10 @@ TG_CC:= ${CC}
TG_CFLAGS+= -fno-builtin
CC:= ${OBJADIR}/cc
_CONF:= ${LIBCDIR}/obj/.conf-${TG_ARCH:Q}-${TG_OS:Q}-${OBJADIR:S!/!_!g:Q}
+TGS_ALL:= mirbsd/i386
+TGS_ALL+= linux/i386
+TGS_OS:= ${TGS_ALL:H}
+TGS_CPU:= ${TGS_ALL:T}
.if defined(V) && $V > 0
CC+= -v
@@ -51,6 +55,7 @@ clean:
cleandir: clean
rm -f ${DCLEANFILES}
+ rm -rf osdep
install:
${SHELL} ${.CURDIR:Q}/do-install ${TG_CC:Q} ${DST:Q} \
@@ -98,7 +103,6 @@ LINK.c:= ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}
.c.i:
${COMPILE.c} ${CFLAGS_${.TARGET:T:R}:M*} ${.IMPSRC} -E -o $@
-all: ${GENHDRS}
all: mincebeg.o
MINCEBEG_OSDEP?=
@@ -110,8 +114,6 @@ mincebeg.o: ${MINCEBEG_OSDEP} ${MINCEBEG_OSMD} mincebeg_mi.o
${OBJCOPY} -G _mince_csu_init -x $@.o $@
@rm -f $@.o
-GENHDRS+= syscall.h syscallc.h
-
${_CONF}:
@:>$@
@@ -125,9 +127,18 @@ cc cc-spec: .cc-done
${OBJADIR:Q} ${OBJADIR:Q} ${OBJADIR:Q}
@:>$@
-DCLEANFILES+= syscall.h syscallc.h Makefile.gen
+DCLEANFILES+= Makefile.gen
+CVSYSCLS+= Makefile.gen
+
+.for _i in ${TGS_OS}
+CVSYSCLS+= osdep/${_i}/syscall.h osdep/${_i}/syscallc.h
-syscall.h syscallc.h Makefile.gen: ${_CONF} cvsyscls ${LIBCDIR}/osdep/${TG_OS}/syscalls
+osdep/${_i}/syscall.h osdep/${_i}/syscallc.h: osdep/${_i}
+osdep/${_i}:
+ @mkdir -p $@
+.endfor
+
+${CVSYSCLS}: ${_CONF} cvsyscls ${LIBCDIR}/osdep/${TG_OS}/syscalls
${SHELL} ${LIBCDIR:Q}/cvsyscls $@ \
${LIBCDIR:Q}/osdep/${TG_OS}/syscalls
@@ -139,7 +150,7 @@ SOBJS+= sys_${_n}.o
sys_${_n}.S:
x='#include <mirmince/asm.h>'; \
- x+=$$'\n#include mirmince_hdr_gen(syscall.h)'; \
+ x+=$$'\n#include mirmince_hdr_osdep(syscall.h)'; \
x+=$$'\nSYSCALL${_a}(${_n}, ${_k})'; \
print -r -- "$$x" >$@
@@ -149,7 +160,7 @@ sys_${_n}.o: sys_${_n}.S
@rm -f $@.o
.endfor
-depend: ${GENHDRS} Makefile.gen
+depend: ${CVSYSCLS}
all: libminze.a
@@ -172,3 +183,5 @@ libmince.a: ${COBJS}
regress:
@echo No regression tests here, but feel free to clone the
@echo mirmince/tests.git repository and play around with that.
+
+.PHONY: obj clean cleandir depend all install regress
diff --git a/cvsyscls b/cvsyscls
index a11f413..a2c16e0 100644
--- a/cvsyscls
+++ b/cvsyscls
@@ -42,7 +42,7 @@ case $whattodo {
:
}
;;
-(syscall.h)
+(*/syscall.h)
print "#ifndef MIRMINCE_SYSCALL_H"
print "#define MIRMINCE_SYSCALL_H"
print
@@ -56,7 +56,7 @@ case $whattodo {
print "#endif"
}
;;
-(syscallc.h)
+(*/syscallc.h)
print "#ifndef MIRMINCE_SYSCALLC_H"
print "#define MIRMINCE_SYSCALLC_H"
print
diff --git a/do-install b/do-install
index 20cbd42..0cd2ac5 100644
--- a/do-install
+++ b/do-install
@@ -33,7 +33,7 @@ cp LICENCE "$dst"/libdata/
mksh gcc-mk "$cc" "$dst" "$arch" "$os" "$cflags"
find include -name \*.h -print0 | pax -rw -0 "$dst"/
find md osdep -name \*.h -print0 | pax -rw -0 "$dst"/include/mirmince/
-cp obj/syscall.h obj/syscallc.h "$dst"/include/mirmince/
+(cd obj; find osdep -name \*.h -print0 | pax -rw -0 "$dst"/include/mirmince/)
for f in obj/mince{beg,end}.o obj/*.a; do
[[ -s $f ]] || continue
cp "$f" "$dst"/lib/
diff --git a/include/mirmince/asm.h b/include/mirmince/asm.h
index e93fae8..f510e3b 100644
--- a/include/mirmince/asm.h
+++ b/include/mirmince/asm.h
@@ -7,10 +7,10 @@
#else
#define mirmince_hdr_PFX mirmince/
#endif
-#define mirmince_hdr_gen(x) < mirmince_hdr_PFX x >
-#define mirmince_hdr_md(x) mirmince_hdr_gen(md/__mirmincE_arch__/x)
-#define mirmince_hdr_osdep(x) mirmince_hdr_gen(osdep/__mirmincE_os__/x)
-#define mirmince_hdr_osmd(x) mirmince_hdr_gen(osdep/__mirmincE_os__/__mirmincE_arch__/x)
+#define mirmince_hdr_sysinc(x) < mirmince_hdr_PFX x >
+#define mirmince_hdr_md(x) mirmince_hdr_sysinc(md/__mirmincE_arch__/x)
+#define mirmince_hdr_osdep(x) mirmince_hdr_sysinc(osdep/__mirmincE_os__/x)
+#define mirmince_hdr_osmd(x) mirmince_hdr_sysinc(osdep/__mirmincE_os__/__mirmincE_arch__/x)
#endif
#include mirmince_hdr_md(asm.h)
diff --git a/include/mirmince/c.h b/include/mirmince/c.h
index 8f7637b..1a3c445 100644
--- a/include/mirmince/c.h
+++ b/include/mirmince/c.h
@@ -7,10 +7,10 @@
#else
#define mirmince_hdr_PFX mirmince/
#endif
-#define mirmince_hdr_gen(x) < mirmince_hdr_PFX x >
-#define mirmince_hdr_md(x) mirmince_hdr_gen(md/__mirmincE_arch__/x)
-#define mirmince_hdr_osdep(x) mirmince_hdr_gen(osdep/__mirmincE_os__/x)
-#define mirmince_hdr_osmd(x) mirmince_hdr_gen(osdep/__mirmincE_os__/__mirmincE_arch__/x)
+#define mirmince_hdr_sysinc(x) < mirmince_hdr_PFX x >
+#define mirmince_hdr_md(x) mirmince_hdr_sysinc(md/__mirmincE_arch__/x)
+#define mirmince_hdr_osdep(x) mirmince_hdr_sysinc(osdep/__mirmincE_os__/x)
+#define mirmince_hdr_osmd(x) mirmince_hdr_sysinc(osdep/__mirmincE_os__/__mirmincE_arch__/x)
#endif
#include mirmince_hdr_md(c.h)
@@ -49,7 +49,7 @@
#define mirmince_cc_syscall mirmince_cc_cdecl
#endif
-#include mirmince_hdr_gen(syscallc.h)
+#include mirmince_hdr_osdep(syscallc.h)
#define NULL ((void *)0)
hooks/post-receive
--
Main git repository for FreeWRT project mirmince
(FreeWRT project mirmince repository mirmince)
More information about the Mirmince-commits
mailing list