diff options
author | Peter Galbavy <peter@cvs.openbsd.org> | 1998-07-21 13:20:29 +0000 |
---|---|---|
committer | Peter Galbavy <peter@cvs.openbsd.org> | 1998-07-21 13:20:29 +0000 |
commit | 43b686d61558c0957f1779c747214ddef20a2252 (patch) | |
tree | 99fb41dbccee40683a84fe98aa3c6a9784911bf2 /lib/libpthread/scripts | |
parent | ea12e8eb2f8d4c89e854d9381f85ce8fb4688ad0 (diff) |
Complete initial import from mySQL 3.22.4 (mit-pthreads/).
Lots of dross to move and remove yet.
At minimum:
o remove GNU config and GNU Makefiles
o build arch directory and migrate away machdep/
o rebuild BSD Makefiles
o move notes etc. into doc/
Diffstat (limited to 'lib/libpthread/scripts')
-rwxr-xr-x | lib/libpthread/scripts/GNUmakefile.inc | 24 | ||||
-rw-r--r-- | lib/libpthread/scripts/Makefile.inc | 30 | ||||
-rwxr-xr-x | lib/libpthread/scripts/pgcc.sh | 32 |
3 files changed, 86 insertions, 0 deletions
diff --git a/lib/libpthread/scripts/GNUmakefile.inc b/lib/libpthread/scripts/GNUmakefile.inc new file mode 100755 index 00000000000..6309f28ca55 --- /dev/null +++ b/lib/libpthread/scripts/GNUmakefile.inc @@ -0,0 +1,24 @@ +VPATH := $(VPATH):${srcdir}/scripts +SCRIPTS= pgcc pg++ + +abspath := $(shell pwd) + +all-bin: $(SCRIPTS) + +pgcc: pgcc.sh + sed -e 's!EXEC_PREFIX!$(exec_prefix)!g' \ + -e 's!BUILD_PREFIX!$(abspath)!g' \ + -e 's!SRC_PREFIX!$(srcdir)!g' \ + -e 's!COMPILER!gcc!g' \ + < $(srcdir)/scripts/pgcc.sh > pgcc.new + chmod a+x pgcc.new + mv -f pgcc.new pgcc + +pg++: pgcc.sh + sed -e 's!EXEC_PREFIX!$(exec_prefix)!g' \ + -e 's!BUILD_PREFIX!$(abspath)!g' \ + -e 's!SRC_PREFIX!$(srcdir)!g' \ + -e 's!COMPILER!g++!g' \ + < $(srcdir)/scripts/pgcc.sh > pg++.new + chmod a+x pg++.new + mv -f pg++.new pg++ diff --git a/lib/libpthread/scripts/Makefile.inc b/lib/libpthread/scripts/Makefile.inc new file mode 100644 index 00000000000..441f6b51d29 --- /dev/null +++ b/lib/libpthread/scripts/Makefile.inc @@ -0,0 +1,30 @@ +.PATH : ${srcdir}/scripts +SCRIPTS= pgcc pg++ + +abspath != pwd + +all-bin: $(SCRIPTS) + +# +# Objects go in the obj directory for both BSD and GNU make but these +# scripts get put in the obj dir for BSD and the root dir for GNU. +# +pgcc: pgcc.sh + sed -e 's!EXEC_PREFIX!$(exec_prefix)!g' \ + -e 's!BUILD_PREFIX!$(.CURDIR)!g' \ + -e 's!SRC_PREFIX!$(srcdir)!g' \ + -e 's!COMPILER!gcc!g' \ + < $(srcdir)/scripts/pgcc.sh > pgcc.new + chmod a+x pgcc.new + mv -f pgcc.new pgcc + ln -fs obj/pgcc ../pgcc + +pg++: pgcc.sh + sed -e 's!EXEC_PREFIX!$(exec_prefix)!g' \ + -e 's!BUILD_PREFIX!$(.CURDIR)!g' \ + -e 's!SRC_PREFIX!$(srcdir)!g' \ + -e 's!COMPILER!g++!g' \ + < $(srcdir)/scripts/pgcc.sh > pg++.new + chmod a+x pg++.new + mv -f pg++.new pg++ + ln -fs obj/pg++ ../pg++ diff --git a/lib/libpthread/scripts/pgcc.sh b/lib/libpthread/scripts/pgcc.sh new file mode 100755 index 00000000000..6bd6cbeccdb --- /dev/null +++ b/lib/libpthread/scripts/pgcc.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +pthreads_root=EXEC_PREFIX +build_root=BUILD_PREFIX +src_root=SRC_PREFIX + +include_dir='-I$pthreads_root/include' +lib_dir='-L$pthreads_root/lib' +libs='-lpthread -lm -lgcc -lpthread' + +# Might be a good idea to also provide a way to override pthreads_root +# so that we can use this script in the build tree, before installation. +if arg="$1" ; then + case $arg in + -notinstalled) + include_dir='-I$build_root/include -I$src_root/include' + lib_dir='-L$build_root/obj' + shift + ;; + esac +fi + +for arg in "$@" ; do + case $arg in + -nostdinc) include_dir= ;; + -nostdlib | -c) libs= ;; + esac +done + +# Include the -L option in any case, just in case the user provided the +# names of some libraries we've built threaded versions of. +eval exec COMPILER '"$@"' $include_dir $lib_dir $libs |