add $(EXEEXT) to executable targets during installation for MinGW
[suif.git] / Makefile.std
blob433354538e0d5ec5903749b32acd186b1385f6f3
1 # read the standard variable definitions
3 include $(SUIFHOME)/Makefile.defs
5 # comment these out and/or pass them in from the environment to not
6 # build the documentation on your machine:
8 # BUILD_INFO =  1
9 # BUILD_PS =    1
10 # BUILD_HTML =  1
11 # BUILD_MAN =   1
13 # similar for this one for the shared TCL libraries and scripts:
15 # BUILD_TCL =   1
16 # BUILD_SCRIPTS = 1
19 # To save time on some systems, set CATSOURCE to catted.cc and
20 # set BUILD_CATTED_LIBRARIES in Makefile, to cat all .cc files together
21 # and compile as one unit.
24 ifdef CATSOURCE
25 OBJS :=         $(subst .cc,.o,$(CATSOURCE))
26 OLD_SRCS :=     $(SRCS)
27 SRCS :=         $(CATSOURCE)
28 $(CATSOURCE):   $(OLD_SRCS)
29                 rm -f $(CATSOURCE)
30                 fgrep '#pragma implementation' $(OLD_SRCS) | \
31                         sed -e 's/^[^:]*://' > $(CATSOURCE)
32                 cat $(OLD_SRCS) | fgrep -v '#pragma implementation' \
33                         >> $(CATSOURCE)
34 endif
35 ifdef BUILD_CATTED_LIBRARIES
36 USE_SUIF_STRIPPED_HEADERS =
37 else
38 USE_SUIF_STRIPPED_HEADERS = -DSUIF_STRIPPED_HEADERS
39 endif
41 REALSRCS =      $(YSRCS) $(DSRCS) $(HEADERS) $(CSRCS) $(SRCS) \
42                 $(INFOSRCS) $(MANPAGES) $(GIFSRCS) $(VERDATAFILE) $(TCLSRCS) \
43                 $(OTHERSRCS)
44 ALLTMPSRCS =    $(TMP_YSRCS) $(TMP_DSRCS) $(TMP_HEADERS) $(TMP_CSRCS) \
45                 $(TMP_SRCS) $(TMP_INFOSRCS) $(TMP_MANPAGES) $(TMP_GIFSRCS) \
46                 $(TMP_VERDATAFILE) $(TMP_TCLSRCS) \
47                 $(TMP_OTHERSRCS)
48 ALLSRCS =       $(REALSRCS) $(ALLTMPSRCS)
49 ALLCSRCS =      $(CSRCS) $(TMP_CSRCS)
50 ALLCXXSRCS =    $(SRCS) $(TMP_SRCS)
51 ALLHEADERS =    $(HEADERS) $(AUXILIARY_HEADERS) $(TMP_HEADERS)
52 ALLGIFSRCS =    $(GIFSRCS) $(TMP_GIFSRCS)
53 ALLVERDATAFILE = $(VERDATAFILE) $(TMP_VERDATAFILE)
54 ALLTCLSRCS =    $(TCLSRCS) $(TMP_TCLSRCS)
56 # note: ALLHEADERS exported so we can suif-install-env it
57 # it is cleared in suif-recursive-make
58 unexport REALSRCS ALLTMPSRCS ALLSRCS ALLCSRCS ALLCXXSRCS
59 unexport ALLGIFSRCS ALLVERDATAFILE ALLTCLSRCS
61 # Why put $(LIBNAME_SET) under .PHONY?  Because at the top of
62 # Makefile.rules vpath is set to include the library binary directory,
63 # but we don't want it to find local targets there and not build them
64 # locally.  Makefile.rules attempts to solve this problem by only
65 # adding the vpath constructs if LIBS is defined, so it won't be
66 # invoked on pure libraries.  But this isn't sufficient for sharlit
67 # and nsharlit because they define both a program and a library.  So
68 # we use .PHONY to make sure the local libraries are always rebuilt.
70 .PHONY:         $(TARGET) $(LIBNAME_SET) pure prog_ver.cc lib_ver.cc \
71                 start_sty.cc register_lib.cc lib prog info install \
72                 install-keep-src show-install reinstall reinstall-keep-src \
73                 show-reinstall reinstall-bin show-reinstall-bin \
74                 real-reinstall real-reinstall-keep-src deinstall \
75                 install-local-ver install-ver install-prog install-scripts \
76                 install-lib install-bin-base deinstall-bin \
77                 install-bin-recursive install-bin-all deinstall-src \
78                 install-src-dir install-local-src install-recursive-src \
79                 install-src install-incl install-local-incl \
80                 deinstall-local-incl install-recursive-incl install-info \
81                 install-local-info deinstall-local-info \
82                 install-recursive-info preinstall-check install-verdata \
83                 deinstall-verdata source clean clean-src clean-rcs-links \
84                 depend sub-packages recursive build-dir directory-structure
86 FORCE_RCS=FORCE
88 unexport FORCE_RCS
90 include $(SUIFHOME)/Makefile.rules
92 ifdef BUILD_INFO
93 STAMP_INFO_TARGET =     stamp-info
94 endif
95 ifdef BUILD_PS
96 STAMP_PS_TARGET =       stamp-ps
97 endif
98 ifdef BUILD_HTML
99 STAMP_HTML_TARGET =     stamp-html
100 endif
101 STAMP_DOC_TARGETS =     $(STAMP_INFO_TARGET) $(STAMP_PS_TARGET) \
102                         $(STAMP_HTML_TARGET)
104 unexport STAMP_INFO_TARGET STAMP_PS_TARGET STAMP_HTML_TARGET STAMP_DOC_TARGETS
106 %.o : %.c $(REALSRCS) $(TMP_HEADERS) $(TMP_CSRCS) Makefile.deps FORCE
107                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
109 %.o : %.cc $(REALSRCS) $(TMP_HEADERS) $(TMP_SRCS) Makefile.deps FORCE
110                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
112 $(TARGET): $(OBJS) Makefile.deps
113                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
115 pure: $(OBJS) Makefile.deps
116                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
118 $(STATIC_LIBNAME): $(OBJS) Makefile.deps
119                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
121 $(SHARED_LIBNAME): $(OBJS) Makefile.deps
122                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
124 prog_ver.cc: $(TMP_HEADERS) $(TMP_SRCS) $(TMP_CSRCS) $(OBJS) Makefile.deps
125                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
127 lib_ver.cc: $(TMP_HEADERS) $(TMP_SRCS) $(TMP_CSRCS) $(OBJS) Makefile.deps
128                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
130 start_sty.cc: $(TMP_HEADERS) $(TMP_SRCS) $(TMP_CSRCS) Makefile.deps Makefile
131                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
133 register_lib.cc: $(TMP_HEADERS) $(TMP_SRCS) $(TMP_CSRCS) Makefile.deps Makefile
134                 @$(MAKE) --no-print-directory -f $(SUIFHOME)/Makefile.sub $@
136 lib:            $(LIBNAME_SET)
138 prog:           $(TARGET_EXECUTABLES)
140 info:           stamp-info
142 ps:             stamp-ps
144 html:           stamp-html
146 all-docs:       stamp-info stamp-ps stamp-html
148 stamp-info:     $(INFOSRCS)
149 ifdef INFOS
150                 for i in $(INFOS) ; do \
151                         makeinfo $$i.texi ; \
152                 done
153 endif
154                 @touch stamp-info
156 ifdef INFOS
157 stamp-ps:       $(INFOSRCS) suif_logo.epsf
158                 for i in $(INFOS) ; do \
159                     if test ! -f $$i.ps || \
160                         newer $$i.texi $$i.ps ; then \
161                         tex $$i.texi ; \
162                         texindex $$i.cp $$i.fn $$i.ky $$i.pg $$i.tp $$i.vr ; \
163                         tex $$i.texi ; \
164                         dvips -o $$i.ps $$i.dvi ; \
165                     else : ; \
166                     fi ; \
167                 done
168 else
169 stamp-ps:       $(INFOSRCS)
170 endif
171                 @touch stamp-ps
173 stamp-html:     $(INFOSRCS)
174 ifdef INFOS
175                 for i in $(INFOS) ; do \
176                         texi2html -split_node -menu $$i.texi ; \
177                 done
178 endif
179                 @touch stamp-html
181 current:
182                 $(MAKE) --no-print-directory
184 show-install:
185                 @$(MAKE) --no-print-directory preinstall-check
186                 @$(MAKE) --no-print-directory deinstall-src 1>> $(LOGFILE) 2>&1
187                 @$(MAKE) --no-print-directory install-src-dir 1>> $(LOGFILE) \
188                         2>&1
189 ifdef SUB_PACKAGES
190                 @SILENT_RECURSIVE_MAKE=yes $(BINDIR)/suif-recursive-make $@ 2> \
191                         $(LOGFILE) ; exit 0
192 endif
193                 @if $(MAKE) --no-print-directory SUB_PACKAGES= \
194                                 install-keep-src 1>> $(LOGFILE) 2>&1; then \
195                         echo $(PACKAGE_FULL_NAME)" ... OK"; \
196                 else \
197                         echo $(PACKAGE_FULL_NAME)" ... FAILED -- see" \
198                                 $(PACKAGE_FULL_NAME)/$(LOGFILE); \
199                 fi
200                 @$(MAKE) --no-print-directory install-verdata 1>> $(LOGFILE) \
201                         2>&1
203 install:
204                 @$(MAKE) --no-print-directory install-ver
205                 @$(MAKE) --no-print-directory reinstall
207 install-keep-src:
208                 @$(MAKE) --no-print-directory install-ver
209                 @$(MAKE) --no-print-directory reinstall-keep-src
211 show-reinstall:
212                 @$(MAKE) --no-print-directory deinstall-verdata 1> $(LOGFILE) \
213                         2>&1
214                 @$(MAKE) --no-print-directory preinstall-check
215                 @$(MAKE) --no-print-directory deinstall-src 1>> $(LOGFILE) 2>&1
216                 @$(MAKE) --no-print-directory install-src-dir 1>> $(LOGFILE) \
217                         2>&1
218 ifdef SUB_PACKAGES
219                 @SILENT_RECURSIVE_MAKE=yes $(BINDIR)/suif-recursive-make $@ 2> \
220                         $(LOGFILE) ; exit 0
221 endif
222                 @if $(MAKE) --no-print-directory SUB_PACKAGES= \
223                                 reinstall-keep-src 1>> $(LOGFILE) 2>&1; then \
224                         echo $(PACKAGE_FULL_NAME)" ... OK"; \
225                 else \
226                         echo $(PACKAGE_FULL_NAME)" ... FAILED -- see" \
227                                 $(PACKAGE_FULL_NAME)/$(LOGFILE); \
228                 fi;
229                 @$(MAKE) --no-print-directory install-verdata 1>> $(LOGFILE) \
230                         2>&1
232 reinstall:
233                 $(MAKE) --no-print-directory real-reinstall ; \
235 reinstall-keep-src:
236                 $(MAKE) --no-print-directory real-reinstall-keep-src
238 show-reinstall-keep-src:
239 ifdef SUB_PACKAGES
240                 @SILENT_RECURSIVE_MAKE=yes $(BINDIR)/suif-recursive-make $@ 2> \
241                         $(LOGFILE) ; exit 0
242 else
243                 @echo > $(LOGFILE)
244 endif
245                 @if $(MAKE) --no-print-directory SUB_PACKAGES= \
246                                 reinstall-keep-src 1>> $(LOGFILE) 2>&1; then \
247                         echo $(PACKAGE_FULL_NAME)" ... OK"; \
248                 else \
249                         echo $(PACKAGE_FULL_NAME)" ... FAILED -- see" \
250                                 $(PACKAGE_FULL_NAME)/$(LOGFILE); \
251                 fi;
253 show-reinstall-bin:
254 ifdef SUB_PACKAGES
255                 @SILENT_RECURSIVE_MAKE=yes $(BINDIR)/suif-recursive-make $@ 2> \
256                         $(LOGFILE) ; exit 0
257 endif
258                 @if $(MAKE) --no-print-directory SUB_PACKAGES= reinstall-bin \
259                                 1> $(LOGFILE) 2>&1; then \
260                         echo $(PACKAGE_FULL_NAME)" ... OK"; \
261                 else \
262                         echo $(PACKAGE_FULL_NAME)" ... FAILED -- see" \
263                                 $(PACKAGE_FULL_NAME)/$(LOGFILE); \
264                 fi;
266 reinstall-bin:
267                 $(MAKE) --no-print-directory install-bin-all
269 real-reinstall:
270                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-verdata
271                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) preinstall-check
272                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-src
273                 @$(MAKE) --no-print-directory real-reinstall-keep-src
274                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-verdata
276 real-reinstall-keep-src:
277                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-bin
278                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-src-dir
279                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-local-src
280                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-local-incl
281                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-local-info
282 ifdef SUB_PACKAGES
283                 $(BINDIR)/suif-recursive-make real-reinstall-keep-src
284 endif
286 deinstall:
287                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-verdata
288                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-src
289                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-bin
290                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-local-incl
291                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-local-info
292 ifdef SUB_PACKAGES
293                 $(BINDIR)/suif-recursive-make deinstall
294 endif
296 install-local-ver:
298 install-ver:    install-local-ver
299                 @if test ! ""$(SUPER_PACKAGES_PATH) = "" ; then \
300                         owner_package=`echo $(SUPER_PACKAGES_PATH) | \
301                                 sed 's/.*\///'`; \
302                         : ; \
303                 else : ; \
304                 fi
306 install-prog:   $(TARGET_EXECUTABLES) install-bin-base
307                 for target in $(TARGET_EXECUTABLES); do \
308                         if test -f $$target$(EXEEXT); then \
309                                 $(BINDIR)/install-sh -C -m 775 $$target$(EXEEXT) $(BINDIR) ; \
310                         else \
311                                 $(BINDIR)/install-sh -C -m 775 $$target $(BINDIR) ; \
312                         fi; \
313                 done
315 install-scripts:        $(SCRIPTS) install-bin-base
316 ifdef BUILD_SCRIPTS
317                 for target in $(SCRIPTS); do \
318                         $(BINDIR)/install-sh -C -m 775 $$target $(SCRIPTDIR) ; \
319                 done
320 endif
322 install-lib:    $(LIBNAME_SET) install-bin-base
323 ifeq ($(INSTALL_SHARED_LIB),true)
324                 $(BINDIR)/install-sh -C -m 444 $(SHARED_LIBNAME) $(SODIR)
325 endif
326 ifeq ($(INSTALL_STATIC_LIB),true)
327                 $(BINDIR)/install-sh -C -m 444 $(STATIC_LIBNAME) $(LIBDIR)
328 ifeq ($(MACHINE),sparc-sun-sunos4)
329                 ranlib $(LIBDIR)/$(STATIC_LIBNAME)
330 endif
331 endif
332                 rm -f $(AUTOINITDIR)/$(TARGET)
333 ifdef AUTOINITLIB
334                 touch $(AUTOINITDIR)/$(TARGET)
335 endif
337 install-bin-base: $(ALLTCLSRCS)
338 ifdef BUILD_TCL
339 ifneq (,$(strip $(ALLTCLSRCS)))
340                 for target in $(ALLTCLSRCS); do \
341                         $(BINDIR)/install-sh -C -m 444 $$target $(TCLDIR) ; \
342                 done
343 endif
344 endif
346 deinstall-bin:
347 ifneq (,$(strip $(TARGET_EXECUTABLES)))
348                 for target in $(TARGET_EXECUTABLES); do \
349                         rm -f $(BINDIR)/$$target ; \
350                 done
351 endif
352                 rm -f $(LIBDIR)/$(STATIC_LIBNAME)
353                 rm -f $(SODIR)/$(SHARED_LIBNAME)
354 ifneq (,$(TARGET))
355                 rm -f $(AUTOINITDIR)/$(TARGET)
356 endif
358 install-bin-recursive:
359 ifdef SUB_PACKAGES
360                 $(BINDIR)/suif-recursive-make install-bin-all
361 endif
363 install-bin-all:
364                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-bin
365                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-bin-recursive
367 install-src:
368                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) deinstall-src
369                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-src-dir
370                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-local-src
371                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-recursive-src
373 deinstall-src:
375 install-src-dir:
377 install-local-src:      $(REALSRCS)
379 install-recursive-src:
380 ifdef SUB_PACKAGES
381                 $(BINDIR)/suif-recursive-make install-src
382 endif
384 install-incl:
385                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-local-incl
386                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-recursive-incl
388 install-local-incl:     $(EXPORTS)
389 ifdef EXPORTS
390 ifneq (,$(strip $(ALLHEADERS)))
391                 if test ! -d $(INCLDIR)/$(PACKAGE_NAME) ; then \
392                         mkdir $(INCLDIR)/$(PACKAGE_NAME) ; \
393                 fi ; \
394                 chmod 775 $(INCLDIR)/$(PACKAGE_NAME) ; \
395                 $(BINDIR)/install-sh -C -m 444 $(ALLHEADERS) $(INCLDIR)/$(PACKAGE_NAME)
396 else
397                 rm -rf $(INCLDIR)/$(PACKAGE_NAME)
398                 mkdir $(INCLDIR)/$(PACKAGE_NAME)
399                 chmod 775 $(INCLDIR)/$(PACKAGE_NAME)
400 endif
401                 for i in $(EXPORTS) ; do \
402                         $(BINDIR)/install-sh -C -m 444 $$i $(INCLDIR) ; \
403                 done
404 endif
406 deinstall-local-incl:
407 ifdef EXPORTS
408                 rm -rf $(INCLDIR)/$(PACKAGE_NAME)
409                 for i in $(EXPORTS) ; do \
410                         rm -f $(INCLDIR)/$$i ; \
411                 done
412 endif
414 install-recursive-incl:
415 ifdef SUB_PACKAGES
416                 $(BINDIR)/suif-recursive-make install-incl
417 endif
419 install-info:
420                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-local-info
421                 @$(MAKE) --no-print-directory $(MAKEPARFLAGS) install-recursive-info
423 install-local-info:     $(STAMP_DOC_TARGETS) $(MANPAGES) $(ALLGIFSRCS)
424 ifdef INFOS
425 ifdef BUILD_INFO
426                 for i in $(INFOS) ; do \
427                     for j in $$i.info* ; do \
428                         $(BINDIR)/install-sh -C -m 444 $$j $(INFODIR) ; \
429                     done ; \
430                 done
431 endif
432 ifdef BUILD_PS
433                 for i in $(INFOS) ; do \
434                         $(BINDIR)/install-sh -C -m 444 $$i.ps $(DOCDIR) ; \
435                 done
436 endif
437 ifdef BUILD_HTML
438 ifneq (,$(strip $(ALLGIFSRCS)))
439                 for i in $(ALLGIFSRCS) ; do \
440                         $(BINDIR)/install-sh -C -m 444 $$i $(HTMLDIR) ; \
441                 done
442 endif
443                 for i in $(INFOS) ; do \
444                     for j in $$i*.html ; do \
445                         $(BINDIR)/install-sh -C -m 444 $$j $(HTMLDIR) ; \
446                     done ; \
447                 done
448 endif
449 endif
450 ifdef MANPAGES
451 ifdef BUILD_MAN
452                 for i in $(MANPAGES) ; do \
453                         MANSUFFIX=`echo $$i | sed 's/.*\.//'` ; \
454                         MANSUFDIR=$(MANDIR)/man$$MANSUFFIX ; \
455                         if test ! -d $$MANSUFDIR; then \
456                                 mkdir $$MANSUFDIR; \
457                                 chmod 775 $$MANSUFDIR; \
458                         else : ; \
459                         fi ; \
460                         $(BINDIR)/install-sh -C -m 444 $$i $$MANSUFDIR ; \
461                 done
462 endif
463 ifdef BUILD_HTML
464                 for i in $(MANPAGES) ; do \
465                         if test ! -f $(HTMLDIR)/man_$$i.html || \
466                                 newer $$i $(HTMLDIR)/man_$$i.html; then \
467                                 rm -f $(HTMLDIR)/man_$$i.html ; \
468                                 nroff -man $$i | rman -n $$i -f HTML -r \
469                                 "man_%s.%s.html" -l "Man page for %s" > \
470                                 $(HTMLDIR)/man_$$i.html ; \
471                         else : ; fi ; \
472                 done
473 endif
474 endif
476 deinstall-local-info:
477 ifdef INFOS
478                 for i in $(INFOS) ; do \
479                         rm -f $(INFODIR)/$$i.info* ; \
480                 done
481                 for i in $(INFOS) ; do \
482                         rm -f $(DOCDIR)/$$i.ps ; \
483                 done
484                 for i in $(ALLGIFSRCS) ; do \
485                         rm -f $(HTMLDIR)/$$i ; \
486                 done
487                 for i in $(INFOS) ; do \
488                         rm -f $(HTMLDIR)/$$i*.html ; \
489                 done
490 endif
491 ifdef MANPAGES
492                 for i in $(MANPAGES) ; do \
493                         rm -f $(MANDIR)/$$i ; \
494                 done
495                 for i in $(MANPAGES) ; do \
496                         rm -f $(HTMLDIR)/man_$$i.html ; \
497                 done
498 endif
500 install-recursive-info:
501 ifdef SUB_PACKAGES
502                 $(BINDIR)/suif-recursive-make install-info
503 endif
505 preinstall-check: $(ALLVERDATAFILE)
506 ifneq (,$(strip $(ALLVERDATAFILE)))
507                 @if test -f $(BINDIR)/ververver ; then \
508                         $(BINDIR)/ververver -check $(PACKAGE_NAME) $(ALLVERDATAFILE) \
509                                 $(VERDATADIR) ; \
510                 else \
511                         : ; \
512                 fi
513 else
514                 @echo > /dev/null
515 endif
517 install-verdata:
518 ifneq (,$(strip $(ALLVERDATAFILE)))
519                 @$(BINDIR)/ververver -install $(PACKAGE_NAME) $(ALLVERDATAFILE) \
520                         $(VERDATADIR)
521 endif
523 deinstall-verdata:
524 ifneq (,$(strip $(ALLVERDATAFILE)))
525                 @if test -f $(BINDIR)/ververver ; then \
526                         $(BINDIR)/ververver -deinstall $(PACKAGE_NAME) \
527                                 $(ALLVERDATAFILE) $(VERDATADIR) ; \
528                 else \
529                         : ; \
530                 fi
531 endif
533 source:         $(REALSRCS)
535 objects:        $(OBJS)
537 clean:          clean-src
538                 rm -f core $(OBJS) $(TARGET) $(STATIC_LIBNAME)
539                 rm -f $(SHARED_LIBNAME) $(ALLTMPSRCS)
540                 rm -f Makefile.deps
541                 rm -f versions.ver
542                 rm -f prog_ver.cc prog_ver.o
543                 rm -f lib_ver.cc lib_ver.o
544                 rm -f start_sty.cc start_sty.o
545                 rm -f register_lib.cc register_lib.o
546                 rm -f so_locations
547                 rm -rf ii_files
548                 rm -rf Templates.DB
549                 rm -f *.rpo
550                 rm -f stamp-library-closure
551 ifneq ($(PACKAGE_NAME),suif1)
552                 rm -f suif_logo.epsf
553 endif
554 ifdef INFOS
555                 for i in $(INFOS) ; do \
556                         rm -f $$i.cp $$i.fn $$i.ky $$i.pg $$i.tp $$i.vr ; \
557                         rm -f $$i.cps $$i.fns $$i.kys $$i.pgs $$i.tps ; \
558                         rm -f $$i.vrs $$i.toc $$i.info* $$i*.html ; \
559                         rm -f $$i.dvi $$i.ps $$i.aux $$i.log ; \
560                 done
561 endif
562                 rm -f stamp-info
563                 rm -f stamp-ps
564                 rm -f stamp-html
565                 rm -f stamp-depend
566 ifdef SUB_PACKAGES
567                 $(BINDIR)/suif-recursive-make clean
568 endif
571 # NOTE: I had to separate out the components of REALSRCS here because
572 # otherwise some libraries, such as libsuif, cause lines that are too
573 # long and the attempted ``make clean'' fails.
575 clean-src:
577 clean-rcs-links:
578 ifdef SUB_PACKAGES
579                 $(BINDIR)/suif-recursive-make clean-rcs-links
580 endif
582 stamp-depend:   Makefile $(ALLCSRCS) $(ALLCXXSRCS) $(ALLHEADERS)
583                 @touch stamp-depend
585 depend:         Makefile.deps
587 Makefile.deps:  Makefile stamp-depend
588                 @rm -f Makefile.deps
589                 @echo > Makefile.deps
590 ifneq ($(strip $(ALLCXXSRCS)),)
591                 @echo '# Dependencies for C++ files' >> Makefile.deps
592                 @echo >> Makefile.deps
593                 $(CXX) $(DEPSFLAG) $(CXXFLAGS) $(ALLCXXSRCS) >> Makefile.deps
594                 @echo >> Makefile.deps
595 endif
596 ifneq ($(strip $(ALLCSRCS)),)
597                 @echo '# Dependencies for C files' >> Makefile.deps
598                 @echo >> Makefile.deps
599                 $(CC) $(DEPSFLAG) $(CFLAGS) $(ALLCSRCS) >> Makefile.deps
600                 @echo >> Makefile.deps
601 endif
603 sub-packages:
604                 @echo $(SUB_PACKAGES)
606 recursive:
607 ifdef SUB_PACKAGES
608                 $(BINDIR)/suif-recursive-make
609 endif
611 ifneq ($(PACKAGE_NAME),suif1)
612 suif_logo.epsf:
613                 rm -f suif_logo.epsf
614                 ln -s $(INCLDIR)/suif_logo.epsf .
615 endif
617 build-dir: source
618                 @REALSRCS='$(REALSRCS)' build_dir_setup_links
620 directory-structure:
621 ifdef SUB_PACKAGES
622                 $(BINDIR)/suif-recursive-make directory-structure
623 endif