diff options
| author | Marc Vertes <mvertes@free.fr> | 2021-02-21 16:22:11 +0100 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2021-02-21 16:22:11 +0100 |
| commit | 5bcac09370adfb26c25bdf98d371bbcc730f86c3 (patch) | |
| tree | 6a07f46b25e974aa5c2c39fa1bcb8f7c425312ec | |
| parent | 68017f46742241cd6842422b7c009e59d65f73a4 (diff) | |
update
| -rw-r--r-- | build.mk | 39 | ||||
| -rw-r--r-- | graphviz/Makefile | 4 | ||||
| -rw-r--r-- | hello/Makefile | 4 |
3 files changed, 28 insertions, 19 deletions
@@ -1,19 +1,28 @@ # Rules to fetch, build and install external source packages. # # TODO: -# - default commands # - rules for pre-req dependencies # - rules to build and maintain patches +# - rules to run tests before installing +# - build and run in chroot # -ARC ?= $(notdir $(URL)) -DIR ?= $(basename $(basename $(ARC))) +arc ?= $(notdir $(url)) +dir ?= $(basename $(basename $(arc))) +configure_cmd ?= ./configure +build_cmd ?= make +install_cmd ?= sudo make install +uninstall_cmd ?= sudo make uninstall clean: - rm -rf .install .build .configure .fetch .extract $(DIR) + rm -rf .install .build .configure .extract .fetch $(dir) debug: - @echo arc: $(ARC) - @echo dir: $(DIR) + @echo arc = $(arc) + @echo dir = $(dir) + +uninstall: .install + cd $(dir) && $(uninstall_cmd) + rm .install install: .install build: .build @@ -21,26 +30,22 @@ configure: .configure extract: .extract fetch: .fetch -uninstall: .install - cd $(DIR) && sudo make uninstall - rm .install - .install: .build - cd $(DIR) && sudo make install - touch $@ + cd $(dir) && $(install_cmd) + @touch $@ .build: .configure - cd $(DIR) && make - touch $@ + cd $(dir) && $(build_cmd) + @touch $@ .configure: .extract - cd $(DIR) && ./configure $(CONFIGURE_FLAGS) + cd $(dir) && $(configure_cmd) $(configure_flags) @touch $@ .extract: .fetch - gunzip < $(ARC) | tar xf - + gunzip < $(arc) | tar xf - @touch $@ .fetch: - curl -L $(URL) -o $(ARC) + curl -L $(url) -o $(arc) @touch $@ diff --git a/graphviz/Makefile b/graphviz/Makefile index 633d9ed..57fbe5b 100644 --- a/graphviz/Makefile +++ b/graphviz/Makefile @@ -1,4 +1,4 @@ -URL = https://gitlab.com/graphviz/graphviz/-/package_files/7097035/download -ARC = graphviz-2.46.1.tar.gz +url = https://gitlab.com/graphviz/graphviz/-/package_files/7097035/download +arc = graphviz-2.46.1.tar.gz include ../build.mk diff --git a/hello/Makefile b/hello/Makefile new file mode 100644 index 0000000..f6c3fa6 --- /dev/null +++ b/hello/Makefile @@ -0,0 +1,4 @@ +url = http://mvertes.free.fr/download/hello-0.1.tar.gz +configure_cmd = : + +include ../build.mk |
