Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hpcmips/stand taking evil to the next level: config...



details:   https://anonhg.NetBSD.org/src/rev/3cf026200c73
branches:  trunk
changeset: 480414:3cf026200c73
user:      cgd <cgd%NetBSD.org@localhost>
date:      Wed Jan 12 02:33:54 2000 +0000

description:
taking evil to the next level: config files, templates, and scripts
to automatically generate project (.dsp) and workspace (.dsw) files
from configuration scripts for the bits that have to be built
on windows.  you build by saying 'make winfiles' here in stand,
then check in (on UNIX).  The versions that windows sees have to have
CR-NL line termination, so for proper use with samba the generated
files contain CRs and must be checked in on UNIX (NOT from Windows
CVS).

diffstat:

 sys/arch/hpcmips/stand/Makefile                            |   12 +
 sys/arch/hpcmips/stand/dspgen/application_WCE_MIPS.tmpl    |  104 ++++++++
 sys/arch/hpcmips/stand/dspgen/do_subst.sh                  |  158 +++++++++++++
 sys/arch/hpcmips/stand/dspgen/gen_workspace.sh             |   85 ++++++
 sys/arch/hpcmips/stand/dspgen/static_library_WCE_MIPS.tmpl |   83 ++++++
 sys/arch/hpcmips/stand/libsa/libsa.config                  |   16 +
 sys/arch/hpcmips/stand/pbsdboot/pbsdboot.config            |   16 +
 7 files changed, 474 insertions(+), 0 deletions(-)

diffs (truncated from 502 to 300 lines):

