aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-03-01 18:59:09 +0100
committerAlessandro Iezzi <aiezzi@alessandroiezzi.it>2023-03-01 18:59:09 +0100
commit89f4c3aadd95a267403d47ac30b3d237cfb5bd5a (patch)
tree25259c2b71b20cb561b239ef8347e2009d3ef2fd
parent0873e1f108c1e3122a854778df73c221b9609cf9 (diff)
downloadacme-scripts-89f4c3aadd95a267403d47ac30b3d237cfb5bd5a.tar.gz
acme-scripts-89f4c3aadd95a267403d47ac30b3d237cfb5bd5a.zip
Clean Makefile
-rw-r--r--Makefile22
1 files changed, 9 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 644a361..20e90a7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,23 +1,19 @@
INSTALL_DIR=~/bin/acme
-BUILD_DIR=build
-.SUFFIXES: .sh .o
+SRC != ls -1 *.sh
+OBJ = ${SRC:.sh=}
+TGT = ${OBJ:%=${INSTALL_DIR}/%}
-SOURCES!=ls *.sh
-OBJECTS=${SOURCES:.sh=}
-D!=echo $(OBJECTS) | sed "s|^|$(INSTALL_DIR)/|g" | sed "s| | $(INSTALL_DIR)/|g"
+all: ${OBJ}
.sh:
- chmod +x ${.IMPSRC}
- ln -s ${.CURDIR}/${.IMPSRC} ${.TARGET}
-
-build: $(OBJECTS)
+ ln -sf `realpath $<` $@
clean:
- find ${.CURDIR} -type l -exec rm -f '{}' \;
+ rm -f ${OBJ}
-install: build
- find ${.CURDIR} -type l -exec cp -R -P '{}' ${INSTALL_DIR}/ \;
+install: ${OBJ}
+ mv ${OBJ} ${INSTALL_DIR}/
uninstall:
- rm -f $(D)
+ rm -f ${TGT}