[project @ 1996-06-30 16:31:21 by partain]
[ghc-hetmet.git] / ghc / runtime / Jmakefile
index e9f29c3..bc4d74a 100644 (file)
@@ -6,7 +6,6 @@
    At the moment, there are a few such subdirs:
        c-as-asm        -- mini-interpreter & register hackery
        gum             -- GUM-specific stuff
-       io              -- support for libPOSIX
        main            -- "main", associated startup stuff, & MISC things
        prims           -- code for primitives that must be written in C
        profiling       -- cost-centre profiling
    Other sorta independent, compile-once subdirs are:
 
        gmp             -- GNU multi-precision library (for Integer)
-       regex           -- GNU regexp package
 */
 
 #define IHaveSubdirs
 
-SUBDIRS = gmp regex
+SUBDIRS = gmp
 
 /****************************************************************
 *                                                              *
@@ -134,12 +132,6 @@ RTS_LHC =                          \
        storage/SMmark.lhc              \
        gum/FetchMe.lhc
 
-#if GhcWithReadline == YES
-# define __readline_cfile io/ghcReadline.lc
-#else
-# define __readline_cfile /*none*/
-#endif
-
 CLIB_LC =                              \
        hooks/ErrorHdr.lc               \
        hooks/OutOfHeap.lc              \
@@ -150,52 +142,7 @@ CLIB_LC =                          \
        hooks/TraceHooks.lc             \
        hooks/SizeHooks.lc              \
        hooks/InitEachPE.lc             \
-       io/acceptSocket.lc              \
-       io/bindSocket.lc                \
-       io/closeFile.lc                 \
-       io/connectSocket.lc             \
-       io/createDirectory.lc           \
-       io/createSocket.lc              \
-       io/env.lc                       \
-       io/errno.lc                     \
-       io/execvpe.lc                   \
-       io/fileEOF.lc                   \
-       io/fileGetc.lc                  \
-       io/fileLookAhead.lc             \
-       io/filePosn.lc                  \
-       io/filePutc.lc                  \
-       io/fileSize.lc                  \
-       io/flushFile.lc                 \
-       io/getBufferMode.lc             \
-       io/getCPUTime.lc                \
-       io/getClockTime.lc              \
-       io/getCurrentDirectory.lc       \
-       io/getDirectoryContents.lc      \
-       io/getLock.lc                   \
-       io/getPeerName.lc               \
-       io/getSockName.lc               \
-       io/inputReady.lc                \
-       io/listenSocket.lc              \
-       io/openFile.lc                  \
-       io/readFile.lc                  \
-       io/readDescriptor.lc            \
-       io/removeDirectory.lc           \
-       io/removeFile.lc                \
-       io/renameDirectory.lc           \
-       io/renameFile.lc                \
-       io/seekFile.lc                  \
-       io/setBuffering.lc              \
-       io/setCurrentDirectory.lc       \
-       io/showTime.lc                  \
-       io/shutdownSocket.lc            \
-       io/system.lc                    \
-       io/toClockSec.lc                \
-       io/toLocalTime.lc               \
-       io/toUTCTime.lc                 \
-       io/writeFile.lc                 \
-       io/writeDescriptor.lc           \
-       main/Mallocs.lc                 \
-       prims/ByteOps.lc __readline_cfile
+       main/Mallocs.lc
 
 H_FILES = $(RTS_LH:.lh=.h)
 C_FILES = $(RTS_LC:.lc=.c) $(RTS_LHC:.lhc=.hc) $(CLIB_LC:.lc=.c)
@@ -277,56 +224,8 @@ CompileClibishly(hooks/PatErrorHdr,)
 CompileClibishly(hooks/TraceHooks,)
 CompileClibishly(hooks/SizeHooks,)
 CompileClibishly(hooks/InitEachPE,)
