Corrected the automatic installation of third-party tool setups and
libraries (for now, specifically the xschem setup and the alphanumeric
layout library), and cleaned up the instructions to make it clear how
to do the installation in the most common case.
diff --git a/.gitignore b/.gitignore
index 3c2b7bd..e140415 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,6 +18,4 @@
 !.travisCI/Makefile
 
 # local install cache
-/pdks
-/libs
-/tools
\ No newline at end of file
+/sources
diff --git a/README b/README
index fce389d..9514ed0 100644
--- a/README
+++ b/README
@@ -3,15 +3,27 @@
 
 ----------------------------------------------------------------------------------
 
-Written by Tim Edwards 2019 / 2020 for efabless (efabless.com)
+Written by Tim Edwards 2019 - 2021 for efabless (efabless.com)
 and Open Circuit Design (opencircuitdesign.com)
 
 URL: http://opencircuitdesign.com/open_pdks
+Mirror URL: https://github.com/RTimothyEdwards/open_pdks
 
 Distributed under the Apache-2.0 license (see file LICENSE).
 
 ----------------------------------------------------------------------------------
 
+Quick Install:
+
+    Looking to install the Google/SkyWater SKY130 PDK libraries and setup
+    files for open source EDA tools?  Read the README file in the sky130/
+    directory.
+
+    The rest of this README file is general information about open_pdks
+    and is not specific to any single PDK.
+
+----------------------------------------------------------------------------------
+
 Introduction:
 
     Silicon foundry PDKs are notoriously non-standard, and files obtained
diff --git a/common/netlist_to_layout.py b/common/netlist_to_layout.py
index 0c228ef..d6fca22 100755
--- a/common/netlist_to_layout.py
+++ b/common/netlist_to_layout.py
@@ -14,8 +14,7 @@
 # Updated December 17, 2016
 # Version 1.0
 # Imported December 22, 2020 to open_pdks
-# To do: Rework from electric to xschem and support both EF_STYLE = 0
-# and 1 styles of directory structures from open_pdks.
+# Updated February 10, 2021 for use running on netlist alone
 #---------------------------------------------------------------------
 
 import os
@@ -23,118 +22,7 @@
 import sys
 import subprocess
 
-# Routines to generate netlist from schematic if needed
-
-def check_schematic_out_of_date(spipath, schempath, schematic_name):
-    # Check if a netlist (spipath) is out-of-date relative to the schematics
-    # (schempath).  Need to read the netlist and check all of the subcells.
-    need_capture = False
-    if not os.path.isfile(spipath):
-        return True
-    if os.path.isfile(schempath):
-        spi_statbuf = os.stat(spipath)
-        sch_statbuf = os.stat(schempath)
-        if spi_statbuf.st_mtime < sch_statbuf.st_mtime:
-            # netlist exists but is out-of-date
-            need_capture = True
-        else:
-            # only found that the top-level-schematic is older than the
-            # netlist.  Now need to read the netlist, find all subcircuits,
-            # and check those dates, too.
-            schemdir = os.path.split(schempath)[0]
-            subrex = re.compile('^[^\*]*[ \t]*.subckt[ \t]+([^ \t]+).*$', re.IGNORECASE)
-            with open(spipath, 'r') as ifile:
-                duttext = ifile.read()
- 
-            dutlines = duttext.replace('\n+', ' ').splitlines()
-            for line in dutlines:
-                lmatch = subrex.match(line)
-                if lmatch:
-                    subname = lmatch.group(1)
-                    # NOTE: Electric uses library:cell internally to track libraries,
-                    # and maps the ":" to "__" in the netlist.  Not entirely certain that
-                    # the double-underscore uniquely identifies the library:cell. . .
-                    librex = re.compile('(.*)__(.*)', re.IGNORECASE)
-                    lmatch = librex.match(subname)
-                    if lmatch:
-                        elecpath = os.path.split(os.path.split(schempath)[0])[0]
-                        libname = lmatch.group(1)
-                        subschem = elecpath + '/' + libname + '.delib/' + lmatch.group(2) + '.sch'
-                    else:
-                        libname = {}
-                        subschem = schemdir + '/' + subname + '.sch'
-                    # subcircuits that cannot be found in the current directory are
-                    # assumed to be library components and therefore never out-of-date.
-                    if os.path.exists(subschem):
-                        sub_statbuf = os.stat(subschem)
-                        if spi_statbuf.st_mtime < sub_statbuf.st_mtime:
-                            # netlist exists but is out-of-date
-                            need_capture = True
-                            break
-                    # mapping of characters to what's allowed in SPICE makes finding
-                    # the associated schematic file a bit difficult.  Requires wild-card
-                    # searching.
-                    elif libname:
-                        restr = lmatch.group(2) + '.sch'
-                        restr = restr.replace('.', '\.')
-                        restr = restr.replace('_', '.')
-                        schrex = re.compile(restr, re.IGNORECASE)
-                        libpath = elecpath + '/' + libname + '.delib'
-                        if os.path.exists(libpath):
-                            liblist = os.listdir(libpath)
-                            for file in liblist:
-                                lmatch = schrex.match(file)
-                                if lmatch:
-                                    subschem = libpath + '/' + file
-                                    sub_statbuf = os.stat(subschem)
-                                    if spi_statbuf.st_mtime < sch_statbuf.st_mtime:
-                                        # netlist exists but is out-of-date
-                                        need_capture = True
-                                    break
-    return need_capture
-
-def generate_schematic_netlist(schem_path, schem_src, project_path, schematic_name):
-    # Does schematic netlist exist and is it current?
-    if check_schematic_out_of_date(schem_path, schem_src, schematic_name):
-        # elec2spi will not run unless /spi/stub directory is present
-        if not os.path.exists(project_path + '/spi'):
-            os.makedirs(project_path + '/spi')
-        if not os.path.exists(project_path + '/spi/stub'):
-            os.makedirs(project_path + '/spi/stub')
-
-        # elec2spi will run, but not correctly, if the .java directory is not present
-        if not os.path.exists(project_path + '/elec/.java'):
-            # Same behavior as project manager. . . copy from skeleton directory
-            pdkdir = os.path.join(project_path, '.ef-config/techdir')
-            dotjava = os.path.join(pdkdir, 'libs.tech/deskel/dotjava')
-            if not os.path.exists(dotjava):
-                dotjava = '/ef/efabless/deskel/dotjava'
-
-            if os.path.exists(dotjava):
-                try:
-                    shutil.copytree(dotjava, project_path + '/elec/.java', symlinks = True)
-                except IOError as e:
-                    print('Error copying files: ' + str(e))
-
-        print('Generating schematic netlist.')
-        eproc = subprocess.Popen(['/ef/efabless/bin/elec2spi',
-			'-o', schem_path, '-LP', '-TS', '-NTI', schematic_name + '.delib',
-			schematic_name + '.sch'], stdout=subprocess.PIPE,
-			stderr=subprocess.STDOUT, cwd = project_path + '/elec/')
-        elecout = eproc.communicate()[0]
-        outlines = elecout.splitlines()
-        for line in outlines:
-            print(line)
-        if eproc.returncode != 0:
-            print('Bad result from elec2spi -o ' + schem_path + ' -LP -TS -NTI ' + schematic_name + '.delib ' + schematic_name + '.sch')
-            print('Failure to generate new schematic netlist.')
-            return False
-    return True
-
-def generate_layout_start(library):
-    # Write out a TCL script to generate the layout
-    ofile = open('create_script.tcl', 'w')
-
+def generate_layout_start(library, ofile=sys.stdout):
     # Write a couple of simplifying procedures
     print('#!/usr/bin/env wish', file=ofile)
     print('#-------------------------------------', file=ofile)
@@ -179,13 +67,14 @@
         print('namespace import ${PDKNAMESPACE}::*', file=ofile)
     print('suspendall', file=ofile)
     return ofile
