summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorOliver Tappe2007-05-01 20:35:26 +0200
committerOliver Tappe2007-05-01 20:35:26 +0200
commitb5cc2d6ad4b2c4cca07f4ec61ece3b9be52b2a96 (patch)
tree3c9dcf4b13261a1751b3df6c79d405bd89e06855 /Makefile
parent* improved mechanism used for locating the required kernel modules such that ... (diff)
downloadcore-b5cc2d6ad4b2c4cca07f4ec61ece3b9be52b2a96.tar.gz
core-b5cc2d6ad4b2c4cca07f4ec61ece3b9be52b2a96.tar.xz
core-b5cc2d6ad4b2c4cca07f4ec61ece3b9be52b2a96.zip
* some cleanup, added support for tracing installation, triggered by TRACE_INSTALLATION=1
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@973 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile133
1 files changed, 63 insertions, 70 deletions
diff --git a/Makefile b/Makefile
index 78f17237..dac09394 100644
--- a/Makefile
+++ b/Makefile
@@ -104,7 +104,8 @@ release-tarball:
make tarball
install:
- @echo "Checking installation requirements..."; \
+ @if test "${TRACE_INSTALLATION}" = "1"; then set -x; fi; \
+ echo "Checking installation requirements..."; \
echo $$(date) >${SLX_INSTALL_LOG}; \
if ! perl -e '$$x=2' 2>>${SLX_INSTALL_LOG} ; then \
echo " Perl is required, please install it."; \
@@ -137,9 +138,9 @@ supported."; \
exit 1; \
else \
echo $${DEFAULT_DB_TYPE} >DEFAULT-DB-TYPE; \
- fi;
- @echo "Installing OpenSLX project files"
- @mkdir -p $(DESTDIR)$(SLX_CONFIG_PATH) \
+ fi; \
+ echo "Installing OpenSLX project files"; \
+ mkdir -p $(DESTDIR)$(SLX_CONFIG_PATH) \
-p $(DESTDIR)$(SLX_BASE_PATH)/lib \
-p $(DESTDIR)$(SLX_BIN_PATH) \
-p $(DESTDIR)$(SLX_SHARE_PATH)/templates \
@@ -152,69 +153,61 @@ supported."; \
-p $(DESTDIR)$(SLX_PRIVATE_PATH)/stage1 \
-p $(DESTDIR)$(SLX_PUBLIC_PATH) \
-p $(DESTDIR)$(SLX_TFTPBOOT_PATH) \
- -p $(DESTDIR)$(SLX_SHARE_PATH)/themes
- @for dir in $(USR_BIN_PATH); do \
+ -p $(DESTDIR)$(SLX_SHARE_PATH)/themes; \
+ for dir in $(USR_BIN_PATH); do \
test -d $(DESTDIR)$${dir} || \
mkdir -p $(DESTDIR)$${dir}; \
- done
- @# copy license
- @cp COPYING $(DESTDIR)$(SLX_BASE_PATH)/
- @# copy initramfs generator scripts (and inject SLX_CONFIG_PATH on the way):
- @cp ./initramfs/mkdxsinitrd $(DESTDIR)$(SLX_BIN_PATH)/
-#@cp ./initramfs/slxmkramfs $(DESTDIR)$(SLX_BIN_PATH)/
- @sed -e "s,@@@SLX_CONFIG_PATH@@@,$(SLX_CONFIG_PATH)," \
- -i $(DESTDIR)$(SLX_BIN_PATH)/mkdxsinitrd
-#@sed -e "s,@@@SLX_CONFIG_PATH@@@,$(SLX_CONFIG_PATH)," \
-# -i $(DESTDIR)$(SLX_BIN_PATH)/slxmkramfs
-
- @# copy all PERL-scripts and their required modules:
- @cp bin/slx* $(DESTDIR)$(SLX_BIN_PATH)/
- @cp config-db/slx* $(DESTDIR)$(SLX_BIN_PATH)/
- @cp installer/slx* $(DESTDIR)$(SLX_BIN_PATH)/
- @tar --exclude=.svn -cp -C lib OpenSLX distro-info | \
- tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib
- @tar --exclude=.svn -cp -C config-db OpenSLX | \
- tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib
- @tar --exclude=.svn -cp -C installer OpenSLX | \
- tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib
-
- @# link all binaries & scripts into user-path:
- @ln -sf $(SLX_BIN_PATH)/slx* $(DESTDIR)$(USR_BIN_PATH)/
- @ln -sf $(SLX_BIN_PATH)/mkdxsinitrd $(DESTDIR)$(USR_BIN_PATH)/
-
- @# copy shareable data:
- @cd initramfs/initrd-stuff; tar --exclude=.svn -cp * | \
- tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH)/initramfs; cd ../..
- @tar --exclude=.svn -cp -C initramfs distro-specs | \
- tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH)
- @cp -p config-db/PXE-template.example \
- $(DESTDIR)$(SLX_CONFIG_PATH)/
- @cp -a installer/default_files/machine-setup.default \
- $(DESTDIR)$(SLX_SHARE_PATH)/templates/
- @tar --exclude=.svn -cp -C installer/default_files tftpboot | \
- tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH)
- @cd theming; tar --exclude=.svn -cp * | \
- tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH)/themes; cd ..
- @cp -pP tools/busybox{,.links,.x86_64,.i586} \
- $(DESTDIR)$(SLX_SHARE_PATH)/busybox/
- @cp -p tools/mksquashfs $(DESTDIR)$(SLX_SHARE_PATH)/squashfs/
-
- @# create pre-/postinit scripts for us in initramfs:
- @echo -e "#!/bin/sh\n#\n# This script allows the local admin to \
+ done; \
+ # copy license \
+ cp COPYING $(DESTDIR)$(SLX_BASE_PATH)/; \
+ # copy initramfs generator scripts (and inject SLX_CONFIG_PATH on the way): \
+ cp ./initramfs/mkdxsinitrd $(DESTDIR)$(SLX_BIN_PATH)/; \
+ sed -e "s,@@@SLX_CONFIG_PATH@@@,$(SLX_CONFIG_PATH)," \
+ -i $(DESTDIR)$(SLX_BIN_PATH)/mkdxsinitrd; \
+ # copy all PERL-scripts and their required modules: \
+ cp bin/slx* $(DESTDIR)$(SLX_BIN_PATH)/; \
+ cp config-db/slx* $(DESTDIR)$(SLX_BIN_PATH)/; \
+ cp installer/slx* $(DESTDIR)$(SLX_BIN_PATH)/; \
+ tar --exclude=.svn -cp -C lib OpenSLX distro-info | \
+ tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
+ tar --exclude=.svn -cp -C config-db OpenSLX | \
+ tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
+ tar --exclude=.svn -cp -C installer OpenSLX | \
+ tar -xp -C $(DESTDIR)$(SLX_BASE_PATH)/lib; \
+ # link all binaries & scripts into user-path: \
+ ln -sf $(SLX_BIN_PATH)/slx* $(DESTDIR)$(USR_BIN_PATH)/; \
+ ln -sf $(SLX_BIN_PATH)/mkdxsinitrd $(DESTDIR)$(USR_BIN_PATH)/; \
+ # copy shareable data: \
+ cd initramfs/initrd-stuff; tar --exclude=.svn -cp * | \
+ tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH)/initramfs; cd ../..; \
+ tar --exclude=.svn -cp -C initramfs distro-specs | \
+ tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH); \
+ cp -p config-db/PXE-template.example \
+ $(DESTDIR)$(SLX_CONFIG_PATH)/; \
+ cp -a installer/default_files/machine-setup.default \
+ $(DESTDIR)$(SLX_SHARE_PATH)/templates/; \
+ tar --exclude=.svn -cp -C installer/default_files tftpboot | \
+ tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH); \
+ cd theming; tar --exclude=.svn -cp * | \
+ tar -xp -C $(DESTDIR)$(SLX_SHARE_PATH)/themes; cd ..; \
+ cp -pP tools/busybox{,.links,.x86_64,.i586} \
+ $(DESTDIR)$(SLX_SHARE_PATH)/busybox/; \
+ cp -p tools/mksquashfs $(DESTDIR)$(SLX_SHARE_PATH)/squashfs/; \
+ # create pre-/postinit scripts for us in initramfs: \
+ echo -e "#!/bin/sh\n#\n# This script allows the local admin to \
extend the\n# capabilities at the beginning of the initramfs (stage3). \
The toolset is rather\n# restricted and you have to keep in mind that \
stage4 rootfs has the\n# prefix '/mnt'." \
- > $(DESTDIR)$(SLX_PRIVATE_PATH)/config/default/initramfs/preinit.local
- @echo -e "#!/bin/sh\n#\n# This script allows the local admin to \
+ > $(DESTDIR)$(SLX_PRIVATE_PATH)/config/default/initramfs/preinit.local; \
+ echo -e "#!/bin/sh\n#\n# This script allows the local admin to \
extend the\n# capabilities at the end of the initramfs (stage3). The \
toolset is rather\n# restricted and you have to keep in mind that stage4 \
rootfs has the\n# prefix '/mnt'. But you might use some special slx \
functions via\n# inclusion: '. /etc/functions' ..." \
- > $(DESTDIR)$(SLX_PRIVATE_PATH)/config/default/initramfs/postinit.local
- @chmod u+x $(DESTDIR)$(SLX_PRIVATE_PATH)/config/default/initramfs/*init.local
-
- @# create complete default settings and empty local settings file:
- @echo -e "# default setup for OpenSLX-installation\
+ > $(DESTDIR)$(SLX_PRIVATE_PATH)/config/default/initramfs/postinit.local; \
+ chmod u+x $(DESTDIR)$(SLX_PRIVATE_PATH)/config/default/initramfs/*init.local; \
+ # create complete default settings and empty local settings file: \
+ echo -e "# default setup for OpenSLX-installation\
\nSLX_BASE_PATH=${SLX_BASE_PATH}\
\nSLX_BIN_PATH=${SLX_BIN_PATH}\
\nSLX_CONFIG_PATH=${SLX_CONFIG_PATH}\
@@ -225,13 +218,12 @@ functions via\n# inclusion: '. /etc/functions' ..." \
\nSLX_TEMP_PATH=${SLX_TEMP_PATH}\
\nSLX_TFTPBOOT_PATH=${SLX_TFTPBOOT_PATH}\
\nSLX_VMWARE_PATH=${SLX_VMWARE_PATH}\n" \
- > $(DESTDIR)$(SLX_CONFIG_PATH)/settings.default
- @test -e $(DESTDIR)$(SLX_CONFIG_PATH)/settings.local || \
+ > $(DESTDIR)$(SLX_CONFIG_PATH)/settings.default; \
+ test -e $(DESTDIR)$(SLX_CONFIG_PATH)/settings.local || \
echo -e "# local setup for openslx (overrides settings.default)\n" \
- > $(DESTDIR)$(SLX_CONFIG_PATH)/settings.local
-
- @# create slxversion script:
- @if test -e REVISION; then \
+ > $(DESTDIR)$(SLX_CONFIG_PATH)/settings.local; \
+ # create slxversion script: \
+ if test -e REVISION; then \
. REVISION; \
else \
OPENSLX_VERSION_SVNREV=$$(svnversion .); \
@@ -241,12 +233,13 @@ functions via\n# inclusion: '. /etc/functions' ..." \
OPENSLX_SVN_SNAPSHOT="1"; \
. ./VERSIONS; \
echo -e "#! /bin/sh\n\necho $${OPENSLX_VERSION_STRING}" \
- > $(DESTDIR)${SLX_BIN_PATH}/slxversion
- @chmod a+x $(DESTDIR)${SLX_BIN_PATH}/slxversion
- @ln -sf $(SLX_BIN_PATH)/slxversion $(DESTDIR)$(USR_BIN_PATH)/
- @# set default db-type:
- @DEFAULT_DB_TYPE=$$(cat DEFAULT-DB-TYPE); \
- echo -n ' '; slxsettings --db-type="$${DEFAULT_DB_TYPE}"; \
+ > $(DESTDIR)${SLX_BIN_PATH}/slxversion; \
+ chmod a+x $(DESTDIR)${SLX_BIN_PATH}/slxversion; \
+ ln -sf $(SLX_BIN_PATH)/slxversion $(DESTDIR)$(USR_BIN_PATH)/; \
+ # set default db-type: \
+ DEFAULT_DB_TYPE=$$(cat DEFAULT-DB-TYPE); \
+ rm DEFAULT-DB-TYPE; \
+ echo -n ' '; slxsettings --db-type="$${DEFAULT_DB_TYPE}";
vmware_install:
@# we should read the config file here or better have a separate