-CompileClibishly(io/acceptSocket,)
-CompileClibishly(io/bindSocket,)
-CompileClibishly(io/closeFile,)
-CompileClibishly(io/connectSocket,)
-CompileClibishly(io/createSocket,)
-CompileClibishly(io/createDirectory,)
-CompileClibishly(io/env,)
-CompileClibishly(io/errno,)
-CompileClibishly(io/execvpe,)
-CompileClibishly(io/fileEOF,)
-CompileClibishly(io/fileGetc,)
-CompileClibishly(io/fileLookAhead,)
-CompileClibishly(io/filePosn,)
-CompileClibishly(io/filePutc,)
-CompileClibishly(io/fileSize,)
-CompileClibishly(io/flushFile,)
-CompileClibishly(io/getBufferMode,)
-CompileClibishly(io/getCPUTime,)
-CompileClibishly(io/getClockTime,)
-CompileClibishly(io/getCurrentDirectory,)
-CompileClibishly(io/getDirectoryContents,)
-CompileClibishly(io/getLock,)
-CompileClibishly(io/getPeerName,)
-CompileClibishly(io/getSockName,)
-CompileClibishly(io/inputReady,)
-CompileClibishly(io/listenSocket,)
-CompileClibishly(io/openFile,)
-CompileClibishly(io/readFile,)
-CompileClibishly(io/readDescriptor,)
-CompileClibishly(io/removeDirectory,)
-CompileClibishly(io/removeFile,)
-CompileClibishly(io/renameDirectory,)
-CompileClibishly(io/renameFile,)
-CompileClibishly(io/seekFile,)
-CompileClibishly(io/setBuffering,)
-CompileClibishly(io/setCurrentDirectory,)
-CompileClibishly(io/showTime,)
-CompileClibishly(io/shutdownSocket,)
-CompileClibishly(io/system,)
-CompileClibishly(io/toClockSec,)
-CompileClibishly(io/toLocalTime,)
-CompileClibishly(io/toUTCTime,)
-CompileClibishly(io/writeDescriptor,)
-CompileClibishly(io/writeFile,)
 CompileClibishly(main/Mallocs,)
 CompileClibishly(main/TopClosure,)
-CompileClibishly(prims/ByteOps,)
-#if GhcWithReadline == YES
-CompileClibishly(io/ghcReadline,)
-#endif
 
 ExtraStuffToClean(main/TopClosure.o)
 
@@ -335,7 +234,7 @@ all :: main/TopClosure.o
 install :: main/TopClosure.o
        $(INSTALL) -c $(INSTLIBFLAGS) main/TopClosure.o   $(INSTLIBDIR_GHC)/TopClosure.o
 
-#if GhcBuild_mp == YES
+#if Build_mp == YES
 # if solaris2_TARGET_OS
 #  define __socket_libs -lsocket -lnsl
 # else
@@ -398,35 +297,35 @@ SpecialGhcRtsLibInstallTarget(tag)
 MakeDirectories(install, $(INSTLIBDIR_GHC))
 #endif /* DoInstallGHCSystem */
 