-
-def generate_layout_add(ofile, subname, subpins, complist, library):
+ 
+def generate_layout_add(subname, subpins, complist, library, ofile=sys.stdout):
     parmrex = re.compile('([^=]+)=([^=]+)', re.IGNORECASE)
     exprrex = re.compile('\'([^\']+)\'', re.IGNORECASE)
     librex  = re.compile('(.*)__(.*)', re.IGNORECASE)
 
     print('load ' + subname, file=ofile)
+
     print('box 0um 0um 0um 0um', file=ofile)
     print('', file=ofile)
 
@@ -266,21 +155,34 @@
         print('', file=ofile)
     print('save ' + subname, file=ofile)
                 
-def generate_layout_end(ofile):
+def generate_layout_end(ofile=sys.stdout):
     print('resumeall', file=ofile)
     print('refresh', file=ofile)
     print('writeall force', file=ofile)
     print('quit', file=ofile)
-    ofile.close()
+
+def usage():
+    print('Usage:')
+    print('	netlist_to_layout.py <filename> [<namespace>] [-options]')
+    print('')
+    print('Arguments:')
+    print('	<filename> is the path to the SPICE netlist to import to magic')
+    print('	<namespace> is the namespace of the PDK')
+    print('')
+    print('Options:')
+    print('	-keep	Keep the working script after completion.')
+    print('	-help	Print this help text.')
+
+# Main procedure
 
 if __name__ == '__main__':
 
-   # Parse command line for options and arguments
-    options = []
+    # Parse command line for options and arguments
+    optionlist = []
     arguments = []
     for item in sys.argv[1:]:
         if item.find('-', 0) == 0:
-            options.append(item)
+            optionlist.append(item)
         else:
             arguments.append(item)
 
@@ -291,39 +193,53 @@
         else:
             library = None
     else:
-        raise SyntaxError('Usage: ' + sys.argv[0] + ' netlist_file [library] [-options]\n')
+        usage()
+        sys.exit(0)
 
-    debug = False
-    for item in options:
+    debugmode = False
+    keepmode = False
+
+    for item in optionlist:
         result = item.split('=')
         if result[0] == '-help':
-            print('Usage: ' + sys.argv[0] + ' netlist_file [-options]\n')
+            usage()
+            sys.exit(0)
         elif result[0] == '-debug':
-            debug = True
+            debugmode = True
+        elif result[0] == '-keep':
+            keepmode = True
         else:
-            raise SyntaxError('Bad option ' + item + ', options are -help\n')
+            usage()
+            sys.exit(1)
 
-    # Check if netlist exists or needs updating.
     netpath = os.path.split(inputfile)[0]
-    netfile = os.path.split(inputfile)[1]
-    netname = os.path.splitext(netfile)[0]
-    projectpath = os.path.split(netpath)[0]
-    projectname = os.path.split(projectpath)[1]
+    if netpath == '':
+        netpath = os.getcwd()
 
-    elec_path = projectpath + '/elec/' + projectname + '.delib'
-    schem_src = elec_path + '/' + projectname + '.sch'
+    if os.path.splitext(inputfile)[1] == '.sch':
+        print('Sorry, automatic conversion of schematic to netlist not yet supported.')
+        sys.exit(1)
 
-    if not generate_schematic_netlist(inputfile, schem_src, projectpath, netname):
-        raise SyntaxError('File ' + inputfile + ':  Failure to generate netlist.')
+    netroot = os.path.split(netpath)[0]
+    magpath = os.path.join(netroot, 'mag')
+    if not os.path.isdir(magpath):
+        print('Error:  Layout path "' + magpath + '" does not exist or is not readable.')
+        sys.exit(1)
+
+    # NOTE:  There should be some attempt to find the installed PDK magicrc file
+    # if there is no mag/ directory.
+    rcfile = '.magicrc'
+    rcfilepath = os.path.join(magpath, rcfile)
+    if not os.path.isfile(rcfilepath):
+        print('Error:  No startup script file "' + rcfilepath + '"')
+        sys.exit(1)
 
     # Read SPICE netlist
-
     with open(inputfile, 'r') as ifile:
         spicetext = ifile.read()
         
     subrex = re.compile('.subckt[ \t]+(.*)$', re.IGNORECASE)
-    # All devices are going to be subcircuits
-    xrex = re.compile('[xmcrbdi]([^ \t]+)[ \t](.*)$', re.IGNORECASE)
+    devrex = re.compile('[xmcrbdi]([^ \t]+)[ \t](.*)$', re.IGNORECASE)
     namerex = re.compile('([^= \t]+)[ \t]+(.*)$', re.IGNORECASE)
     endsrex = re.compile('^[ \t]*\.ends', re.IGNORECASE)
 
@@ -334,31 +250,59 @@
     subname = ''
     subpins = ''
     complist = []
-    ofile = generate_layout_start(library)
-    for line in spicelines:
-        if not insub:
-            lmatch = subrex.match(line)
-            if lmatch:
-                rest = lmatch.group(1)
-                smatch = namerex.match(rest)
-                if smatch:
-                    subname = smatch.group(1)
-                    subpins = smatch.group(2)
-                    insub = True
-                else:
-                    raise SyntaxError('File ' + inputfile + ':  Failure to parse line ' + line)
-                    break
-        else:
-            lmatch = endsrex.match(line)
-            if lmatch:
-                insub = False
-                generate_layout_add(ofile, subname, subpins, complist, library)
-                subname = None
-                subpins = None
-                complist = []
-            else:
-                xmatch = xrex.match(line)
-                if xmatch:
-                    complist.append(line)
+    scriptfile = 'generate_layout.tcl'
+    scriptpath = os.path.join(magpath, scriptfile)
 
-    generate_layout_end(ofile)
+    with open(scriptpath, 'w') as ofile:
+        generate_layout_start(library, ofile)
+        for line in spicelines:
+            if not insub:
+                lmatch = subrex.match(line)
+                if lmatch:
+                    rest = lmatch.group(1)
+                    smatch = namerex.match(rest)
+                    if smatch:
+                        subname = smatch.group(1)
+                        subpins = smatch.group(2)
+                        insub = True
+                    else:
+                        print('File ' + inputfile + ':  Failure to parse line ' + line)
+            else:
+                lmatch = endsrex.match(line)
+                if lmatch:
+                    insub = False
+                    generate_layout_add(subname, subpins, complist, library, ofile)
+                    subname = None
+                    subpins = None
+                    complist = []
+                else:
+                    dmatch = devrex.match(line)
+                    if dmatch:
+                        complist.append(line)
+
+        generate_layout_end(ofile)
+
+    myenv = os.environ.copy()
+    myenv['MAGTYPE'] = 'mag'
+
+    # Run the layout generator
+    mproc = subprocess.run(['magic', '-dnull', '-noconsole', '-rcfile',
+		rcfile, scriptfile],
+		stdin = subprocess.DEVNULL, stdout = subprocess.PIPE,
+		stderr = subprocess.PIPE, cwd = magpath,
+		env = myenv, universal_newlines = True)
+    if mproc.stdout:
+        for line in mproc.stdout.splitlines():
+            print(line)
+    if mproc.stderr:
+        print('Error message output from magic:')
+        for line in mproc.stderr.splitlines():
+            print(line)
+    if mproc.returncode != 0:
+        print('ERROR:  Magic exited with status ' + str(mproc.returncode))
+
+    # Clean up
+    if not keepmode:
+        os.remove(scriptpath)
+
+    sys.exit(0)
diff --git a/common/staging_install.py b/common/staging_install.py
index 33358c7..2b4fa4c 100755
--- a/common/staging_install.py
+++ b/common/staging_install.py
@@ -63,7 +63,8 @@
 # symbolic links.
 
 def filter_recursive(tooldir, stagingdir, localdir):
-    gdstypes = ['.gds', '.gds2', '.gdsii']
+    # Add any non-ASCII file types here
+    bintypes = ['.gds', '.gds2', '.gdsii', '.png']
 
     if not os.path.exists(tooldir):
         return 0
@@ -73,6 +74,9 @@
     toolfiles = os.listdir(tooldir)
     total = 0
 
