"Fossies" - the Fresh Open Source Software Archive

Member "cvs-1.11.23/os2/Makefile" (8 May 2008, 11551 Bytes) of package /linux/misc/old/cvs-1.11.23.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Makefile for OS/2.  Generated from Makefile.in when CVS is
    2 # configured for a dist-build.  Configure never gets run on OS/2, so
    3 # we must include the generated Makefile in the distribution.  See the
    4 # `dist-dir' rule.
    5 
    6 project: cvs.exe
    7 # .SUFFIXES .c .obj .exe
    8 
    9 # path slash.  This was introduced so that it can be set to \
   10 # instead of / for linking, but now that the cvs.exe rule uses
   11 # subst to produce \, it should be possible to nuke SL.
   12 # FIXME - nuke SL
   13 SL = /
   14 
   15 # Directory in which to install executables.
   16 install_dir = s:${SL}gnu${SL}util
   17 
   18 # srcdir is usually "."
   19 srcdir     = .
   20 
   21 # top_srcdir is usually ".."
   22 top_srcdir = ..
   23 
   24 
   25 subdir     = os2
   26 
   27 lib_dir     = ..${SL}lib
   28 cvs_srcdir = ..${SL}src
   29 
   30 zlib_dir = ${top_srcdir}/zlib
   31 
   32 # Do we need these?
   33 # prefix = /usr/local
   34 # exec_prefix = ${prefix}
   35 
   36 # taken straight from the example project
   37 LIB = s:${SL}ibmcpp${SL}lib;s:${SL}toolkt21${SL}os2lib;
   38 CINC = -Is:${SL}ibmcpp${SL}include -Is:${SL}toolkt21${SL}c${SL}os2h
   39 # This says we are building an object file, not a full executable.
   40 OBJ_CFLAGS = -C+
   41 CFLAGS = -W3 -Wrea+tru+ -Ti+ -Ss+ -Gd- -Gm+ -G4 -Q+ -Sm ${CINC} \
   42   -I${srcdir} -I${lib_dir} -I${cvs_srcdir} -I${zlib_dir} \
   43   -DIBM_CPP -DHAVE_CONFIG_H \
   44   -DTCPIP_IBM -Is:${SL}ibmtcpip${SL}include
   45 
   46 # needed to make command-line wildcard expansion work right.  That's
   47 # right, DOS-descendants handle this from the program, not the shell.
   48 ARGVLIB = s:${SL}ibmcpp${SL}lib${SL}setargv.obj
   49 
   50 # TCP/IP stuff
   51 TCPIPLIB = s:${SL}ibmtcpip${SL}lib${SL}tcp32dll.lib	s:${SL}ibmtcpip${SL}lib${SL}so32dll.lib
   52 
   53 
   54 # headers specific to OS/2
   55 
   56 # We list OS2_HEADERS so we know what to include when we make dist-dir
   57 # here.
   58 OS2_HEADERS = \
   59        tcpip.h \
   60        config.h \
   61        pwd.h \
   62        dirent.h \
   63        rcmd.h \
   64        popen.h
   65 
   66 # headers we use from the common src dir, ..${SL}src
   67 COMMON_HEADERS = \
   68        ${cvs_srcdir}${SL}client.h \
   69        ${cvs_srcdir}${SL}cvs.h \
   70        ${cvs_srcdir}${SL}rcs.h \
   71        ${cvs_srcdir}${SL}hash.h \
   72        ${cvs_srcdir}${SL}myndbm.h \
   73        ${cvs_srcdir}${SL}patchlevel.h \
   74        ${cvs_srcdir}${SL}update.h \
   75        ${cvs_srcdir}${SL}server.h \
   76        ${cvs_srcdir}${SL}error.h
   77 
   78 # sources specific to OS/2
   79 OS2_SOURCES = \
   80        mkdir.c \
   81        pwd.c \
   82        filesubr.c \
   83        dirent.c \
   84        run.c \
   85        stripslash.c \
   86        rcmd.c \
   87        waitpid.c \
   88        popen.c \
   89        porttcp.c \
   90        getpass.c
   91 
   92 # sources we use from the common src dir, ..${SL}src
   93 # FIXME: Is this used anywhere?  I don't think it is.
   94 COMMON_SOURCES = \
   95        ${cvs_srcdir}${SL}add.c \
   96        ${cvs_srcdir}${SL}admin.c \
   97        ${cvs_srcdir}${SL}buffer.c \
   98        ${cvs_srcdir}${SL}checkin.c \
   99        ${cvs_srcdir}${SL}checkout.c \
  100        ${cvs_srcdir}${SL}classify.c \
  101        ${cvs_srcdir}${SL}client.c \
  102        ${cvs_srcdir}${SL}commit.c \
  103        ${cvs_srcdir}${SL}create_adm.c \
  104        ${cvs_srcdir}${SL}cvsrc.c \
  105        ${cvs_srcdir}${SL}diff.c \
  106        ${cvs_srcdir}${SL}edit.c \
  107        ${cvs_srcdir}${SL}entries.c \
  108        ${cvs_srcdir}${SL}error.c \
  109        ${cvs_srcdir}${SL}expand_path.c \
  110        ${cvs_srcdir}${SL}fileattr.c \
  111        ${cvs_srcdir}${SL}find_names.c \
  112        ${cvs_srcdir}${SL}hash.c \
  113        ${cvs_srcdir}${SL}history.c \
  114        ${cvs_srcdir}${SL}ignore.c \
  115        ${cvs_srcdir}${SL}import.c \
  116        ${cvs_srcdir}${SL}lock.c \
  117        ${cvs_srcdir}${SL}log.c \
  118        ${cvs_srcdir}${SL}login.c \
  119        ${cvs_srcdir}${SL}logmsg.c \
  120        ${cvs_srcdir}${SL}main.c \
  121        ${cvs_srcdir}${SL}mkmodules.c \
  122        ${cvs_srcdir}${SL}modules.c \
  123        ${cvs_srcdir}${SL}myndbm.c \
  124        ${cvs_srcdir}${SL}no_diff.c \
  125        ${cvs_srcdir}${SL}parseinfo.c \
  126        ${cvs_srcdir}${SL}patch.c \
  127        ${cvs_srcdir}${SL}rcs.c \
  128        ${cvs_srcdir}${SL}rcscmds.c \
  129        ${cvs_srcdir}${SL}recurse.c \
  130        ${cvs_srcdir}${SL}release.c \
  131        ${cvs_srcdir}${SL}remove.c \
  132        ${cvs_srcdir}${SL}repos.c \
  133        ${cvs_srcdir}${SL}root.c \
  134        ${cvs_srcdir}${SL}scramble.c \
  135        ${cvs_srcdir}${SL}server.c \
  136        ${cvs_srcdir}${SL}status.c \
  137        ${cvs_srcdir}${SL}subr.c \
  138        ${cvs_srcdir}${SL}tag.c \
  139        ${cvs_srcdir}${SL}update.c \
  140        ${cvs_srcdir}${SL}watch.c \
  141        ${cvs_srcdir}${SL}wrapper.c \
  142        ${cvs_srcdir}${SL}vers_ts.c \
  143        ${cvs_srcdir}${SL}version.c
  144 # end of $COMMON_SOURCES
  145 
  146 # sources from ..${SL}lib
  147 # FIXME: Is this used anywhere?  I don't think it is.
  148 LIB_SOURCES = \
  149        ${lib_dir}${SL}getdate.c \
  150        ${lib_dir}${SL}getopt.c \
  151        ${lib_dir}${SL}getopt1.c \
  152        ${lib_dir}${SL}getline.c \
  153        ${lib_dir}${SL}getwd.c \
  154        ${lib_dir}${SL}savecwd.c \
  155        ${lib_dir}${SL}sighandle.c \
  156        ${lib_dir}${SL}yesno.c \
  157        ${lib_dir}${SL}vasprintf.c \
  158        ${lib_dir}${SL}xgetwd.c \
  159        ${lib_dir}${SL}md5.c \
  160        ${lib_dir}${SL}fnmatch.c \
  161        ${lib_dir}${SL}regex.c
  162 
  163 # object files from OS/2 sources
  164 OS2_OBJECTS = \
  165        ${srcdir}${SL}mkdir.obj \
  166        ${srcdir}${SL}pwd.obj \
  167        ${srcdir}${SL}filesubr.obj \
  168        ${srcdir}${SL}dirent.obj \
  169        ${srcdir}${SL}run.obj \
  170        ${srcdir}${SL}stripslash.obj \
  171        ${srcdir}${SL}rcmd.obj \
  172        ${srcdir}${SL}waitpid.obj \
  173        ${srcdir}${SL}popen.obj \
  174        ${srcdir}${SL}porttcp.obj \
  175        ${srcdir}${SL}getpass.obj
  176 
  177 # object files from ..${SL}src
  178 COMMON_OBJECTS = \
  179        ${cvs_srcdir}${SL}add.obj \
  180        ${cvs_srcdir}${SL}admin.obj \
  181        ${cvs_srcdir}${SL}buffer.obj \
  182        ${cvs_srcdir}${SL}checkin.obj \
  183        ${cvs_srcdir}${SL}checkout.obj \
  184        ${cvs_srcdir}${SL}classify.obj \
  185        ${cvs_srcdir}${SL}client.obj \
  186        ${cvs_srcdir}${SL}commit.obj \
  187        ${cvs_srcdir}${SL}create_adm.obj \
  188        ${cvs_srcdir}${SL}cvsrc.obj \
  189        ${cvs_srcdir}${SL}diff.obj \
  190        ${cvs_srcdir}${SL}edit.obj \
  191        ${cvs_srcdir}${SL}entries.obj \
  192        ${cvs_srcdir}${SL}error.obj \
  193        ${cvs_srcdir}${SL}expand_path.obj \
  194        ${cvs_srcdir}${SL}fileattr.obj \
  195        ${cvs_srcdir}${SL}find_names.obj \
  196        ${cvs_srcdir}${SL}hash.obj \
  197        ${cvs_srcdir}${SL}history.obj \
  198        ${cvs_srcdir}${SL}ignore.obj \
  199        ${cvs_srcdir}${SL}import.obj \
  200        ${cvs_srcdir}${SL}lock.obj \
  201        ${cvs_srcdir}${SL}log.obj \
  202        ${cvs_srcdir}${SL}login.obj \
  203        ${cvs_srcdir}${SL}logmsg.obj \
  204        ${cvs_srcdir}${SL}main.obj \
  205        ${cvs_srcdir}${SL}mkmodules.obj \
  206        ${cvs_srcdir}${SL}modules.obj \
  207        ${cvs_srcdir}${SL}myndbm.obj \
  208        ${cvs_srcdir}${SL}no_diff.obj \
  209        ${cvs_srcdir}${SL}parseinfo.obj \
  210        ${cvs_srcdir}${SL}patch.obj \
  211        ${cvs_srcdir}${SL}rcs.obj \
  212        ${cvs_srcdir}${SL}rcscmds.obj \
  213        ${cvs_srcdir}${SL}recurse.obj \
  214        ${cvs_srcdir}${SL}release.obj \
  215        ${cvs_srcdir}${SL}remove.obj \
  216        ${cvs_srcdir}${SL}repos.obj \
  217        ${cvs_srcdir}${SL}root.obj \
  218        ${cvs_srcdir}${SL}scramble.obj \
  219        ${cvs_srcdir}${SL}server.obj \
  220        ${cvs_srcdir}${SL}status.obj \
  221        ${cvs_srcdir}${SL}subr.obj \
  222        ${cvs_srcdir}${SL}tag.obj \
  223        ${cvs_srcdir}${SL}update.obj \
  224        ${cvs_srcdir}${SL}watch.obj \
  225        ${cvs_srcdir}${SL}wrapper.obj \
  226        ${cvs_srcdir}${SL}vers_ts.obj \
  227        ${cvs_srcdir}${SL}version.obj \
  228        ${cvs_srcdir}/zlib.obj
  229 # end of $COMMON_OBJECTS
  230 
  231 # objects from ..${SL}lib
  232 LIB_OBJECTS = \
  233        ${lib_dir}${SL}getdate.obj \
  234        ${lib_dir}${SL}getopt.obj \
  235        ${lib_dir}${SL}getopt1.obj \
  236        ${lib_dir}${SL}getline.obj \
  237        ${lib_dir}${SL}getwd.obj \
  238        ${lib_dir}${SL}savecwd.obj \
  239        ${lib_dir}${SL}sighandle.obj \
  240        ${lib_dir}${SL}yesno.obj \
  241        ${lib_dir}${SL}vasprintf.obj \
  242        ${lib_dir}${SL}xgetwd.obj \
  243        ${lib_dir}${SL}md5.obj \
  244        ${lib_dir}${SL}fnmatch.obj \
  245        ${lib_dir}${SL}regex.obj \
  246        ${lib_dir}/valloc.obj
  247 
  248 ZLIB_OBJECTS = ${zlib_dir}/adler32.obj \
  249        ${zlib_dir}/compress.obj \
  250        ${zlib_dir}/crc32.obj \
  251        ${zlib_dir}/uncompr.obj \
  252        ${zlib_dir}/deflate.obj \
  253        ${zlib_dir}/trees.obj \
  254        ${zlib_dir}/zutil.obj \
  255        ${zlib_dir}/inflate.obj \
  256        ${zlib_dir}/infblock.obj \
  257        ${zlib_dir}/inftrees.obj \
  258        ${zlib_dir}/infcodes.obj \
  259        ${zlib_dir}/infutil.obj \
  260        ${zlib_dir}/inffast.obj
  261 
  262 SOURCES = ${COMMON_SOURCES} ${LIB_SOURCES} ${OS2_SOURCES}
  263 HEADERS = ${COMMON_HEADERS} ${OS2_HEADERS}
  264 OBJECTS = ${COMMON_OBJECTS} ${LIB_OBJECTS} ${OS2_OBJECTS} ${ZLIB_OBJECTS}
  265 
  266 DISTFILES = ${OS2_HEADERS} ${OS2_SOURCES} \
  267   README ChangeLog \
  268   Makefile.in .cvsignore \
  269   test-makefile Makefile os2inc.h \
  270   watcom.mak
  271 
  272 all:
  273 
  274 .PHONY: all install uninstall
  275 all install uninstall:
  276 
  277 # Remove targets for Automake
  278 dvi info pdf ps:
  279 .PHONY: dvi info pdf ps
  280 check installcheck:
  281 .PHONY: check installcheck
  282 installdirs:
  283 lint:
  284 tags TAGS:
  285 .PHONY: installdirs lint tags TAGS
  286 
  287 # distdir added for compatibility with CVS automake.
  288 top_distdir = ..
  289 PACKAGE = cvs
  290 VERSION = 1.11.23
  291 distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
  292 
  293 distdir: $(DISTFILES)
  294 	@list='$(DISTFILES)'; for file in $$list; do \
  295 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
  296 	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
  297 	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
  298 	    dir="/$$dir"; \
  299 	    $(mkinstalldirs) "$(distdir)$$dir"; \
  300 	  else \
  301 	    dir=''; \
  302 	  fi; \
  303 	  if test -d $$d/$$file; then \
  304 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
  305 	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
  306 	    fi; \
  307 	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
  308 	  else \
  309 	    test -f $(distdir)/$$file \
  310 	    || cp -p $$d/$$file $(distdir)/$$file \
  311 	    || exit 1; \
  312 	  fi; \
  313 	done
  314 .PHONY: distdir
  315 
  316 # We don't have a real distclean or anything like that, but at least
  317 # we can get rid of the obj files and cvs.exe. 
  318 .PHONY: clean distclean realclean mostlyclean maintainer-clean
  319 clean distclean realclean maintainer-clean mostlyclean:
  320 	rm -f cvs.exe
  321 	rm -f ${srcdir}${SL}*.obj 
  322 	rm -f ${lib_dir}${SL}*.obj 
  323 	rm -f ${cvs_srcdir}${SL}*.obj 
  324 
  325 install-cvs: cvs.exe
  326 	cp ${srcdir}${SL}cvs.exe ${install_dir}${SL}cvs.exe
  327 
  328 %.obj: %.c
  329 	icc ${OBJ_CFLAGS} ${CFLAGS} /Fo$@ $*.c
  330 
  331 # There seems to be no ICC option for specifying library locations, so
  332 # we must `set' the path in the compilation environment.  Urgkle. 
  333 #
  334 #         I'm having some weird problem with "\" vs. "/".  If I build
  335 # with "\" as the path separator in the makefile, the compiler dumps
  336 # core.  Go figure.  If I build with "/" as the path separator, the
  337 # object files compile fine but the linker thinks the "/" is indicating
  338 # options and gets all confused (though at least it doesn't dump core).
  339 # So, use subst to compile with "/" and link with "\".
  340 cvs.exe: ${OBJECTS}
  341 	echo Creating icc.in...
  342 	echo -Q+ -Ti+ -Fe$@ -B"/batch" -B"/NOE" > icc.in
  343 	echo $(subst /,\,$(OS2_OBJECTS))       >> icc.in
  344 	echo $(subst /,\,$(LIB_OBJECTS))       >> icc.in
  345 	echo $(subst /,\,$(COMMON_OBJECTS))    >> icc.in
  346 	echo $(subst /,\,$(ZLIB_OBJECTS))      >> icc.in
  347 	echo $(subst /,\,$(TCPIPLIB))          >> icc.in
  348 	echo $(subst /,\,$(ARGVLIB))           >> icc.in
  349 	echo Creating icc.in... done.
  350 	set LIB=$(subst /,\,$(LIB)) & icc @icc.in
  351 
  352 # cvs.obj: ${OBJECTS} ${SOURCES} ${HEADERS}
  353 
  354 # Hmm.  This rule wants to exist on unix, so that "make dist" works.
  355 # And it doesn't want to exist on OS/2, because configure doesn't
  356 # run on OS/2 and so ../config.status won't exist.  For now we just
  357 # say, in emx/README, that people will need to comment it out.
  358 Makefile: ../config.status $(srcdir)/Makefile.in
  359 	cd .. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status