Makefile
branchENGINE-544
changeset 3677 51c4944d6257
parent 3651 f22ed667bb0d
     1.1 --- a/Makefile	Mon May 13 15:05:10 2019 +0200
     1.2 +++ b/Makefile	Tue May 14 18:40:26 2019 +0200
     1.3 @@ -19,47 +19,71 @@
     1.4      $(info ================================================)
     1.5  endif
     1.6  
     1.7 -.PHONY: all sync asn1 build install dbinstall uninstall clean tags test package db
     1.8  
     1.9 -build: asn1
    1.10 -	$(MAKE) -C src
    1.11 +# Build programs, libraries, documentation, etc..
    1.12 +.PHONY: all
    1.13 +all: allnodb db
    1.14  
    1.15 -all: build
    1.16 -	make -C test
    1.17 +# Like `all`, but without building the db
    1.18 +.PHONY: allnodb
    1.19 +allnodb: asn1 src sync
    1.20  
    1.21 -sync:
    1.22 -	$(MAKE) -C sync
    1.23 -
    1.24 -asn1: sync
    1.25 -	$(MAKE) -C asn.1
    1.26 -
    1.27 -install: build
    1.28 -	$(MAKE) -C src install
    1.29 -	$(MAKE) -C asn.1 install
    1.30 -
    1.31 -dbinstall: db
    1.32 +# Install what needs to be installed, copying the files from the package’s tree to system-wide directories.
    1.33 +.PHONY: install
    1.34 +install: all installnodb
    1.35  	$(MAKE) -C db install
    1.36  
    1.37 +# Like `install`, but does install the db
    1.38 +.PHONY: installnodb
    1.39 +installnodb: allnodb
    1.40 +	$(MAKE) -C asn.1 install
    1.41 +	$(MAKE) -C src install
    1.42 +
    1.43 +# The opposite of make install: erase the installed files. (This needs to be run from the same build tree that was installed.)
    1.44 +.PHONY: uninstall
    1.45  uninstall:
    1.46 +	$(MAKE) -C asn.1 uninstall
    1.47 +	$(MAKE) -C db uninstall
    1.48  	$(MAKE) -C src uninstall
    1.49 -	$(MAKE) -C asn.1 uninstall
    1.50  
    1.51 +# Erase from the build tree the files built by make all.
    1.52 +.PHONY: clean
    1.53  clean:
    1.54 +	$(MAKE) -C asn.1 clean
    1.55 +	$(MAKE) -C db clean
    1.56  	$(MAKE) -C src clean
    1.57 +	$(MAKE) -C sync clean
    1.58  	$(MAKE) -C test clean
    1.59 -	$(MAKE) -C db clean
    1.60 -	$(MAKE) -C sync clean
    1.61 -	$(MAKE) -C asn.1 clean
    1.62  
    1.63 +# Run the test suite.
    1.64 +.PHONY: check test
    1.65 +check test: all
    1.66 +	$(MAKE) -C test test
    1.67 +
    1.68 +.PHONY: package
    1.69 +package: clean
    1.70 +	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 "$(HERE_REL)"
    1.71 +
    1.72 +.PHONY: tags
    1.73  tags:
    1.74  	$(MAKE) -C asn.1 tags
    1.75  	$(MAKE) -C src tags
    1.76  
    1.77 -test: all
    1.78 -	$(MAKE) -C test test
    1.79 +# You probably don't want to call any of the the targets below directly
    1.80  
    1.81 -package: clean
    1.82 -	cd .. ; COPYFILE_DISABLE=true tar cjf pEpEngine.tar.bz2 "$(HERE_REL)"
    1.83 +.PHONY: asn1
    1.84 +asn1: sync
    1.85 +	$(MAKE) -C asn.1
    1.86  
    1.87 +.PHONY: db
    1.88  db:
    1.89 -	$(MAKE) -C db db
    1.90 +	$(MAKE) -C db
    1.91 +
    1.92 +.PHONY: src
    1.93 +src: asn1 sync
    1.94 +	$(MAKE) -C src
    1.95 +
    1.96 +.PHONY: sync
    1.97 +sync:
    1.98 +	$(MAKE) -C sync
    1.99 +