+    # Add any non-ASCII 
+    binexts = ['.png']
+
     for file in toolfiles:
         # Do not attempt to do text substitutions on a binary file!
         if os.path.splitext(file)[1] in gdstypes:
diff --git a/scripts/configure b/scripts/configure
index a199e50..9af84fd 100755
--- a/scripts/configure
+++ b/scripts/configure
@@ -587,11 +587,11 @@
 ac_subst_vars='LTLIBOBJS
 LIBOBJS
 EF_STYLE
-XSCHEM_PATH
+XSCHEM_SKY130_PATH
 SKY130_ML_XX_HD_PATH
-OSU_PATH
 PATCH
 MAGIC
+XSCHEM_DISABLED
 QFLOW_DISABLED
 OPENLANE_DISABLED
 IRSIM_DISABLED
@@ -630,6 +630,7 @@
 docdir
 oldincludedir
 includedir
+runstatedir
 localstatedir
 sharedstatedir
 sysconfdir
@@ -662,9 +663,9 @@
 enable_irsim
 enable_openlane
 enable_qflow
-enable_osu_lib
-enable_alpha_lib
 enable_xschem
+enable_alpha_sky130
+enable_xschem_sky130
 with_ef_style
 '
       ac_precious_vars='build_alias
@@ -709,6 +710,7 @@
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -961,6 +963,15 @@
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
 
+  -runstatedir | --runstatedir | --runstatedi | --runstated \
+  | --runstate | --runstat | --runsta | --runst | --runs \
+  | --run | --ru | --r)
+    ac_prev=runstatedir ;;
+  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+  | --run=* | --ru=* | --r=*)
+    runstatedir=$ac_optarg ;;
+
   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
     ac_prev=sbindir ;;
   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1098,7 +1109,7 @@
 for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
 		datadir sysconfdir sharedstatedir localstatedir includedir \
 		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir
+		libdir localedir mandir runstatedir
 do
   eval ac_val=\$$ac_var
   # Remove trailing slashes.
@@ -1251,6 +1262,7 @@
   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
   --libdir=DIR            object code libraries [EPREFIX/lib]
   --includedir=DIR        C header files [PREFIX/include]
   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
@@ -1285,48 +1297,39 @@
                           with a pdk_url file can automatically download them
                           if the path is omitted)"
   --enable-klayout
-                Enable or disable klayout [default=enabled]
+                Enable or disable klayout setup [default=enabled]
 
 
   --enable-magic
-                Enable or disable magic [default=enabled]
+                Enable or disable magic setup [default=enabled]
 
 
   --enable-netgen
-                Enable or disable netgen [default=enabled]
+                Enable or disable netgen setup [default=enabled]
 
 
   --enable-irsim
-                Enable or disable irsim [default=enabled]
+                Enable or disable irsim setup [default=enabled]
 
 
   --enable-openlane
-                Enable or disable openlane [default=enabled]
+                Enable or disable openlane setup [default=enabled]
 
 
   --enable-qflow
-                Enable or disable qflow [default=enabled]
+                Enable or disable qflow setup [default=enabled]
 
 
-  --enable-osu-lib[=path] Install osu. If path is omitted, it'll be
-                          downloaded. [default=disabled]
-  --enable-alpha-lib[=path]
+  --enable-xschem
+                Enable or disable xschem setup [default=enabled]
+
+
+  --enable-alpha-sky130[=path]
                           Install sky130_ml_xx_hd. If path is omitted, it'll be
                           downloaded. [default=disabled]
-  --enable-xschem[=path]  Install xschem. If path is omitted, it'll be
+  --enable-xschem-sky130[=path]
+                          Install xschem_sky130. If path is omitted, it'll be
                           downloaded. [default=disabled]
-  --enable-klayout --disable-klayout
-                          Enable or disable klayout [default=enabled]
-  --enable-magic --disable-magic
-                          Enable or disable magic [default=enabled]
-  --enable-netgen --disable-netgen
-                          Enable or disable netgen [default=enabled]
-  --enable-irsim --disable-irsim
-                          Enable or disable irsim [default=enabled]
-  --enable-openlane --disable-openlane
-                          Enable or disable openlane [default=enabled]
-  --enable-qflow --disable-qflow
-                          Enable or disable qflow [default=enabled]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1819,7 +1822,7 @@
   $as_echo_n "(cached) " >&6
 else
 
-	for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+	for am_cv_pathless_PYTHON in python python2 python3  python3.9 python3.8 python3.7 python3.6 python3.5 python3.4 python3.3  python3.2 python3.1 python3.0  python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1  python2.0 none; do
 	  test "$am_cv_pathless_PYTHON" = none && break
 	  prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
@@ -2042,28 +2045,33 @@
 
     if test -z $PYTHON;
     then
-        PYTHON="python"
+        if test -z "";
+        then
+            PYTHON="python3"
+        else
+            PYTHON=""
+        fi
     fi
     PYTHON_NAME=`basename $PYTHON`
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking $PYTHON_NAME module: distutils" >&5
 $as_echo_n "checking $PYTHON_NAME module: distutils... " >&6; }
-	$PYTHON -c "import distutils" 2>/dev/null
-	if test $? -eq 0;
-	then
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+    $PYTHON -c "import distutils" 2>/dev/null
+    if test $? -eq 0;
+    then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-		eval HAVE_PYMOD_DISTUTILS=yes
-	else
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        eval HAVE_PYMOD_DISTUTILS=yes
+    else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-		eval HAVE_PYMOD_DISTUTILS=no
-		#
-		if test -n ""
-		then
-			as_fn_error $? "failed to find required module distutils" "$LINENO" 5
-			exit 1
-		fi
-	fi
+        eval HAVE_PYMOD_DISTUTILS=no
+        #
+        if test -n ""
+        then
+            as_fn_error $? "failed to find required module distutils" "$LINENO" 5
+            exit 1
+        fi
+    fi
 
 
 realpath() {
@@ -2077,11 +2085,8 @@
 # define tools
 # define tools to install setup files for.  This does not imply that the tools are
 # available on the system;  just that open_pdks will install the setup files for them.
-## DO NOT INCLUDE XSCHEM IN THE TOOL LIST. XSCHEM CAN BE INSTALLED IN THE CONFIG SCRIPT
 
 
-mkdir -p ../pdks
-
 # check for the source and install paths for each PDK.
 
 
@@ -2092,6 +2097,7 @@
 
     # --enable-pdk-[pdk]=/path/to/pdk
 
+        echo "Checking technology sky130..."
 
 
         SKY130_SOURCE_PATH=""
@@ -2100,53 +2106,53 @@
         SKY130_LINK_TARGETS="none"
 
         pdk_get() {
-            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../sky130/pdk_info" >&5
-$as_echo_n "checking for ../sky130/pdk_info... " >&6; }
-if ${ac_cv_file____sky130_pdk_info+:} false; then :
+            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../sky130/pdk_info.txt" >&5
+$as_echo_n "checking for ../sky130/pdk_info.txt... " >&6; }
+if ${ac_cv_file____sky130_pdk_info_txt+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "../sky130/pdk_info"; then
-  ac_cv_file____sky130_pdk_info=yes
+if test -r "../sky130/pdk_info.txt"; then
+  ac_cv_file____sky130_pdk_info_txt=yes
 else
-  ac_cv_file____sky130_pdk_info=no
+  ac_cv_file____sky130_pdk_info_txt=no
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____sky130_pdk_info" >&5
-$as_echo "$ac_cv_file____sky130_pdk_info" >&6; }
-if test "x$ac_cv_file____sky130_pdk_info" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____sky130_pdk_info_txt" >&5
+$as_echo "$ac_cv_file____sky130_pdk_info_txt" >&6; }
+if test "x$ac_cv_file____sky130_pdk_info_txt" = xyes; then :
 
