[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Make makefile working even with distro packaging systems.
From: |
Matěj Cepl |
Subject: |
[PATCH] Make makefile working even with distro packaging systems. |
Date: |
Sun, 19 May 2024 01:01:24 +0200 |
Signed-off-by: Matěj Cepl <mcepl@cepl.eu>
---
makefile | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/makefile b/makefile
index 9e4edd0..1c3dfa7 100644
--- a/makefile
+++ b/makefile
@@ -355,39 +355,43 @@ install: lout prg2lout
chmod 755 $(BINDIR)/prg2lout
@echo ""
@echo "(b) Installing library files into LOUTLIBDIR $(LOUTLIBDIR)"
- mkdir $(LOUTLIBDIR)
+ mkdir -p $(LOUTLIBDIR)
chmod 755 $(LOUTLIBDIR)
@echo ""
- mkdir $(LOUTLIBDIR)/$(LIBINCL)
+ mkdir -p $(LOUTLIBDIR)/$(LIBINCL)
chmod 755 $(LOUTLIBDIR)/$(LIBINCL)
cp include/* $(LOUTLIBDIR)/$(LIBINCL)
chmod 644 $(LOUTLIBDIR)/$(LIBINCL)/*
@echo ""
- mkdir $(LOUTLIBDIR)/$(LIBDATA)
+ mkdir -p $(LOUTLIBDIR)/$(LIBDATA)
chmod 755 $(LOUTLIBDIR)/$(LIBDATA)
cp data/* $(LOUTLIBDIR)/$(LIBDATA)
chmod 644 $(LOUTLIBDIR)/$(LIBDATA)/*
@echo ""
- mkdir $(LOUTLIBDIR)/$(LIBHYPH)
+ mkdir -p $(LOUTLIBDIR)/$(LIBHYPH)
chmod 755 $(LOUTLIBDIR)/$(LIBHYPH)
cp hyph/* $(LOUTLIBDIR)/$(LIBHYPH)
chmod 644 $(LOUTLIBDIR)/$(LIBHYPH)/*
@echo ""
- mkdir $(LOUTLIBDIR)/$(LIBFONT)
+ mkdir -p $(LOUTLIBDIR)/$(LIBFONT)
chmod 755 $(LOUTLIBDIR)/$(LIBFONT)
cp font/* $(LOUTLIBDIR)/$(LIBFONT)
chmod 644 $(LOUTLIBDIR)/$(LIBFONT)/*
@echo ""
- mkdir $(LOUTLIBDIR)/$(LIBMAPS)
+ mkdir -p $(LOUTLIBDIR)/$(LIBMAPS)
chmod 755 $(LOUTLIBDIR)/$(LIBMAPS)
cp maps/* $(LOUTLIBDIR)/$(LIBMAPS)
chmod 644 $(LOUTLIBDIR)/$(LIBMAPS)/*
@echo ""
- mkdir $(LOUTLIBDIR)/$(LIBLOCA)
+ mkdir -p $(LOUTLIBDIR)/$(LIBLOCA)
chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)
@echo ""
@echo "(c) Initializing run (should be silent, no errors expected)"
- $(BINDIR)/lout -x -s $(LOUTLIBDIR)/$(LIBINCL)/init
+ $(BINDIR)/lout \
+ -D $(LOUTLIBDIR)/$(LIBDATA) \
+ -I $(LOUTLIBDIR)/$(LIBINCL) \
+ -H $(LOUTLIBDIR)/$(LIBHYPH) \
+ -x -s $(LOUTLIBDIR)/$(LIBINCL)/init
@echo ""
@echo "(d) Changing mode of files just created by initializing run"
chmod 644 $(LOUTLIBDIR)/$(LIBDATA)/*
@@ -396,6 +400,7 @@ install: lout prg2lout
installman:
@echo ""
@echo "Installing manual entries into MANDIR $(MANDIR)"
+ mkdir -p $(MANDIR)
sed -e "s@<BINDIR>@$(BINDIR)@" -e "s@<LIBDIR>@$(LOUTLIBDIR)@" \
-e "s@<LOUTDOCDIR>@$(LOUTDOCDIR)@" -e "s@<MANDIR>@$(MANDIR)@"
\
man/lout.1 > $(MANDIR)/lout.1
@@ -406,19 +411,18 @@ installman:
installdoc:
@echo ""
@echo "Creating LOUTDOCDIR $(LOUTDOCDIR) and copying documentation into
it"
+ mkdir -p $(LOUTDOCDIR)
$(RCOPY) doc/* $(LOUTDOCDIR)
- chmod 755 $(LOUTDOCDIR)
- chmod 755 $(LOUTDOCDIR)/*
- chmod 644 $(LOUTDOCDIR)/*/*
+ chmod -Rf a+rX,g-w,o-w $(LOUTDOCDIR)
allinstall: install installman installdoc
installfr:
@echo ""
@echo "Putting French error messages into
$(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)"
- mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)
+ mkdir -p $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)
chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)
- mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES
+ mkdir -p $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES
chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES
cp locale/msgs.fr
$(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES/msgs.$(LOC_FR)
gencat $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_FR)/LC_MESSAGES/errors.$(LOC_FR)
\
@@ -428,9 +432,9 @@ installfr:
installde:
@echo ""
@echo "Putting German error messages into
$(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)"
- mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)
+ mkdir -p $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)
chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)
- mkdir $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES
+ mkdir -p $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES
chmod 755 $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES
cp locale/msgs.de
$(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES/msgs.$(LOC_DE)
gencat $(LOUTLIBDIR)/$(LIBLOCA)/$(LOC_DE)/LC_MESSAGES/errors.$(LOC_DE)
\
--
2.45.1
- [PATCH] Make makefile working even with distro packaging systems.,
Matěj Cepl <=