1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344
|
/*
* $Id: Imakefile,v 1.125 1999/09/02 01:11:44 jik Exp $
*
* xrn - an X-based NNTP news reader
*
* Copyright (c) 1988-1993, Ellen M. Sentovich and Rick L. Spickelmier.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of the University of California not
* be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. The University
* of California makes no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* THE UNIVERSITY OF CALIFORNIA DISCLAIMS ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR
* ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
/*
* Imakefile - Imakefile for XRN
*/
/*
* If you want to compile the MOTIF version of XRN, define MOTIF here.
*
* *** NOTE WELL *** that the Motif version of XRN is not yet
* completely implemented, it probably doesn't work properly, and it's
* unsupported. If you want to help finish it, please let me know.
* Otherwise, you probably shouldn't try to compile it.
*/
/* #define MOTIF */
/*
* If you want the program to be called something other than "xrn",
* change PROGRAMS. If you want the app-defaults class to be something
* other than XRn, change APPDEFAULTS.
*/
PROGRAMS = xrn
#ifdef MOTIF
APPDEFAULTS = XRn_Motif
#else
APPDEFAULTS = XRn
#endif
/*
* What language do you want messages to be in? Legal values are
* "english", "german", and "french"; case is significant!
*/
LANGUAGE= english
/* LANGUAGE= german */
/* LANGUAGE= french */
#ifdef BandAidCompiler
#include BandAidCompiler
#endif
/*
* If you use InterNetNews, set this define to the location of your
* InterNetNews library.
*/
/* #define INN /usr/local/lib/libinn.a */
#ifdef INN
/*
* If you are using INN and the INN header files are not installed
* where the compiler will find them, add a "-Idir" flag here to specify
* where they are.
*/
INNINC=
#endif
/*
* If you need to link against special libraries, put them in
* XRN_LOAD_FLAGS. What's here may or may not be right for your
* system. If in doubt, leave it alone and see what happens.
*/
#if defined(XmacIIServer) || defined(SGIArchitecture)
XRN_LOAD_FLAGS = -lPW
#endif
#if defined(RsArchitecture)
XRN_LOAD_FLAGS = -lPW -lbsd
#endif
#if defined(AMIX)
XRN_LOAD_FLAGS = -lucb -lm -lgen
#endif
#if defined(SunArchitecture) && (OSMajorVersion > 4)
#define SolarisArchitecture
XRN_LOAD_FLAGS = -lgen
#endif
#if defined(BSD386Architecture) || defined(NetBSDArchitecture)
XRN_LOAD_FLAGS = -lcompat
#endif
#ifdef SCO
XRN_LOAD_FLAGS = -lintl
#endif
#if defined(MotoR4Architecture)
XRN_LOAD_FLAGS = -lnsl -lsocket -lgen
#endif
/*
* You probably won't need to change most of this.
*/
#ifdef MOTIF
# ifndef XMLIB
XMLIB = -lXm
# endif
# set this to whatever your system needs, might should put this above
# in the O.S. sections
XM_LIB_PATH = -L/usr/dt/lib
X_LIBRARIES = $(XM_LIB_PATH) $(XMLIB) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(XMEXTRA_LIBS)
DEPLIBS = $(DEPXMLIB) $(DEPXAWLIB) $(DEPXTOOLLIB) $(DEPXLIB)
#else
X_LIBRARIES = XawClientLibs
DEPLIBS = XawClientDepLibs
#endif
/*
* Special compiler flags for your platform. If in doubt, just leave
* them alone and see what happens.
*/
#if defined(HPArchitecture)
XRN_DEFINES = -D_HPUX_SOURCE
#endif /* HPArchitecture */
#if defined(aiws)
XRN_DEFINES = -a -Nn3000 -Nd4000
#else
# if defined(HCRevision)
XRN_DEFINES = -DUNIXCPP -DNOSTDHDRS
# else
# if defined(gould)
XRN_DEFINES = -DNOVOID -DLONGINT -UINTSPRINTF
# else
# if defined(SolarisArchitecture)
XRN_DEFINES = -DSOLARIS
# endif
# endif
# endif
#endif
/*
* You probably don't need to change anything in this block.
*/
#ifdef FreeBSDArchitecture
EXTRA_LIBRARIES += -lgnuregex
#endif
#ifdef LINUX_DIST
IMAKE_DEFINES += -DLINUX_DIST
SITE_DEFINES += -I/b/build/regex-0.12
SITE_DEFINES += -DCONFIG_H_IS_OK -D_GNU_SOURCE
LEX = flex
CDEBUGFLAGS += -Wall -DGCC_WALL -g -pedantic
REGEX_OBJS = /b/build/regex-0.12/regex.o
#endif
#if defined(INN)
INN_LOAD_FLAGS = INN
INN_DEFINES = -DINN $(INNINC)
CLIENTSRC =
CLIENTOBJ =
#else
CLIENTSRC = clientlib.c
CLIENTOBJ = clientlib.o
#endif
/*
* You probably don't need to edit anything below this line.
*/
#ifdef MOTIF
GUI_DEFINES = -DMOTIF
#endif
#if HasVoidSignalReturn
SIGNAL_DEFINES = -DVOID_SIGNAL
#endif
LOCAL_LIBRARIES = $(X_LIBRARIES) $(XRN_LOAD_FLAGS) $(INN_LOAD_FLAGS)
DEFINES = $(XRN_DEFINES) $(GUI_DEFINES) $(SIGNAL_DEFINES) $(INN_DEFINES) \
$(SITE_DEFINES) -DXRN_LANG_$(LANGUAGE) \
-DXRNAPPDIR=\"$(XAPPLOADDIR)\" \
-DXRN_APP_CLASS=\"$(APPDEFAULTS)\" -DXRN
HDRS = mesg_strings.h
SRCS = avl.c $(CLIENTSRC) compose.c cursor.c dialogs.c \
refile.c mesg.c error_hnds.c newsrcfile.c resources.c \
internals.c save.c server.c utils.c xrn.c \
xthelper.c rcyacc.c cancel.c vprintf.c tempnam.c strstr.c \
strtok.c mesg_strings.c Text.c ngMode.c artMode.c allMode.c \
addMode.c snapshot.c artstruct.c Buttons.c InfoLine.c ButtonBox.c \
busyCursor.c varfile.c activecache.c sort.c getdate2.c hash.c \
killfile.c InfoDialog.c Frame.c Xmisc.c file_cache.c
LOCAL_OBJS = avl.o $(CLIENTOBJ) compose.o cursor.o dialogs.o \
refile.o mesg.o error_hnds.o newsrcfile.o resources.o \
internals.o save.o server.o utils.o xrn.o \
xthelper.o rcyacc.o cancel.o vprintf.o tempnam.o strstr.o \
strtok.o mesg_strings.o Text.o ngMode.o artMode.o allMode.o \
addMode.o snapshot.o artstruct.o Buttons.o InfoLine.o ButtonBox.o \
busyCursor.o varfile.o activecache.o sort.o getdate2.o hash.o \
killfile.o InfoDialog.o Frame.o Xmisc.o file_cache.o
OBJS = $(LOCAL_OBJS) $(REGEX_OBJS)
all:: mesg_strings.h
depend:: rclex.c rcyacc.c mesg_strings.h getdate2.c
ComplexProgramTarget($(PROGRAMS))
InstallAppDefaults($(APPDEFAULTS))
/*
* This line is in two places, above and here, because some versions
* of Make unfortunately have a bug which causes them to process
* dependencies in reverse of the order they appear in the Makefile.
* On those systems, if the "all:: mesg_strings.h" line below isn't
* present, typing "xmkmf" followed by "make" won't work, because the
* program will try to build the XRN object and $(PROGRAMS) before it
* tries to build mesg_strings.h. Doing "make depend" solves this
* problem, but I don't want to require people to do "make depend" in
* order to build the program, so I'm adding a second dependency on
* mesg_strings.h, after the "all:: xrn" dependency generated by the
* ComplexProgramTarget invocation above.
*/
all:: mesg_strings.h
#if HasSaberC == YES
# saber_xrn:: rclex.c
# osaber_xrn:: rclex.c
#endif
/*
* If you are using flex instead of lex (for example, Linux uses flex
* by default instead of lex), you should NOT be giving flex the "-l"
* argument. If you see "flex -l rclex.l" or "lex -l rclex.l" when
* building, then you should probably add "LEX=flex" or "LEX=lex"
* below.
*/
rclex.c: rclex.l
rcyacc.o: rclex.c avl.h news.h newsrcfile.h utils.h
mesg_strings.h: mesg_strings.c mesg_str.awk
-rm -f mesg_str.tmp
awk -f mesg_str.awk mesg_strings.c > mesg_str.tmp
@set -x; if cmp -s mesg_str.tmp mesg_strings.h; then \
rm -f mesg_str.tmp; \
else \
rm -f mesg_strings.h; \
mv mesg_str.tmp mesg_strings.h; \
fi
$(LOCAL_OBJS): config.h
clean::
$(RM) mesg_strings.h mesg_str.tmp
xrn-man.c: xrn-man.sym config.h
$(RM) xrn-man.tmp xrn-man.c
awk 'BEGIN {printf("#include \"config.h\"\n");} {printf("#ifdef %s\nx%sx value %s value\n#else\nx%sx\n#endif\n",$$0,$$0,$$0,$$0);}' \
xrn-man.sym > xrn-man.tmp
mv xrn-man.tmp xrn-man.c
xrn-man.cpp: xrn-man.c
$(RM) -f xrn-man.tmp xrn-man.cpp
$(CC) -E $(CFLAGS) xrn-man.c > xrn-man.tmp
mv xrn-man.tmp xrn-man.cpp
xrn-man.sed: xrn-man.cpp
$(RM) -f xrn-man.tmp xrn-man.sed
sed -e 's|^x\(.*\)x$$|/x\1_STARTx/,/x\1_ENDx/d|' \
-e 's|^x\(.*\)x value [ ]*"\(.*\)"[ ]* value.*|s,x\1x,\2,|' \
-e 's|^x\(.*\)x value [ ]*\([^ ].*[^ ]\)[ ]* value.*|s,x\1x,\2,|' \
-e 's|^x\(.*\)x value [ ]*\([^ ]\)[ ]* value.*|s,x\1x,\2,|' \
-e 's|^x\(.*\)x.*||' \
-e '/^#/d' \
xrn-man.cpp > xrn-man.tmp
echo '/^x.*_STARTx/d' >> xrn-man.tmp
echo '/^x.*_ENDx/d' >> xrn-man.tmp
mv xrn-man.tmp xrn-man.sed
all:: $(PROGRAMS).man
$(PROGRAMS).man:: xrn-man.src xrn-man.sed
$(RM) xrn-man.tmp $(PROGRAMS).man
sed -f xrn-man.sed xrn-man.src > xrn-man.tmp
mv xrn-man.tmp $(PROGRAMS).man
clean::
$(RM) xrn-man.tmp xrn-man.c xrn-man.cpp xrn-man.sed $(PROGRAMS).man
#ifdef MOTIF
TKSED= -e 's/MOTIF//' -e '/XAW/d' -e 's/notify()/Activate()/' \
-e 's/unset()/Disarm()/' -e 's/set()/Arm()/' \
-e 's/\([*.]\)label:/\1labelString:/' \
-e 's/no-op(RingBell/beep(/' \
-e 's/\.\([^.]*\)\.baseTranslations/*\1*translations/' \
-e 's/baseTranslations/translations/' \
-e 's/>Down/>osfDown/' -e 's/>Up/>osfUp/' \
-e 's/>Left/>osfLeft/' -e 's/>Right/>osfRight/'
#else
TKSED= -e 's/XAW//' -e '/MOTIF/d'
#endif
TKSED2= -e 's/XawSet()/set()/' -e 's/XawNotify()/notify()/' \
-e 's/XawUnSet()/unset()/'
$(APPDEFAULTS).ad: XRn.src
-rm -f $(APPDEFAULTS).tmp $(APPDEFAULTS).ad
sed -e 's/LANG_$(LANGUAGE)//' -e '/LANG_/d' $(TKSED) $(TKSED2) \
-e 's/xAPP_CLASSx/$(APPDEFAULTS)/' \
XRn.src > $(APPDEFAULTS).tmp
mv $(APPDEFAULTS).tmp $(APPDEFAULTS).ad
all:: $(APPDEFAULTS).ad
clean::
$(RM) $(APPDEFAULTS).ad $(APPDEFAULTS).tmp
getdate2.c: getdate.c
sed -e 's/yy/getdate_yy/g' getdate.c > $@.tmp
mv $@.tmp $@
clean::
$(RM) getdate.c getdate2.c.tmp getdate2.c rclex.c rcyacc.c
|