-                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../pdks/sky130" >&5
-$as_echo_n "checking for ../pdks/sky130... " >&6; }
-if ${ac_cv_file____pdks_sky130+:} false; then :
+                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../sources/sky130" >&5
+$as_echo_n "checking for ../sources/sky130... " >&6; }
+if ${ac_cv_file____sources_sky130+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "../pdks/sky130"; then
-  ac_cv_file____pdks_sky130=yes
+if test -r "../sources/sky130"; then
+  ac_cv_file____sources_sky130=yes
 else
-  ac_cv_file____pdks_sky130=no
+  ac_cv_file____sources_sky130=no
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____pdks_sky130" >&5
-$as_echo "$ac_cv_file____pdks_sky130" >&6; }
-if test "x$ac_cv_file____pdks_sky130" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____sources_sky130" >&5
+$as_echo "$ac_cv_file____sources_sky130" >&6; }
+if test "x$ac_cv_file____sources_sky130" = xyes; then :
 
                     echo "Using pre-existing sky130 download..."
 
 else
 
-                    REPO=$(cat "../sky130/pdk_info" | sed -n "1p")
-                    POST_CLONE_COMMANDS=$(cat "../sky130/pdk_info" | sed "1d")
-                    mkdir -p ../pdks
-                    git clone "$REPO" ../pdks/sky130;
-                    (cd ../pdks/sky130 && sh -c "$POST_CLONE_COMMANDS")
+                    REPO=$(cat "../sky130/pdk_info.txt" | sed -n "1p")
+                    POST_CLONE_COMMANDS=$(cat "../sky130/pdk_info.txt" | sed "1d")
+                    mkdir -p ../sources
+                    git clone "$REPO" ../sources/sky130;
+                    (cd ../sources/sky130 && sh -c "$POST_CLONE_COMMANDS")
 
 fi
 
-                export SKY130_SOURCE_PATH=../pdks/sky130
+                export SKY130_SOURCE_PATH=../sources/sky130
 
 else
 
@@ -2165,9 +2171,9 @@
                     FOUND=1
                 fi
             done
-            if [ "$FOUND" = "sky130" ]; then
-                echo "Could not found sky130 in standard search paths, manually downloading to ../pdks/sky130 ..."
-                pdk_find
+            if [ "$FOUND" = "0" ]; then
+                echo "Could not find sky130 in standard search paths, automatically fetching repository to ../sources/sky130 ..."
+                pdk_get
             fi
         }
 
@@ -2175,18 +2181,14 @@
 if test "${enable_sky130_pdk+set}" = set; then :
   enableval=$enable_sky130_pdk;
                 if test "$enableval" == "yes" -o "$enableval" == "YES"; then
-                   pdk_find
+		    echo "Looking for sky130 in usual places"
+                    pdk_find
                 elif test "$enableval" == "no" -o "$enableval" == "NO"; then
                     echo "Disabling sky130..."
                 else
                     SKY130_SOURCE_PATH=$enableval
                 fi
 
-else
-
-                pdk_find
-
-
 fi
 
 	    # # Require this argument
@@ -2292,8 +2294,8 @@
 # Set variables for tool setups
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Found tools: klayout magic netgen irsim openlane qflow" >&5
-$as_echo "$as_me: Found tools: klayout magic netgen irsim openlane qflow" >&6;}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Found tools: klayout magic netgen irsim openlane qflow xschem" >&5
+$as_echo "$as_me: Found tools: klayout magic netgen irsim openlane qflow xschem" >&6;}
 
 
 
@@ -2389,6 +2391,21 @@
 
 
 
+        XSCHEM_DISABLED=0
+        # Check whether --enable-xschem was given.
+if test "${enable_xschem+set}" = set; then :
+  enableval=$enable_xschem;
+                if test "$enableval" == "no" -o "$enableval" == "NO"; then
+                    XSCHEM_DISABLED=1
+                fi
+
+
+fi
+
+
+
+
+
 # Magic
 # Extract the first word of "magic", so it can be a program name with args.
 set dummy magic; ac_word=$2
@@ -2478,71 +2495,6 @@
 fi
 
 # Other installations (libraries or tools if applicable)
-mkdir -p ../libs
-mkdir -p ../tools
-
-
-
-
-
-
-
-
-
-    # echo target targetvar flag url location
-
-    OSU_PATH=""
-    OSU_GET() {
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../libs/osu" >&5
-$as_echo_n "checking for ../libs/osu... " >&6; }
-if ${ac_cv_file____libs_osu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  test "$cross_compiling" = yes &&
-  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "../libs/osu"; then
-  ac_cv_file____libs_osu=yes
-else
-  ac_cv_file____libs_osu=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____libs_osu" >&5
-$as_echo "$ac_cv_file____libs_osu" >&6; }
-if test "x$ac_cv_file____libs_osu" = xyes; then :
-
-                echo "Using pre-existing osu download..."
-
-else
-
-                mkdir -p ../libs/osu
-                sh ./download.sh 'https://vlsiarch.ecen.okstate.edu/flows/MOSIS_SCMOS/osu_stdcells_v2.4/osu_stdcells_lib.v2.4.tar.gz' ../libs/osu.tar.gz
-                (echo "Extracting osu..." && cd ../libs && tar -xf osu.tar.gz --strip-components 1 -C ../libs/osu)
-
-
-fi
-
-        export OSU_PATH=../libs/osu
-    }
-
-    # Check whether --enable-osu-lib was given.
-if test "${enable_osu_lib+set}" = set; then :
-  enableval=$enable_osu_lib;
-            if test "$enableval" == "yes" -o "$enableval" == "YES"; then
-                OSU_GET
-                XSCHEM_INST=1
-            elif test "$enableval" == "no" -o "$enableval" == "NO"; then
-                echo "Disabling osu..."
-                XSCHEM_DISABLED=1
-            else
-                OSU_PATH=$enableval
-            fi
-            OSU_PATH=`realpath $OSU_PATH`
-
-fi
-
-
-
-
 
 
 
@@ -2556,40 +2508,40 @@
 
     SKY130_ML_XX_HD_PATH=""
     SKY130_ML_XX_HD_GET() {
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../libs/sky130_ml_xx_hd" >&5
-$as_echo_n "checking for ../libs/sky130_ml_xx_hd... " >&6; }
-if ${ac_cv_file____libs_sky130_ml_xx_hd+:} false; then :
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../sources/sky130_ml_xx_hd" >&5
+$as_echo_n "checking for ../sources/sky130_ml_xx_hd... " >&6; }
+if ${ac_cv_file____sources_sky130_ml_xx_hd+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "../libs/sky130_ml_xx_hd"; then
-  ac_cv_file____libs_sky130_ml_xx_hd=yes
+if test -r "../sources/sky130_ml_xx_hd"; then
+  ac_cv_file____sources_sky130_ml_xx_hd=yes
 else
-  ac_cv_file____libs_sky130_ml_xx_hd=no
+  ac_cv_file____sources_sky130_ml_xx_hd=no
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____libs_sky130_ml_xx_hd" >&5
-$as_echo "$ac_cv_file____libs_sky130_ml_xx_hd" >&6; }
-if test "x$ac_cv_file____libs_sky130_ml_xx_hd" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____sources_sky130_ml_xx_hd" >&5
+$as_echo "$ac_cv_file____sources_sky130_ml_xx_hd" >&6; }
+if test "x$ac_cv_file____sources_sky130_ml_xx_hd" = xyes; then :
 
                 echo "Using pre-existing sky130_ml_xx_hd download..."
 
 else
 
-                mkdir -p ../libs/sky130_ml_xx_hd
-                sh ./download.sh 'https://github.com/PaulSchulz/sky130_pschulz_xx_hd/archive/master.tar.gz' ../libs/sky130_ml_xx_hd.tar.gz
-                (echo "Extracting sky130_ml_xx_hd..." && cd ../libs && tar -xf sky130_ml_xx_hd.tar.gz --strip-components 1 -C ../libs/sky130_ml_xx_hd)
+                mkdir -p ../sources/sky130_ml_xx_hd
+                sh ./download.sh 'https://github.com/PaulSchulz/sky130_pschulz_xx_hd/archive/master.tar.gz' ../sources/sky130_ml_xx_hd.tar.gz
+                (echo "Extracting sky130_ml_xx_hd..." && cd ../sources && tar -xf sky130_ml_xx_hd.tar.gz --strip-components 1 -C ../sources/sky130_ml_xx_hd && rm sky130_ml_xx_hd.tar.gz )
 
 
 fi
 
