home *** CD-ROM | disk | FTP | other *** search
Makefile | 1993-09-02 | 1.9 KB | 71 lines |
- #
- # Makefile for /NextDeveloper/Examples/IndexingKit
- #
- # You can copy all of the examples to your home directory by
- # cd'ing in a Terminal to this directory and typing
- #
- # make installsrc SRCROOT=$HOME/ixkitexamples
- #
- # where $HOME is assumed to expand to your home directory.
- # Then you can make them all by cd'ing to ~/ixkitexamples and typing
- #
- # make all
-
- DSTDIR = /NextDeveloper/Examples/IndexingKit
- SRCDIR =
-
- #
- # We build when installing to make sure they build
- #
-
- MAKEEXAMPLES = BlockSizer Ledger
- OTHEREXAMPLES = QueryFieldEditor
-
- EXAMPLES = $(MAKEEXAMPLES)
-
- OTHERFILES = Makefile README.rtf
- OTHERSRCS = $(OTHERFILES)
-
- all:
- @for i in $(MAKEEXAMPLES) ; \
- do ( cd $$i; echo "making $$i" ; $(MAKE) $(MAKE_FLAGS) $@ || exit $$? ) ; \
- done
-
- installhdrs:
-
- clean:
- @for i in $(MAKEEXAMPLES) ; \
- do ( cd $$i; echo "cleaning $$i" ; $(MAKE) $(MAKE_FLAGS) $@ || exit $$? ) ; \
- done
-
- install: $(DSTROOT) $(DSTROOT)$(DSTDIR)
- @for i in $(MAKEEXAMPLES) ; \
- do ( cd $$i; \
- echo "******************** install $$i ************************"; \
- $(MAKE) $(MAKE_FLAGS) installsrc SRCROOT=$(DSTROOT)$(DSTDIR)/$$i || exit $$?; \
- echo "******************** testing $$i ************************"; \
- $(MAKE) $(MAKE_FLAGS) installsrc SRCROOT=$(OBJROOT)$(DSTDIR)/$$i || exit $$?; \
- cd $(OBJROOT)$(DSTDIR)/$$i ; $(MAKE) $(MAKE_FLAGS) || exit $$? ) ; \
- done
- tar cf - $(OTHERFILES) $(OTHEREXAMPLES) | ( cd $(DSTROOT)$(DSTDIR) ; tar xvf - )
- -/etc/chown -R root.wheel $(DSTROOT)$(DSTDIR)
-
- installsrc: $(SRCROOT)
- rm -rf $(SRCROOT)$(SRCDIR)
- mkdirs $(SRCROOT)$(SRCDIR)
- tar cf - $(OTHERSRCS) $(OTHEREXAMPLES) | ( cd $(SRCROOT)$(SRCDIR) ; tar xvf - )
- for i in $(MAKEEXAMPLES) ; \
- do ( cd $$i; $(MAKE) $(MAKE_FLAGS) installsrc SRCROOT=$(SRCROOT)$(SRCDIR)/$$i ) ; \
- done
-
- DSTROOT SRCROOT:
- @if [ -n "$($@)" ]; \
- then \
- exit 0; \
- else \
- echo Must define $@; \
- exit 1; \
- fi
-
- $(DSTROOT)$(DSTDIR) $(SRCROOT)$(SRCDIR):; mkdirs $@
-