summaryrefslogtreecommitdiffstats
path: root/system-build/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-02 10:00:00 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-02-02 10:00:00 +0000
commit32322960234c8ec91e0d42835a3ec5ee63305070 (patch)
tree71d79574de0193778ad6cc6c96dfd4f74fa6bbbb /system-build/Makefile
parentInitial commit. (diff)
downloadopen-infrastructure-system-tools-32322960234c8ec91e0d42835a3ec5ee63305070.tar.xz
open-infrastructure-system-tools-32322960234c8ec91e0d42835a3ec5ee63305070.zip
Adding upstream version 20190202.upstream/20190202
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'system-build/Makefile')
-rw-r--r--system-build/Makefile70
1 files changed, 70 insertions, 0 deletions
diff --git a/system-build/Makefile b/system-build/Makefile
new file mode 100644
index 0000000..71ec0f2
--- /dev/null
+++ b/system-build/Makefile
@@ -0,0 +1,70 @@
+# Makefile
+
+SHELL := sh -e
+
+SCRIPTS = frontend/* functions/* examples/auto/* examples/hooks/* scripts/*.sh scripts/*/* share/bin/* share/hooks/*/*
+
+all: build
+
+test:
+ @echo -n "Checking for syntax errors"
+
+ @for SCRIPT in $(SCRIPTS); \
+ do \
+ sh -n $${SCRIPT}; \
+ echo -n "."; \
+ done
+
+ @echo " done."
+
+ @echo -n "Checking for bashisms"
+
+ @if [ -x /usr/bin/checkbashisms ]; \
+ then \
+ for SCRIPT in $(SCRIPTS); \
+ do \
+ checkbashisms -f -x $${SCRIPT}; \
+ echo -n "."; \
+ done; \
+ else \
+ echo "WARNING: skipping bashism test - you need to install devscripts."; \
+ fi
+
+ @echo " done."
+
+build:
+ @echo "Nothing to build."
+
+install:
+ # Installing shared data
+ mkdir -p $(DESTDIR)/usr/share/live/build
+ cp -r data functions VERSION.txt $(DESTDIR)/usr/share/live/build
+ cp -r share/* $(DESTDIR)/usr/share/live/build
+
+ # Installing executables
+ mkdir -p $(DESTDIR)/usr/bin
+ cp -a frontend/* $(DESTDIR)/usr/bin
+
+ mkdir -p $(DESTDIR)/usr/lib/live
+ cp -a scripts/* $(DESTDIR)/usr/lib/live
+
+ # Installing documentation
+ mkdir -p $(DESTDIR)/usr/share/doc/live-build
+ cp -r LICENSE.txt examples $(DESTDIR)/usr/share/doc/live-build
+
+uninstall:
+ # Uninstalling shared data
+ rm -rf $(DESTDIR)/usr/share/live/build
+ rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/live > /dev/null 2>&1 || true
+
+ # Uninstalling executables
+ rm -f $(DESTDIR)/usr/bin/lb $(DESTDIR)/usr/bin/live-build
+
+ # Uninstalling documentation
+ rm -rf $(DESTDIR)/usr/share/doc/live-build
+
+clean:
+
+distclean:
+
+reinstall: uninstall install