-        export SKY130_ML_XX_HD_PATH=../libs/sky130_ml_xx_hd
+        export SKY130_ML_XX_HD_PATH=../sources/sky130_ml_xx_hd
     }
 
-    # Check whether --enable-alpha-lib was given.
-if test "${enable_alpha_lib+set}" = set; then :
-  enableval=$enable_alpha_lib;
+    # Check whether --enable-alpha-sky130 was given.
+if test "${enable_alpha_sky130+set}" = set; then :
+  enableval=$enable_alpha_sky130;
             if test "$enableval" == "yes" -o "$enableval" == "YES"; then
                 SKY130_ML_XX_HD_GET
                 XSCHEM_INST=1
@@ -2609,8 +2561,6 @@
 
 
 
-XSCHEM_DISABLED=0
-XSCHEM_INST=0
 
 
 
@@ -2620,112 +2570,52 @@
 
     # echo target targetvar flag url location
 
-    XSCHEM_PATH=""
-    XSCHEM_GET() {
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../tools/xschem" >&5
-$as_echo_n "checking for ../tools/xschem... " >&6; }
-if ${ac_cv_file____tools_xschem+:} false; then :
+    XSCHEM_SKY130_PATH=""
+    XSCHEM_SKY130_GET() {
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../sources/xschem_sky130" >&5
+$as_echo_n "checking for ../sources/xschem_sky130... " >&6; }
+if ${ac_cv_file____sources_xschem_sky130+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "../tools/xschem"; then
-  ac_cv_file____tools_xschem=yes
+if test -r "../sources/xschem_sky130"; then
+  ac_cv_file____sources_xschem_sky130=yes
 else
-  ac_cv_file____tools_xschem=no
+  ac_cv_file____sources_xschem_sky130=no
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____tools_xschem" >&5
-$as_echo "$ac_cv_file____tools_xschem" >&6; }
-if test "x$ac_cv_file____tools_xschem" = xyes; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____sources_xschem_sky130" >&5
+$as_echo "$ac_cv_file____sources_xschem_sky130" >&6; }
+if test "x$ac_cv_file____sources_xschem_sky130" = xyes; then :
 
-                echo "Using pre-existing xschem download..."
+                echo "Using pre-existing xschem_sky130 download..."
 
 else
 
-                mkdir -p ../tools/xschem
-                sh ./download.sh 'https://github.com/StefanSchippers/xschem/archive/master.tar.gz' ../tools/xschem.tar.gz
-                (echo "Extracting xschem..." && cd ../tools && tar -xf xschem.tar.gz --strip-components 1 -C ../tools/xschem)
+                mkdir -p ../sources/xschem_sky130
+                sh ./download.sh 'https://github.com/StefanSchippers/xschem_sky130/archive/main.tar.gz' ../sources/xschem_sky130.tar.gz
+                (echo "Extracting xschem_sky130..." && cd ../sources && tar -xf xschem_sky130.tar.gz --strip-components 1 -C ../sources/xschem_sky130 && rm xschem_sky130.tar.gz )
 
 
 fi
 
-        export XSCHEM_PATH=../tools/xschem
+        export XSCHEM_SKY130_PATH=../sources/xschem_sky130
     }
 
-    # Check whether --enable-xschem was given.
-if test "${enable_xschem+set}" = set; then :
-  enableval=$enable_xschem;
+    # Check whether --enable-xschem-sky130 was given.
+if test "${enable_xschem_sky130+set}" = set; then :
+  enableval=$enable_xschem_sky130;
             if test "$enableval" == "yes" -o "$enableval" == "YES"; then
-                XSCHEM_GET
+                XSCHEM_SKY130_GET
                 XSCHEM_INST=1
             elif test "$enableval" == "no" -o "$enableval" == "NO"; then
-                echo "Disabling xschem..."
+                echo "Disabling xschem_sky130..."
                 XSCHEM_DISABLED=1
             else
-                XSCHEM_PATH=$enableval
+                XSCHEM_SKY130_PATH=$enableval
             fi
-            XSCHEM_PATH=`realpath $XSCHEM_PATH`
-
-fi
-
-
-
-    if [ "$XSCHEM_INST" = 1 ]; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ../tools/xschem-install" >&5
-$as_echo_n "checking for ../tools/xschem-install... " >&6; }
-if ${ac_cv_file____tools_xschem_install+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  test "$cross_compiling" = yes &&
-  as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "../tools/xschem-install"; then
-  ac_cv_file____tools_xschem_install=yes
-else
-  ac_cv_file____tools_xschem_install=no
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file____tools_xschem_install" >&5
-$as_echo "$ac_cv_file____tools_xschem_install" >&6; }
-if test "x$ac_cv_file____tools_xschem_install" = xyes; then :
-
-            echo "Using pre-existing xschem installation..."
-
-else
-
-            echo "---"
-            echo "Note: attempting to build xschem. Xschem requires all of Magic's dependencies and further, flex, bison and libxpm."
-            echo "Your build WILL fail if any of these are missing. You can choose to remove --enable-xschem or add a known installation path."
-            sleep 2
-            mkdir -p ../tools/xschem-install
-            XSCHEM_ABSOLUTE=`realpath ../tools/xschem-install`
-            (cd ../tools/xschem && ./configure --prefix=$XSCHEM_ABSOLUTE && make && make install)
-            XSCHEM_PATH=$XSCHEM_ABSOLUTE
-
-fi
-
-    fi
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: Tools enabled for PDK setup installation: klayout magic netgen irsim openlane qflow" >&5
-$as_echo "$as_me: Tools enabled for PDK setup installation: klayout magic netgen irsim openlane qflow" >&6;}
-
-
-
-
-
-        KLAYOUT_DISABLED=0
-        # Check whether --enable-klayout was given.
-if test "${enable_klayout+set}" = set; then :
-  enableval=$enable_klayout;
-                if test "$enableval" == "no" -o "$enableval" == "NO"; then
-                    KLAYOUT_DISABLED=1
-                fi
+            XSCHEM_SKY130_PATH=`realpath $XSCHEM_SKY130_PATH`
 
 fi
 
@@ -2733,75 +2623,12 @@
 
 
 
-        MAGIC_DISABLED=0
-        # Check whether --enable-magic was given.
-if test "${enable_magic+set}" = set; then :
-  enableval=$enable_magic;
-                if test "$enableval" == "no" -o "$enableval" == "NO"; then
-                    MAGIC_DISABLED=1
-                fi
-
-fi
 
 
 
 
-
-        NETGEN_DISABLED=0
-        # Check whether --enable-netgen was given.
-if test "${enable_netgen+set}" = set; then :
-  enableval=$enable_netgen;
-                if test "$enableval" == "no" -o "$enableval" == "NO"; then
-                    NETGEN_DISABLED=1
-                fi
-
-fi
-
-
-
-
-
-        IRSIM_DISABLED=0
-        # Check whether --enable-irsim was given.
-if test "${enable_irsim+set}" = set; then :
-  enableval=$enable_irsim;
-                if test "$enableval" == "no" -o "$enableval" == "NO"; then
-                    IRSIM_DISABLED=1
-                fi
-
-fi
-
-
-
-
-
-        OPENLANE_DISABLED=0
-        # Check whether --enable-openlane was given.
-if test "${enable_openlane+set}" = set; then :
-  enableval=$enable_openlane;
-                if test "$enableval" == "no" -o "$enableval" == "NO"; then
-                    OPENLANE_DISABLED=1
-                fi
-
-fi
-
-
-
-
-
-        QFLOW_DISABLED=0
-        # Check whether --enable-qflow was given.
-if test "${enable_qflow+set}" = set; then :
-  enableval=$enable_qflow;
-                if test "$enableval" == "no" -o "$enableval" == "NO"; then
-                    QFLOW_DISABLED=1
-                fi
-
-fi
-
-
-
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: Tools enabled for PDK setup installation: klayout magic netgen irsim openlane qflow xschem" >&5
+$as_echo "$as_me: Tools enabled for PDK setup installation: klayout magic netgen irsim openlane qflow xschem" >&6;}
 
 # Check for "--with-ef-style"
 EF_STYLE=0
