diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-09 00:27:59 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2010-02-09 00:27:59 +0100 |
commit | fadb47884308490085a33d3fb1e857a0f5e5d748 (patch) | |
tree | b78955b59ae121e50753c0d09e5e298c8ccf05cf | |
parent | 91e7244abc54001dc7b1063cd1b9818d46128bba (diff) | |
parent | a619c16fa72c3c15a198b452e512a08f18251930 (diff) |
resolve conflict
-rw-r--r-- | config/Makefile | 9 | ||||
-rw-r--r-- | makefile | 35 | ||||
-rw-r--r-- | mk/package.mk | 4 | ||||
-rw-r--r-- | mk/pkg-bottom.mk | 10 | ||||
-rw-r--r-- | package/Makefile | 1 | ||||
-rwxr-xr-x | scripts/cpio | 14 | ||||
-rw-r--r-- | scripts/rstrip.sh | 1 | ||||
-rw-r--r-- | scripts/scan-tools.sh | 20 | ||||
-rwxr-xr-x | scripts/tarpkg | 2 |
9 files changed, 68 insertions, 28 deletions
diff --git a/config/Makefile b/config/Makefile index 97a8f3a3a..1f3143e34 100644 --- a/config/Makefile +++ b/config/Makefile @@ -31,6 +31,7 @@ ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) HOSTNCURSES+= -DCURSES_LOC="<ncurses.h>" else HOSTNCURSES+= -DCURSES_LOC="<curses.h>" +LIBS= -lcurses endif endif endif @@ -47,16 +48,16 @@ MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC)) conf: $(CONF_OBJS) $(SHARED_OBJS) - $(HOSTCC) -DKBUILD_NO_NLS $(NATIVE_LDFLAGS) $^ -o $@ + $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ mconf: $(MCONF_OBJS) $(SHARED_OBJS) - $(HOSTCC) -DKBUILD_NO_NLS $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) + $(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) $(CONF_OBJS): %.o : %.c $(SHARED_DEPS) - $(HOSTCC) -DKBUILD_NO_NLS $(HOSTCFLAGS) -I. -c $< -o $@ + $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ $(MCONF_OBJS): %.o : %.c $(SHARED_DEPS) - $(HOSTCC) -DKBUILD_NO_NLS $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ + $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ glob.o: glob.c $(SHARED_DEPS) $(HOSTCC) $(HOSTCFLAGS) -I. -c glob.c -o $@ diff --git a/makefile b/makefile new file mode 100644 index 000000000..760d123d6 --- /dev/null +++ b/makefile @@ -0,0 +1,35 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +ADKVERSION= 0.1.0 +TOPDIR= ${.CURDIR} +PWD= ${.CURDIR} + +.include "${.CURDIR}/Makefile.inc" + +GMAKE_ENV+= ADKVERSION=${ADKVERSION:Q} + +.if defined(package) && !empty(package) +subdir:= package/${package} +. if !make(clean) +_subdir_dep:= ${TOPDIR}/.ADK_HAVE_DOT_CONFIG +. endif +.endif + +.if defined(subdir) && !empty(subdir) +_subdir:= ${.TARGETS} +${.TARGETS}: _subdir + +_subdir: ${_subdir_dep} + @if test x"$$(umask 2>/dev/null | sed 's/00*22/OK/')" != x"OK"; then \ + echo >&2 Error: you must build with “umask 022”, sorry.; \ + exit 1; \ + fi + cd ${.CURDIR}/${subdir} && TOPDIR=${.CURDIR} DEVELOPER=1 \ + ${GMAKE} VERBOSE=1 ${.MFLAGS} ${_subdir} + +. include "${.CURDIR}/prereq.mk" +. include "${.CURDIR}/mk/split-cfg.mk" +.else +. include "${.CURDIR}/Makefile" +.endif diff --git a/mk/package.mk b/mk/package.mk index dbf383c8b..cd1f47b6d 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -220,7 +220,7 @@ ifeq (,$(filter noremove,$(7))) fi endif @rm -f '$${STAGING_PARENT}/pkg/$(1)' - @cd $${IDIR_$(1)}; \ + @-cd $${IDIR_$(1)}; \ x=$$$$(find tmp var -mindepth 1 2>/dev/null); if [[ -n $$$$x ]]; then \ echo 'WARNING: $${IPKG_$(1)} installs files into a' \ 'ramdisk location:' >&2; \ @@ -233,7 +233,7 @@ endif find usr ! -type d 2>/dev/null | \ grep -v -e '^usr/share' -e '^usr/man' -e '^usr/info' | \ tee '$${STAGING_PARENT}/pkg/$(1)' | \ - cpio -apdlmu '$${STAGING_DIR}' + cpio -padlmu '$${STAGING_DIR}' @cd '$${STAGING_DIR}'; grep 'usr/lib/.*\.la$$$$' \ '$${STAGING_PARENT}/pkg/$(1)' | while read fn; do \ chmod u+w $$$$fn; \ diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index e136392d7..5d6d8cc30 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -136,6 +136,9 @@ ifneq ($(filter manual,${INSTALL_STYLE}),) else ifeq ($(strip ${INSTALL_STYLE}),) cd ${WRKBUILD} && env ${MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ DESTDIR='${WRKINST}' ${FAKE_FLAGS} ${INSTALL_TARGET} $(MAKE_TRACE) +ifeq (,$(filter libonly,${PKG_OPTS})) + env ${MAKE_ENV} ${MAKE} post-install $(MAKE_TRACE) +endif else @echo "Invalid INSTALL_STYLE '${INSTALL_STYLE}'" >&2 @exit 1 @@ -144,9 +147,6 @@ endif [[ -e $$a ]] || continue; \ $(SED) "s,^prefix=.*,prefix=${STAGING_DIR}/usr," $$a; \ done -ifeq (,$(filter libonly,${PKG_OPTS})) - @env ${MAKE_ENV} ${MAKE} post-install $(MAKE_TRACE) -endif ifeq (,$(filter noremove,${PKG_OPTS})) @if test -s '${STAGING_PARENT}/pkg/${PKG_NAME}'; then \ cd '${STAGING_DIR}'; \ @@ -156,7 +156,7 @@ ifeq (,$(filter noremove,${PKG_OPTS})) fi endif @rm -f '${STAGING_PARENT}/pkg/${PKG_NAME}' - @cd ${WRKINST}; \ + @-cd ${WRKINST}; \ if [ "${PKG_NAME}" != "uClibc" -a "${PKG_NAME}" != "eglibc" -a "${PKG_NAME}" != "glibc" -a "${PKG_NAME}" != "libpthread" -a "${PKG_NAME}" != "libstdcxx" -a "${PKG_NAME}" != "libthread-db" ];then \ find lib \( -name lib\*.so\* -o -name lib\*.a \) \ -exec echo 'WARNING: ${PKG_NAME} installs files in /lib -' \ @@ -164,7 +164,7 @@ endif find usr ! -type d 2>/dev/null | \ grep -v -e '^usr/share' -e '^usr/man' -e '^usr/info' | \ tee '${STAGING_PARENT}/pkg/${PKG_NAME}' | \ - cpio -apdlmu '${STAGING_DIR}' + cpio -padlmuv '${STAGING_DIR}' @cd '${STAGING_DIR}'; grep 'usr/lib/.*\.la$$' \ '${STAGING_PARENT}/pkg/${PKG_NAME}' | while read fn; do \ chmod u+w $$fn; \ diff --git a/package/Makefile b/package/Makefile index 0f8c43a92..4c8e63b92 100644 --- a/package/Makefile +++ b/package/Makefile @@ -56,7 +56,6 @@ $(TARGET_DIR): $(CMD_TRACE) " done" $(END_TRACE) -#%-install: %-compile %-install: @$(START_TRACE) "package/$(patsubst %-install,%,$@)-install: " @$(MAKE) -C $(patsubst %-install,%,$@) install diff --git a/scripts/cpio b/scripts/cpio index fc671ca48..1c481221e 100755 --- a/scripts/cpio +++ b/scripts/cpio @@ -2,8 +2,18 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. +os=$(uname) +case $os in + NetBSD|MirBSD) + quiet="" + ;; + *) + quiet="--quiet" + ;; +esac if [ -x /usr/bin/cpio ];then - /usr/bin/cpio --quiet "$@" + /usr/bin/cpio $quiet "$@" else - /bin/cpio --quiet "$@" + /bin/cpio $quiet "$@" fi + diff --git a/scripts/rstrip.sh b/scripts/rstrip.sh index d897c0ef3..591c5bb07 100644 --- a/scripts/rstrip.sh +++ b/scripts/rstrip.sh @@ -58,3 +58,4 @@ find $TARGETS -type f -a -exec file {} \; | \ echo "-> $T $F" eval "$T $F" done +exit 0 diff --git a/scripts/scan-tools.sh b/scripts/scan-tools.sh index 743f316b0..56b79663d 100644 --- a/scripts/scan-tools.sh +++ b/scripts/scan-tools.sh @@ -47,12 +47,7 @@ CYG*) echo 'See http://www.cygwin.com/1.7/cygwin-ug-net/using-specialnames.html' ;; NetBSD) - echo "Building OpenADK on $os is currently unsupported." - echo "Sorry." - echo - echo There are unresolved issues relating to ncurses not - echo being included in NetBSD®, and these provided by pkgsrc® - echo lack important header files. + # supported with no extra quirks at the moment ;; OpenBSD) # supported with no extra quirks at the moment @@ -191,13 +186,12 @@ if [[ $X != *@(Native compiler works)* ]]; then out=1 fi -[[ -s /usr/include/ncurses.h ]] || if [[ -s /usr/pkg/include/ncurses.h ]]; then - echo 'HOSTCFLAGS+= -isystem /usr/pkg/include' >>$topdir/prereq.mk - echo 'HOSTLDFLAGS+=-L/usr/pkg/lib -Wl,-rpath -Wl,/usr/pkg/lib' >>$topdir/prereq.mk -else - echo Install ncurses header files, please. - echo - out=1 +if [[ ! -s /usr/include/ncurses.h ]]; then + if [[ ! -s /usr/include/curses.h ]]; then + echo Install ncurses header files, please. + echo + out=1 + fi fi if ! which gawk >/dev/null 2>&1; then diff --git a/scripts/tarpkg b/scripts/tarpkg index 37c0b2079..6eca63a6f 100755 --- a/scripts/tarpkg +++ b/scripts/tarpkg @@ -1,6 +1,6 @@ #!/usr/bin/env bash # create/install compressed tar balls -#set -x +set -x if [ "$1" = "build" ];then if [ ! -d $2 ];then |