-IfGhcBuild_normal(BigBuildTarget(,$(RTS_OBJS_norm)))
-IfGhcBuild_p(BigBuildTarget(_p,   $(RTS_OBJS_p)))
-IfGhcBuild_t(BigBuildTarget(_t,   $(RTS_OBJS_t)))
-IfGhcBuild_u(BigBuildTarget(_u,   $(RTS_OBJS_u)))
-IfGhcBuild_mc(BigBuildTarget(_mc, $(RTS_OBJS_mc)))
-IfGhcBuild_mr(BigBuildTarget(_mr, $(RTS_OBJS_mr)))
-IfGhcBuild_mt(BigBuildTarget(_mt, $(RTS_OBJS_mt)))
-IfGhcBuild_mp(BigBuildTarget(_mp, $(RTS_OBJS_mp)))
-IfGhcBuild_mg(BigBuildTarget(_mg, $(RTS_OBJS_mg)))
-IfGhcBuild_2s(BigBuildTarget(_2s, $(RTS_OBJS_2s)))
-IfGhcBuild_1s(BigBuildTarget(_1s, $(RTS_OBJS_1s)))
-IfGhcBuild_du(BigBuildTarget(_du, $(RTS_OBJS_du)))
-IfGhcBuild_a(BigBuildTarget(_a,   $(RTS_OBJS_a)))
-IfGhcBuild_b(BigBuildTarget(_b,   $(RTS_OBJS_b)))
-IfGhcBuild_c(BigBuildTarget(_c,   $(RTS_OBJS_c)))
-IfGhcBuild_d(BigBuildTarget(_d,   $(RTS_OBJS_d)))
-IfGhcBuild_e(BigBuildTarget(_e,   $(RTS_OBJS_e)))
-IfGhcBuild_f(BigBuildTarget(_f,   $(RTS_OBJS_f)))
-IfGhcBuild_g(BigBuildTarget(_g,   $(RTS_OBJS_g)))
-IfGhcBuild_h(BigBuildTarget(_h,   $(RTS_OBJS_h)))
-IfGhcBuild_i(BigBuildTarget(_i,   $(RTS_OBJS_i)))
-IfGhcBuild_j(BigBuildTarget(_j,   $(RTS_OBJS_j)))
-IfGhcBuild_k(BigBuildTarget(_k,   $(RTS_OBJS_k)))
-IfGhcBuild_l(BigBuildTarget(_l,   $(RTS_OBJS_l)))
-IfGhcBuild_m(BigBuildTarget(_m,   $(RTS_OBJS_m)))
-IfGhcBuild_n(BigBuildTarget(_n,   $(RTS_OBJS_n)))
-IfGhcBuild_o(BigBuildTarget(_o,   $(RTS_OBJS_o)))
-IfGhcBuild_A(BigBuildTarget(_A,   $(RTS_OBJS_A)))
-IfGhcBuild_B(BigBuildTarget(_B,   $(RTS_OBJS_B)))
+IfBuild_normal(BigBuildTarget(,$(RTS_OBJS_norm)))
+IfBuild_p(BigBuildTarget(_p,   $(RTS_OBJS_p)))
+IfBuild_t(BigBuildTarget(_t,   $(RTS_OBJS_t)))
+IfBuild_u(BigBuildTarget(_u,   $(RTS_OBJS_u)))
+IfBuild_mc(BigBuildTarget(_mc, $(RTS_OBJS_mc)))
+IfBuild_mr(BigBuildTarget(_mr, $(RTS_OBJS_mr)))
+IfBuild_mt(BigBuildTarget(_mt, $(RTS_OBJS_mt)))
+IfBuild_mp(BigBuildTarget(_mp, $(RTS_OBJS_mp)))
+IfBuild_mg(BigBuildTarget(_mg, $(RTS_OBJS_mg)))
+IfBuild_2s(BigBuildTarget(_2s, $(RTS_OBJS_2s)))
+IfBuild_1s(BigBuildTarget(_1s, $(RTS_OBJS_1s)))
+IfBuild_du(BigBuildTarget(_du, $(RTS_OBJS_du)))
+IfBuild_a(BigBuildTarget(_a,   $(RTS_OBJS_a)))
+IfBuild_b(BigBuildTarget(_b,   $(RTS_OBJS_b)))
+IfBuild_c(BigBuildTarget(_c,   $(RTS_OBJS_c)))
+IfBuild_d(BigBuildTarget(_d,   $(RTS_OBJS_d)))
+IfBuild_e(BigBuildTarget(_e,   $(RTS_OBJS_e)))
+IfBuild_f(BigBuildTarget(_f,   $(RTS_OBJS_f)))
+IfBuild_g(BigBuildTarget(_g,   $(RTS_OBJS_g)))
+IfBuild_h(BigBuildTarget(_h,   $(RTS_OBJS_h)))
+IfBuild_i(BigBuildTarget(_i,   $(RTS_OBJS_i)))
+IfBuild_j(BigBuildTarget(_j,   $(RTS_OBJS_j)))
+IfBuild_k(BigBuildTarget(_k,   $(RTS_OBJS_k)))
+IfBuild_l(BigBuildTarget(_l,   $(RTS_OBJS_l)))
+IfBuild_m(BigBuildTarget(_m,   $(RTS_OBJS_m)))
+IfBuild_n(BigBuildTarget(_n,   $(RTS_OBJS_n)))
+IfBuild_o(BigBuildTarget(_o,   $(RTS_OBJS_o)))
+IfBuild_A(BigBuildTarget(_A,   $(RTS_OBJS_A)))
+IfBuild_B(BigBuildTarget(_B,   $(RTS_OBJS_B)))
 
 
 /****************************************************************
@@ -436,40 +335,40 @@ IfGhcBuild_B(BigBuildTarget(_B,   $(RTS_OBJS_B)))
 ****************************************************************/
 
 #define DoRtsFile(file,isuf,way,flags)                                  @@\