diff --git a/scripts/configure.ac b/scripts/configure.ac
index d153c38..05ef504 100755
--- a/scripts/configure.ac
+++ b/scripts/configure.ac
@@ -15,17 +15,15 @@
 # define tools
 # define tools to install setup files for.  This does not imply that the tools are
 # available on the system;  just that open_pdks will install the setup files for them.
-## DO NOT INCLUDE XSCHEM IN THE TOOL LIST. XSCHEM CAN BE INSTALLED IN THE CONFIG SCRIPT
 m4_define([M4_GET_TOOLS], [m4_normalize(m4_esyscmd(cat ./tools.txt | tr "\n" " "))])
 
-mkdir -p ../pdks
-
 # check for the source and install paths for each PDK.
 AC_DEFUN([M4_GEN_WITH_PDK_ARGS], [
 
     # --enable-pdk-[pdk]=/path/to/pdk
     m4_foreach_w(pdk, $1, [
-        m4_define([pdkvar], [m4_normalize(m4_esyscmd(echo pdk | tr "a-z" "A-Z"))])
+        echo "Checking technology pdk..."
+        m4_define([pdkvar], [m4_normalize(m4_esyscmd(echo pdk | tr "a-z-" "A-Z_"))])
 
         pdkvar[]_SOURCE_PATH=""
         pdkvar[]_LOCAL_PATH=""
@@ -33,17 +31,17 @@
         pdkvar[]_LINK_TARGETS="none"
 
         pdk_get() {
-            AC_CHECK_FILE(../pdk/[pdk]_info, [
-                AC_CHECK_FILE(../pdks/pdk,[
+            AC_CHECK_FILE(../pdk/[pdk]_info.txt, [
+                AC_CHECK_FILE(../sources/pdk,[
                     echo "Using pre-existing pdk download..."
                 ], [
-                    REPO=$(cat "../pdk/pdk_info" | sed -n "1p")
-                    POST_CLONE_COMMANDS=$(cat "../pdk/pdk_info" | sed "1d")
-                    mkdir -p ../pdks
-                    git clone "$REPO" ../pdks/pdk;
-                    (cd ../pdks/pdk && sh -c "$POST_CLONE_COMMANDS")
+                    REPO=$(cat "../pdk/pdk_info.txt" | sed -n "1p")
+                    POST_CLONE_COMMANDS=$(cat "../pdk/pdk_info.txt" | sed "1d")
+                    mkdir -p ../sources
+                    git clone "$REPO" ../sources/pdk;
+                    (cd ../sources/pdk && sh -c "$POST_CLONE_COMMANDS")
                 ])
-                export pdkvar[]_SOURCE_PATH=../pdks/pdk
+                export pdkvar[]_SOURCE_PATH=../sources/pdk
             ], [
                 AC_MSG_ERROR([PDK pdk cannot be automatically downloaded and requires a path.])
             ])
@@ -58,9 +56,9 @@
                     FOUND=1
                 fi
             done
-            if @<:@ "$FOUND" = "$1" @:>@; then
-                echo "Could not found pdk in standard search paths, manually downloading to ../pdks/pdk ..."
-                pdk_find
+            if @<:@ "$FOUND" = "0" @:>@; then
+                echo "Could not find pdk in standard search paths, automatically fetching repository to ../sources/pdk ..."
+                pdk_get
             fi
         }
 
@@ -68,14 +66,14 @@
             [AS_HELP_STRING([--enable-pdk-[pdk]=@<:@/path/to/pdk/@:>@ --disable-pdk-[pdk]], "location of the source files for the pdk (pdks with a [pdk]_url file can automatically download them if the path is omitted)")],
             [
                 if test "$enableval" == "yes" -o "$enableval" == "YES"; then
-                   pdk_find
+		    echo "Looking for pdk in usual places"
+                    pdk_find
                 elif test "$enableval" == "no" -o "$enableval" == "NO"; then
                     echo "Disabling pdk..."
                 else
                     pdkvar[]_SOURCE_PATH=$enableval
                 fi
             ], [
-                pdk_find
             ]
         )
 	    # # Require this argument
@@ -148,13 +146,13 @@
 # Set variables for tool setups
 AC_DEFUN([M4_GEN_WITH_TOOLS], [
     m4_foreach_w(tool, $1, [
-        m4_define([toolvar], [m4_normalize(m4_esyscmd(echo tool | tr "a-z" "A-Z"))])
+        m4_define([toolvar], [m4_normalize(m4_esyscmd(echo tool | tr "a-z-" "A-Z_"))])
 
         toolvar[]_DISABLED=0
         AC_ARG_ENABLE(tool,
             AS_HELP_STRING(
                 --enable-tool
-                Enable or disable tool @<:@default=enabled@:>@
+                Enable or disable tool setup @<:@default=enabled@:>@
             ), [
                 if test "$enableval" == "no" -o "$enableval" == "NO"; then
                     toolvar[]_DISABLED=1
@@ -180,11 +178,9 @@
 fi
 
 # Other installations (libraries or tools if applicable)
-mkdir -p ../libs
-mkdir -p ../tools
 AC_DEFUN([M4_GEN_INSTALLATION], [
     m4_define([target], $1)
-    m4_define([targetvar], [m4_normalize(m4_esyscmd(echo target | tr "a-z" "A-Z"))])
+    m4_define([targetvar], [m4_normalize(m4_esyscmd(echo target | tr "a-z-" "A-Z_"))])
     m4_define([flag], $2)
     m4_define([url], $3)
     m4_define([location], $4)
@@ -200,7 +196,7 @@
             ], [
                 mkdir -p location/target
                 sh ./download.sh url location/target.tar.gz
-                (echo "Extracting target..." && cd location && tar -xf target.tar.gz --strip-components 1 -C location/target)
+                (echo "Extracting target..." && cd location && tar -xf target.tar.gz --strip-components 1 -C location/target && rm target.tar.gz )
             ]
         )
         export targetvar[]_PATH=location/target
@@ -231,37 +227,19 @@
     AC_SUBST(targetvar[]_PATH)
 ])
 
-M4_GEN_INSTALLATION(osu, osu-lib, 'https://vlsiarch.ecen.okstate.edu/flows/MOSIS_SCMOS/osu_stdcells_v2.4/osu_stdcells_lib.v2.4.tar.gz', ../libs)
-M4_GEN_INSTALLATION(sky130_ml_xx_hd, alpha-lib, 'https://github.com/PaulSchulz/sky130_pschulz_xx_hd/archive/master.tar.gz', ../libs)
+M4_GEN_INSTALLATION(sky130_ml_xx_hd, alpha-sky130, 'https://github.com/PaulSchulz/sky130_pschulz_xx_hd/archive/master.tar.gz', ../sources)
 
-XSCHEM_DISABLED=0
-XSCHEM_INST=0
-M4_GEN_INSTALLATION(xschem, xschem, 'https://github.com/StefanSchippers/xschem/archive/master.tar.gz', ../tools, [
-    if @<:@ "$XSCHEM_INST" = 1 @:>@; then
-        AC_CHECK_FILE(../tools/xschem-install,[
-            echo "Using pre-existing xschem installation..."
-        ], [
-            echo "---"
-            echo "Note: attempting to build xschem. Xschem requires all of Magic's dependencies and further, flex, bison and libxpm."
-            echo "Your build WILL fail if any of these are missing. You can choose to remove --enable-xschem or add a known installation path."
-            sleep 2
-            mkdir -p ../tools/xschem-install
-            XSCHEM_ABSOLUTE=`realpath ../tools/xschem-install`
-            (cd ../tools/xschem && ./configure --prefix=$XSCHEM_ABSOLUTE && make && make install)
-            XSCHEM_PATH=$XSCHEM_ABSOLUTE
-        ])
-    fi
-])
+M4_GEN_INSTALLATION(xschem_sky130, xschem-sky130, 'https://github.com/StefanSchippers/xschem_sky130/archive/main.tar.gz', ../sources)
 
 AC_DEFUN([M4_GEN_WITH_TOOLS], [
     m4_foreach_w(tool, $1, [
-        m4_define([toolvar], [m4_normalize(m4_esyscmd(echo tool | tr "a-z" "A-Z"))])
+        m4_define([toolvar], [m4_normalize(m4_esyscmd(echo tool | tr "a-z-" "A-Z_"))])
 
         toolvar[]_DISABLED=0
         AC_ARG_ENABLE(tool,
             AS_HELP_STRING(
                 --enable-tool --disable-tool,
-                Enable or disable tool @<:@default=enabled@:>@
+                Enable or disable tool setup @<:@default=enabled@:>@
             ),
             [
                 if test "$enableval" == "no" -o "$enableval" == "NO"; then
@@ -275,8 +253,6 @@
 
 AC_MSG_NOTICE([Tools enabled for PDK setup installation: M4_GET_TOOLS()])
 
-M4_GEN_WITH_TOOLS(M4_GET_TOOLS())
-
 # Check for "--with-ef-style"
 EF_STYLE=0
 AC_ARG_WITH(
diff --git a/scripts/tools.txt b/scripts/tools.txt
index 60e9fe0..648b3dc 100644
--- a/scripts/tools.txt
+++ b/scripts/tools.txt
@@ -4,3 +4,4 @@
 irsim
 openlane
 qflow
+xschem
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index e256282..f822cc8 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -163,11 +163,9 @@
     SKYWATER_PATH := $(SKYWATER_PATH)/libraries
 endif
 
-# Path to OSU standard cell library sources (to be added to configuration options).
-OSU_PATH = ~/gits/osu_130_pdk
-
 # Path to independent library sources (to be added to configuration options).
-REPO_PATH = ~/gits
+ALPHA_PATH = @SKY130_ML_XX_HD_PATH@
+XSCHEM_PATH = @XSCHEM_SKY130_PATH@
 
 # NOTE:  Install destination is the git repository of the technology platform.
 # Once updated in git, the git project can be distributed to all hosts.
@@ -219,6 +217,7 @@
 QFLOWTOP = libs.tech/qflow
 KLAYOUTTOP = libs.tech/klayout
 OPENLANETOP = libs.tech/openlane
+XSCHEMTOP = libs.tech/xschem
 
 ifeq (${EF_STYLE}, 1)
     MAGICPATH = ${MAGICTOP}/${REVISION}
@@ -232,6 +231,7 @@
 QFLOWPATH = ${QFLOWTOP}
 KLAYOUTPATH = ${KLAYOUTTOP}
 OPENLANEPATH = ${OPENLANETOP}
+XSCHEMPATH = ${XSCHEMTOP}
 
 MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP}
 NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP}
@@ -239,6 +239,7 @@
 QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP}
 KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP}
 OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP}
+XSCHEMTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMTOP}
 
 MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH}
 NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH}
@@ -246,6 +247,7 @@
 QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH}
 KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH}
 OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH}
+XSCHEM_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMPATH}
 
 SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICTOP}/current
 
@@ -306,6 +308,11 @@
         TOOLS += irsim
 endif
 
+# XSCHEM_DISABLED = 0 | 1
+XSCHEM_DISABLED = @XSCHEM_DISABLED@
+ifneq (${XSCHEM_DISABLED}, 1)
+        TOOLS += xschem
+endif
 
 all: all-a
 
@@ -396,7 +403,7 @@
 	${CPP} ${SKY130A_DEFS} netgen/${TECH}_setup.tcl > ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
 	(cd ${NETGEN_STAGING_A} ; ln -s ${SKY130A}_setup.tcl setup.tcl)
 
-irsim-a: irsim/
+irsim-a: irsim
 	mkdir -p ${IRSIMTOP_STAGING_A}
 	mkdir -p ${IRSIM_STAGING_A}
 	rm -f ${IRSIM_STAGING_A}/${SKY130A}_*.prm
@@ -412,6 +419,15 @@
 	cp klayout/${TECH}.lydrc ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc
 	./custom/scripts/gen_run_drc.py -l ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc -o ${KLAYOUT_STAGING_A}/${SKY130A}.drc
 
+xschem-a: ${XSCHEM_PATH}
+	rm -rf ${XSCHEM_STAGING_A}
+	mkdir -p ${XSCHEMTOP_STAGING_A}
+	mkdir -p ${XSCHEM_STAGING_A}
+	# Copy the entire repository (other than .git, if it exists)
+	if test "x${XSCHEM_PATH}" != "x" ; then \
+	    cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_A} ; \
+	fi
+
 openlane-a: openlane/common_pdn.tcl openlane/config.tcl openlane/sky130_fd_sc_hd/config.tcl  openlane/sky130_fd_sc_hs/config.tcl openlane/sky130_fd_sc_ms/config.tcl openlane/sky130_fd_sc_ls/config.tcl openlane/sky130_fd_sc_hdll/config.tcl openlane/sky130_osu_sc_t18/config.tcl
 	mkdir -p ${OPENLANETOP_STAGING_A}
 	mkdir -p ${OPENLANE_STAGING_A}
@@ -586,7 +602,7 @@
 	patch -p1 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hdll/techlef \
 		< custom/patches/hdll_minenclosed.squeaky.patch || true
 	# Install alphanumeric library.
-	${STAGE} -source ${REPO_PATH} -target ${STAGING_PATH}/${SKY130A} \
+	${STAGE} -source ${ALPHA_PATH}/.. -target ${STAGING_PATH}/${SKY130A} \
 		-mag %l/mag/*.mag filter=custom/scripts/text2m5.py \
 		-library general sky130_ml_xx_hd |& tee -a ${SKY130A}_install.log
 	# Install text2mag.py script for alphanumeric library
diff --git a/sky130/README b/sky130/README
index 4463d30..dbc28cc 100644
--- a/sky130/README
+++ b/sky130/README
@@ -7,18 +7,68 @@
 ----------------------------------------
 
 -------------------------------------------------------------------------------
+Quick summary (TL;DR):
+
+    Prerequisite:  The Magic VLSI layout tool is used often by the
+    installation.  If you do not have it, then obtain it and install
+    with the following:
+
+	git clone https://github.com/RTimothyEdwards/magic
+	cd magic
+	./configure
+	make
+	sudo make install
+
+    Open_PDKs SKY130 Installation: Most people will want to run the following
+    for PDK installation:
+
+	./configure --enable-sky130-pdk --enable-alpha-sky130 \
+		--enable-xschem-sky130 --with-sky130-local-path=/usr/share/pdks
+	make
+	sudo make install
+
+    This will download and install the SkyWater SKY130 PDK, the SKY130 setup
+    files for xschem, and a third-party library containing alphanumeric layouts.
+    If you prefer an installation in your user space, then replace /usr/share/pdks
+    with some alternative like ~/pdks, and "make install" does not need to be
+    run sudo.
+
+-------------------------------------------------------------------------------
+Detailed instructions for the patient reader:
+-------------------------------------------------------------------------------
 Prerequisites:
 
-1. Foundry source files:
+1. EDA tools:
 
-    Obtain sources for the SkyWater sky130 130nm process from the git repository at
-    the following location:
+    For installing files to use with the Magic layout tool, Magic must be installed.
+    Obtain Magic from:
+
+	https://github.com/RTimothyEdwards/magic
+
+    No other tools are required for installation, although open_pdks will
+    generate and install the setup files for a number of tools.
+
+2. Foundry source files [optional]:
+
+    If you do not have the foundry source files, the latest version will
+    be downloaded from github, built, and installed locally in the
+    open_pdks/sources/ directory.  If you have the foundry source files,
+    then you can pass the location to the open_pdks configure script.  In
+    that case, the sources will need to be completely built.  The
+    instructions below are needed ONLY if you intend to download and
+    install the PDK sources outside of open_pdks.  Instructions below
+    are only valid for the SkyWater SKY130 process.  If additional
+    open-source PDKs become available, instructions will be added as
+    needed.
+
+    Obtain sources for the SkyWater sky130 130nm process from the git repository
+    at the following location:
 
 	 https://github.com/google/skywater-pdk
 
     This repository may go in any convenient location.  The Makefile suggests
     the target location ~/projects/foundry/skywater-pdk but any location will
-    do as long as the definition for SKYWATER_PATH in the Makefile is set
+    do as long as the --enable-sky130-pdk= configuration option value is set
     appropriately.
 
     So cd to the target location parent directory (e.g., "cd ~/projects/foundry")
@@ -56,15 +106,7 @@
     Then follow the instructions below for generating the additional files
     for supporting the open source EDA tool flows.
 
-2. EDA tools:
-
-    For installing files to use with the Magic layout tool, Magic must be installed.
-    Obtain Magic from:
-
-	https://github.com/RTimothyEdwards/magic
-
--------------------------------------------------------------------------------
-Installation:
+PDK Installation:
 
     There are two methods for installation:  Local and Distribution.  Use Local
     installation if you are installing on a single host computer.  Use Distribution
@@ -77,53 +119,74 @@
     repository and to set the path to the install location.  Note that
     the configure script is located in the open_pdks top level directory,
     not in the foundry subdirctory, and must be run from the top level
-    directory.  Configure options are as follows:
+    directory.  The mandatory configure options are as follows:
 
-	--enable-sky130-pdk=/path/to/sky130/source
-                          "location of the source files for sky130"
+	--enable-sky130-pdk[=/path/to/sky130/pdk/source]
 	--with-sky130-local-path=/path/to/install/pdks
-                          "location where the PDKs will be installed"
+
+    See below for details.
 
     NOTE:  The intention of the configure file is to not have to hand-edit
     the Makefile.  However, the development of the configure script is
     currently ongoing and unfinished, so for now the Makefile should be
     checked and edited after running configure.
 
+	--enable-sky130-pdk[=/path/to/sky130/pdk/source]
+		This is mandatory for specifying that the installation
+		is for the SKY130 PDK.  If the path is specified, then
+		the PDK is assumed to already be downloaded and installed.
+		If not, then the PDK will be downloaded automatically
+		from github and installed.  Note that the PDK repository
+		is very large, contains submodules, and the submodules
+		need to compile the liberty timing files, which can
+		take a very long time.  Be patient.
+
+	--with-ef-style
+		Select this for an efabless-style file structure.
+		The default is "no".  There are some differences in
+		these two styles, the most important of which being
+		that the order of directories for the IP libraries
+		is <file_format>/<library_name> instead of
+		<library_name>/<file_format>. Other differences
+		include version tracking of the Magic setup files
+		and the location of the technology LEF file.
+
+	--with-sky130-link-targets=none|source
+		"none" copies files from the source directories to
+		the target.  "source" makes symbolic links to the source
+		directories.  Use "source" only if doing a local install,
+		and the source foundry data will not be deleted.  For
+		distribution installations, the value must be set to
+		"none".
+
+	--with-sky130-local-path=<path>
+		The path to the target install directory.  This is used
+		in both the local and distribution installations.  For
+		a distribution installation, this is the local name of
+		the path to the PDK after it has been distributed to
+		the host computers (This should have been set by the
+		option --with-local-path= passed to configure).
+
+	--with-sky130-dist-path=<path>
+		The path to the location of the installed files prior to
+		distribution.  This will most likely be a git or similar
+		repo.  This path should NOT be specified for a single-
+		machine installation.
+
+	--enable-alpha-sky130[=<path>] 
+		The path to the sky130_ml_xx_hd library, a third-party
+		library containing layouts of alphanumeric characters
+		for adding text to layout.  If the path is not
+		specified, then the library will be downloaded from
+		github automatically.
+
+	--enable-xschem-sky130[=<path>]
+		The path to the SKY130 setup for the xschem schematic
+		entry/schematic capture tool.  If the path is not
+		specified, then the library will be downloaded from
+		github automatically.
+
 Step 2:
-
-    All other steps are run in the sky130/ subdirectory.
-
-    cd to the sky130/ subdirectory and edit the Makefile to set the following
-    definitions for your host system:
-
-	EF_STYLE = Select "1" for an efabless-style file structure, "0"
-			otherwise. There are some differences in
-			these two styles, the most important of which being
-			that the order of directories for the IP libraries
-			is <file_format>/<library_name> instead of
-			<library_name>/<file_format>. Other differences
-			include version tracking of the Magic setup files
-			and the location of the technology LEF file.
-
-	LINK_TARGETS = "none" or "source".  "none" copies files from the source
-			directories to the target.  "source" makes symbolic links
-			to the source directories.  Use "source" only if doing
-			a local install, and the source foundry data will not
-			be deleted.  For distribution installations, LINK_TARGETS
-			must be set to "none".
-
-	LOCAL_PATH = The path to the target install directory.  This is used
-			in both the local and distribution installations.  For
-			a distribution installation, this is the local name of
-			the path to the PDK after it has been distributed to
-			the host computers (This should have been set by the
-			option --with-local-path= passed to configure).
-
-	DIST_PATH = The path to the location of the installed files prior to
-			distribution.  This will most likely be a git or similar
-			repo.
-
-Step 3:
 	Run:
 
 	    make
@@ -132,30 +195,30 @@
 	for the SKY130A PDK, and process all vendor files, and place everything
 	in a local staging area.
 
-Step 4:
-	For a local install, do:
+Step 3:
+	Run:
 
-	    make install-local
+	    make install
 
-	This copies all files from the staging area into the destination
-	as specified by the variable LOCAL_PATH in the Makefile.  All
+	The behavior of installation depends on whether or not
+	--with-<pdk>-dist-path=<path> has been set (e.g.,
+	--with-sky130-dist-path).  If only the local path
+	(--with-<pdk>-local-path=<path>) has been set, then "make
+	install" copies all files from the staging area into the
+	destination.  All pointers to absolute paths in the files
+	are changed to match the local path.
+
+	If --with-<pdk>-dist-path=<path> has been set, then "make
+	install" copies all files from the staging area into the
+	destination as specified by the value of <path>.  All
 	pointers to absolute paths in the files are changed to match
-	LOCAL_PATH.
-
-	For a distribution install, do:
-
-	    make install-dist
-
-	This copies all files from the staging area into the destination
-	as specified by the variable DIST_PATH in the Makefile.  All
-	pointers to absolute paths in the files are changed to match
-	LOCAL_PATH.  The assumption is that DIST_PATH is a repository
-	(such as a git repo) that is cloned to multiple hosts, and
-	the destination on the hosts where it is distributed is
-	LOCAL_PATH.
+	the local path value.  The assumption is that the distribution
+	path is a repository (such as a git repo) that is cloned to
+	multiple hosts, and the destination on the hosts where it is
+	distributed is the local path.
 
 -------------------------------------------------------------------------------
-Summary:
+Summary of the installation directories:
 
     The Makefile script takes the source files and generates files for local
     PDK names "SKY130A", "SKY130B", etc.  (Note there is currently only one
@@ -195,8 +258,10 @@
 		    netgen/		netgen setup file
 		    qflow/		qflow scripts and graywolf setup files.
 		    klayout/		setup files for klayout
-		    openlane/		setup files for openlane
+		    openlane/		setup and supplementary files for openlane
 		    ngspice/		base model files and libraries for ngspice
+		    xschem/		setup files for xschem
+		    irsim/		setup and parameter files for IRSIM
 
 		libs.ref/		foundry data
 
@@ -227,6 +292,8 @@
 
 			sky130_fd_pr/			Primitive devices w/fixed layout
 
+			sky130_ml_xx_hd/		Library of alphanumeric layouts
+
     The target installation destinations assume the directory structure above.  Changing
     this requires editing the source files.
 
diff --git a/sky130/pdk_info b/sky130/pdk_info.txt
similarity index 100%
rename from sky130/pdk_info
rename to sky130/pdk_info.txt