diff -r 8e5da38850a8 -r 3cf026200c73 sys/arch/hpcmips/stand/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/stand/Makefile   Wed Jan 12 02:33:54 2000 +0000
@@ -0,0 +1,12 @@
+# $NetBSD: Makefile,v 1.1 2000/01/12 02:33:56 cgd Exp $
+#
+# Makefile to generate windows VC++ project and workspace files from
+# config files and templates
+
+PROJECT_DIRS=libsa pbsdboot
+
+winfiles: 
+       for dir in $(PROJECT_DIRS); do \
+           $$dir/$$dir.config; \
+       done
+       sh dspgen/gen_workspace.sh hpcmips_stand.dsw $(PROJECT_DIRS)
diff -r 8e5da38850a8 -r 3cf026200c73 sys/arch/hpcmips/stand/dspgen/application_WCE_MIPS.tmpl
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/stand/dspgen/application_WCE_MIPS.tmpl   Wed Jan 12 02:33:54 2000 +0000
@@ -0,0 +1,104 @@
+# Microsoft Developer Studio Project File - Name="pbsdboot" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 5.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (WCE MIPS) Application" 0x0a01
+
+CFG=pbsdboot - Win32 (WCE MIPS) Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE 
+!MESSAGE NMAKE /f "pbsdboot.mak".
+!MESSAGE 
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE 
+!MESSAGE NMAKE /f "pbsdboot.mak" CFG="pbsdboot - Win32 (WCE MIPS) Debug"
+!MESSAGE 
+!MESSAGE Possible choices for configuration are:
+!MESSAGE 
+!MESSAGE "pbsdboot - Win32 (WCE MIPS) Release" (based on "Win32 (WCE MIPS) Application")
+!MESSAGE "pbsdboot - Win32 (WCE MIPS) Debug" (based on "Win32 (WCE MIPS) Application")
+!MESSAGE 
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+# PROP WCE_Configuration "H/PC Ver. 2.00"
+CPP=clmips.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF  "$(CFG)" == "pbsdboot - Win32 (WCE MIPS) Release"
+
+# PROP BASE Use_MFC 1
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "WMIPSRel"
+# PROP BASE Intermediate_Dir "WMIPSRel"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 1
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "WMIPSRel"
+# PROP Intermediate_Dir "WMIPSRel"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /O2 /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /Yu"stdafx.h" /QMRWCE /c
+# ADD CPP /nologo /MT /W3 /O2 %%% INCDIRS %%% /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "NDEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" %%% CPPDEFS %%% /QMRWCE /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
+# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "NDEBUG"
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /NOLOGO
+# ADD BSC32 /NOLOGO
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /entry:"wWinMainCRTStartup" /machine:MIPS /subsystem:$(CESubsystem)
+# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib %%% LIBRARIES %%% /nologo /incremental:no /machine:MIPS /subsystem:$(CESubsystem) %%% RELEASE_LIBPATH %%%
+# SUBTRACT LINK32 /pdb:none /nodefaultlib
+PFILE=pfile.exe
+# ADD BASE PFILE COPY
+# ADD PFILE COPY
+
+!ELSEIF  "$(CFG)" == "pbsdboot - Win32 (WCE MIPS) Debug"
+
+# PROP BASE Use_MFC 1
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "WMIPSDbg"
+# PROP BASE Intermediate_Dir "WMIPSDbg"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "WMIPSDbg"
+# PROP Intermediate_Dir "WMIPSDbg"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Zi /Od /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" /Yu"stdafx.h" /QMRWCE /c
+# ADD CPP /nologo /MLd /W3 /Zi /Od %%% INCDIRS %%% /D _WIN32_WCE=$(CEVersion) /D "$(CEConfigName)" /D "DEBUG" /D "MIPS" /D "_MIPS_" /D UNDER_CE=$(CEVersion) /D "UNICODE" %%% CPPDEFS %%% /QMRWCE /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
+# ADD RSC /l 0x411 /r /d "MIPS" /d "_MIPS_" /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "$(CEConfigName)" /d "UNICODE" /d "DEBUG"
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
+BSC32=bscmake.exe
+# ADD BASE BSC32 /NOLOGO
+# ADD BSC32 /NOLOGO
+LINK32=link.exe
+# ADD BASE LINK32 /nologo /entry:"wWinMainCRTStartup" /debug /machine:MIPS /subsystem:$(CESubsystem)
+# SUBTRACT BASE LINK32 /pdb:none /nodefaultlib
+# ADD LINK32 commctrl.lib coredll.lib winsock.lib %%% LIBRARIES %%% /nologo /incremental:no /debug /machine:MIPS /subsystem:$(CESubsystem) %%% DEBUG_LIBPATH %%%
+# SUBTRACT LINK32 /verbose /profile /pdb:none /map /nodefaultlib
+PFILE=pfile.exe
+# ADD BASE PFILE COPY
+# ADD PFILE COPY
+
+!ENDIF 
+
+# Begin Target
+
+# Name "%%% NAME %%% - Win32 (WCE MIPS) Release"
+# Name "%%% NAME %%% - Win32 (WCE MIPS) Debug"
+%%% SRCFILES %%%
+# End Target
+# End Project
diff -r 8e5da38850a8 -r 3cf026200c73 sys/arch/hpcmips/stand/dspgen/do_subst.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/stand/dspgen/do_subst.sh Wed Jan 12 02:33:54 2000 +0000
@@ -0,0 +1,158 @@
+# $NetBSD: do_subst.sh,v 1.1 2000/01/12 02:33:54 cgd Exp $
+#
+# Copyright (c) 1999, 2000 Christopher G. Demetriou.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#    must display the following acknowledgement:
+#      This product includes software developed by Christopher G. Demetriou
+#      for the NetBSD Project.
+# 4. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+if [ "X$1" = "X--show-libdeps" ]; then
+       if ! expr "X$TYPE" : 'Xconsole_program.*' > /dev/null 2>&1 &&
+          ! expr "X$TYPE" : 'Xapplication.*' > /dev/null 2>&1; then
+               exit
+       fi
+       ( for lib in $LIBDEP_LIST; do
+               echo $lib
+       done ) | sort
+       exit
+fi
+
+AWK=awk
+if [ `uname` = SunOS ]; then
+       AWK=nawk
+fi
+
+STD_CPPDEF_LIST=''
+STD_INCDIR_LIST=''
+STD_LIBRARY_LIST=''
+
+export NAME
+export SRCFILE_LIST
+export CPPDEF_LIST STD_CPPDEF_LIST
+export INCDIR_LIST STD_INCDIR_LIST 
+export LIBDEP_LIST
+export LIBRARY_LIST STD_LIBRARY_LIST
+
+${AWK} '
+BEGIN {
+       NAME=ENVIRON["NAME"]
+
+       SRCFILES=""
+       sz = split(ENVIRON["SRCFILE_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (SRCFILES != "") {
+                       SRCFILES=SRCFILES "\n"
+               }
+               SRCFILES=SRCFILES "# Begin Source File\n"
+               SRCFILES=SRCFILES "\n"
+               SRCFILES=SRCFILES "SOURCE=.\\" a[i] "\n"
+               SRCFILES=SRCFILES "# End Source File"
+       }
+
+       CPPDEFS=""
+       sz = split(ENVIRON["STD_CPPDEF_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (CPPDEFS != "") {
+                       CPPDEFS=CPPDEFS " "
+               }
+               CPPDEFS=CPPDEFS "/D \"" a[i] "\""
+       }
+       sz = split(ENVIRON["CPPDEF_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (CPPDEFS != "") {
+                       CPPDEFS=CPPDEFS " "
+               }
+               CPPDEFS=CPPDEFS "/D \"" a[i] "\""
+       }
+
+       INCDIRS=""
+       sz = split(ENVIRON["STD_INCDIR_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (INCDIRS != "") {
+                       INCDIRS=INCDIRS " "
+               }
+               INCDIRS=INCDIRS "/I \"" a[i] "\""
+       }
+       sz = split(ENVIRON["INCDIR_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (INCDIRS != "") {
+                       INCDIRS=INCDIRS " "
+               }
+               INCDIRS=INCDIRS "/I \"" a[i] "\""
+       }
+       sz = split(ENVIRON["LIBDEP_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (INCDIRS != "") {
+                       INCDIRS=INCDIRS " "
+               }
+               INCDIRS=INCDIRS "/I \"..\\" a[i] "\""
+        }
+
+       LIBRARIES=""
+       sz = split(ENVIRON["STD_LIBRARY_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (LIBRARIES != "") {
+                       LIBRARIES=LIBRARIES " "
+               }
+               LIBRARIES=LIBRARIES a[i] ".lib"
+       }
+       sz = split(ENVIRON["LIBRARY_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (LIBRARIES != "") {
+                       LIBRARIES=LIBRARIES " "
+               }
+               LIBRARIES=LIBRARIES a[i] ".lib"
+        }
+       sz = split(ENVIRON["LIBDEP_LIST"], a);
+       for (i = 1; i <= sz; i++) {
+               if (LIBRARIES != "") {
+                       LIBRARIES=LIBRARIES " "
+               }
+               LIBRARIES=LIBRARIES a[i] ".lib"
+       }
+
+       sz = split(ENVIRON["LIBDEP_LIST"], a);
+       DEBUG_LIBPATH=""
+       RELEASE_LIBPATH=""
+       for (i = 1; i <= sz; i++) {
+               if (i > 1) {
+                       DEBUG_LIBPATH=DEBUG_LIBPATH " "
+                       RELEASE_LIBPATH=RELEASE_LIBPATH " "
+               }
+               DEBUG_LIBPATH=DEBUG_LIBPATH "/libpath:\"..\\" a[i] "\\WMIPSDbg\""
+               RELEASE_LIBPATH=RELEASE_LIBPATH "/libpath:\"..\\" a[i] "\\WMIPSRel\""
+       }
+}
+{
+       gsub("%%% NAME %%%", NAME)
+       gsub("%%% SRCFILES %%%", SRCFILES)
+       gsub("%%% CPPDEFS %%%", CPPDEFS)
+       gsub("%%% INCDIRS %%%", INCDIRS)
+       gsub("%%% LIBRARIES %%%", LIBRARIES)
+       gsub("%%% DEBUG_LIBPATH %%%", DEBUG_LIBPATH)
+       gsub("%%% RELEASE_LIBPATH %%%", RELEASE_LIBPATH)
+       print $0
+}
+' ../dspgen/${TYPE}.tmpl | awk ' { printf "%s\r\n", $0 }' > ${NAME}.dsp
diff -r 8e5da38850a8 -r 3cf026200c73 sys/arch/hpcmips/stand/dspgen/gen_workspace.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/hpcmips/stand/dspgen/gen_workspace.sh    Wed Jan 12 02:33:54 2000 +0000
@@ -0,0 +1,85 @@
+# $NetBSD: gen_workspace.sh,v 1.1 2000/01/12 02:33:54 cgd Exp $
+#
+# Copyright (c) 1999, 2000 Christopher G. Demetriou.  All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright



Home | Main Index | Thread Index | Old Index