-CAT3(file,way,.o) : CAT2(file,isuf)                                     @@\
+CAT3(file.,way,o) : CAT2(file,isuf)                                     @@\
        $(RM) $@                                                         @@\
-       $(GHC) -c -o CAT3(file,way,.o) $(GHCFLAGS) flags CAT2(file,isuf)
-
-#define CompileRTSishly(file,isuf,flags)                       @@\
-IfGhcBuild_normal(DoRtsFile(file,isuf,,flags $(GHC_OPTS_norm)))        \
-IfGhcBuild_p(DoRtsFile(file,isuf,_p,   flags $(GHC_OPTS_p)))   \
-IfGhcBuild_t(DoRtsFile(file,isuf,_t,   flags $(GHC_OPTS_t)))   \
-IfGhcBuild_u(DoRtsFile(file,isuf,_u,   flags $(GHC_OPTS_u)))   \
-IfGhcBuild_mc(DoRtsFile(file,isuf,_mc, flags $(GHC_OPTS_mc)))  \
-IfGhcBuild_mr(DoRtsFile(file,isuf,_mr, flags $(GHC_OPTS_mr)))  \
-IfGhcBuild_mt(DoRtsFile(file,isuf,_mt, flags $(GHC_OPTS_mt)))  \
-IfGhcBuild_mp(DoRtsFile(file,isuf,_mp, flags $(GHC_OPTS_mp)))  \
-IfGhcBuild_mg(DoRtsFile(file,isuf,_mg, flags $(GHC_OPTS_mg)))  \
-IfGhcBuild_2s(DoRtsFile(file,isuf,_2s, flags $(GHC_OPTS_2s)))  \
-IfGhcBuild_1s(DoRtsFile(file,isuf,_1s, flags $(GHC_OPTS_1s)))  \
-IfGhcBuild_du(DoRtsFile(file,isuf,_du, flags $(GHC_OPTS_du)))  \
-IfGhcBuild_a(DoRtsFile(file,isuf,_a,   flags $(GHC_OPTS_a)))   \
-IfGhcBuild_b(DoRtsFile(file,isuf,_b,   flags $(GHC_OPTS_b)))   \
-IfGhcBuild_c(DoRtsFile(file,isuf,_c,   flags $(GHC_OPTS_c)))   \
-IfGhcBuild_d(DoRtsFile(file,isuf,_d,   flags $(GHC_OPTS_d)))   \
-IfGhcBuild_e(DoRtsFile(file,isuf,_e,   flags $(GHC_OPTS_e)))   \
-IfGhcBuild_f(DoRtsFile(file,isuf,_f,   flags $(GHC_OPTS_f)))   \
-IfGhcBuild_g(DoRtsFile(file,isuf,_g,   flags $(GHC_OPTS_g)))   \
-IfGhcBuild_h(DoRtsFile(file,isuf,_h,   flags $(GHC_OPTS_h)))   \
-IfGhcBuild_i(DoRtsFile(file,isuf,_i,   flags $(GHC_OPTS_i)))   \
-IfGhcBuild_j(DoRtsFile(file,isuf,_j,   flags $(GHC_OPTS_j)))   \
-IfGhcBuild_k(DoRtsFile(file,isuf,_k,   flags $(GHC_OPTS_k)))   \
-IfGhcBuild_l(DoRtsFile(file,isuf,_l,   flags $(GHC_OPTS_l)))   \
-IfGhcBuild_m(DoRtsFile(file,isuf,_m,   flags $(GHC_OPTS_m)))   \
-IfGhcBuild_n(DoRtsFile(file,isuf,_n,   flags $(GHC_OPTS_n)))   \
-IfGhcBuild_o(DoRtsFile(file,isuf,_o,   flags $(GHC_OPTS_o)))   \
-IfGhcBuild_A(DoRtsFile(file,isuf,_A,   flags $(GHC_OPTS_A)))   \
-IfGhcBuild_B(DoRtsFile(file,isuf,_B,   flags $(GHC_OPTS_B)))
+       $(GHC) -c -o CAT3(file.,way,o) $(GHCFLAGS) flags $(CAT4(GHC,_,way,OPTS)) CAT2(file,isuf)
+
+#define CompileRTSishly(file,isuf,flags)       @@\
+IfBuild_normal(DoRtsFile(file,isuf,,flags))    \
+IfBuild_p(DoRtsFile(file,isuf,p_,   flags))    \
+IfBuild_t(DoRtsFile(file,isuf,t_,   flags))    \
+IfBuild_u(DoRtsFile(file,isuf,u_,   flags))    \
+IfBuild_mc(DoRtsFile(file,isuf,mc_, flags))    \
+IfBuild_mr(DoRtsFile(file,isuf,mr_, flags))    \
+IfBuild_mt(DoRtsFile(file,isuf,mt_, flags))    \
+IfBuild_mp(DoRtsFile(file,isuf,mp_, flags))    \
+IfBuild_mg(DoRtsFile(file,isuf,mg_, flags))    \
+IfBuild_2s(DoRtsFile(file,isuf,2s_, flags))    \
+IfBuild_1s(DoRtsFile(file,isuf,1s_, flags))    \
+IfBuild_du(DoRtsFile(file,isuf,du_, flags))    \
+IfBuild_a(DoRtsFile(file,isuf,a_,   flags))    \
+IfBuild_b(DoRtsFile(file,isuf,b_,   flags))    \
+IfBuild_c(DoRtsFile(file,isuf,c_,   flags))    \
+IfBuild_d(DoRtsFile(file,isuf,d_,   flags))    \
+IfBuild_e(DoRtsFile(file,isuf,e_,   flags))    \
+IfBuild_f(DoRtsFile(file,isuf,f_,   flags))    \
+IfBuild_g(DoRtsFile(file,isuf,g_,   flags))    \
+IfBuild_h(DoRtsFile(file,isuf,h_,   flags))    \
+IfBuild_i(DoRtsFile(file,isuf,i_,   flags))    \
+IfBuild_j(DoRtsFile(file,isuf,j_,   flags))    \
+IfBuild_k(DoRtsFile(file,isuf,k_,   flags))    \
+IfBuild_l(DoRtsFile(file,isuf,l_,   flags))    \
+IfBuild_m(DoRtsFile(file,isuf,m_,   flags))    \
+IfBuild_n(DoRtsFile(file,isuf,n_,   flags))    \
+IfBuild_o(DoRtsFile(file,isuf,o_,   flags))    \
+IfBuild_A(DoRtsFile(file,isuf,A_,   flags))    \
+IfBuild_B(DoRtsFile(file,isuf,B_,   flags))
 
 /* here we go: */
 
@@ -542,6 +441,5 @@ ClearTagsFile()
 /* this is not the way we should do this [WDP [lazy] 94/09] */
 CTagsTarget( $(RTS_LC) $($RTS_LHC) $(CLIB_LC) )
 CTagsTarget( gmp/[a-z]*.c )
-CTagsTarget( regex/[a-z]*.c )
 
 CDependTarget( $(RTS_LC) $($RTS_LHC) $(CLIB_LC) )