diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 3 | ||||
-rw-r--r-- | src/abslibre-tools/Makefile | 2 | ||||
-rw-r--r-- | src/chroot-tools/.gitignore | 3 | ||||
-rw-r--r-- | src/chroot-tools/Makefile | 34 | ||||
-rw-r--r-- | src/chroot-tools/makechrootpkg.sh.patch (renamed from src/devtools/lib/makechrootpkg.sh.patch) | 0 | ||||
-rw-r--r-- | src/devtools/.gitignore | 1 | ||||
-rw-r--r-- | src/devtools/Makefile | 76 | ||||
-rw-r--r-- | src/devtools/lib/.gitignore | 2 | ||||
-rw-r--r-- | src/fullpkg/Makefile | 2 | ||||
-rw-r--r-- | src/lib/Makefile | 42 | ||||
-rw-r--r-- | src/librefetch/Makefile | 2 | ||||
-rw-r--r-- | src/mips64el-tools/Makefile | 2 | ||||
-rw-r--r-- | src/toru/Makefile | 2 |
13 files changed, 50 insertions, 121 deletions
diff --git a/src/Makefile b/src/Makefile index 35a92a0..63f7782 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,3 +1,2 @@ -libre_execdir=$(bindir) -libre_confdir=$(sysconfdir) +pkgconfdir=$(sysconfdir) include ../common.mk diff --git a/src/abslibre-tools/Makefile b/src/abslibre-tools/Makefile index 271cc5e..2c76089 100644 --- a/src/abslibre-tools/Makefile +++ b/src/abslibre-tools/Makefile @@ -1,3 +1 @@ -libre_execdir=$(bindir) -libre_confdir=$(sysconfdir)/libretools.d include ../../common.mk diff --git a/src/chroot-tools/.gitignore b/src/chroot-tools/.gitignore new file mode 100644 index 0000000..fbb07f7 --- /dev/null +++ b/src/chroot-tools/.gitignore @@ -0,0 +1,3 @@ +makechrootpkg.sh* +!makechrootpkg.sh.patch +archroot*
\ No newline at end of file diff --git a/src/chroot-tools/Makefile b/src/chroot-tools/Makefile index 27030e3..7f6a7ea 100644 --- a/src/chroot-tools/Makefile +++ b/src/chroot-tools/Makefile @@ -1,3 +1,33 @@ -libre_execdir=$(sbindir) -libre_confdir=$(sysconfdir)/libretools.d +# The makechrootpkg flow is: +# $(devtoolsdir)/*.in -> *.sh.in + *.sh.patch -> *.sh.ugly -> *.sh + +copy_files = makechrootpkg.sh.in archroot.in +libs = makechrootpkg.sh +progs = archroot +clean_files = makechrootpkg.sh.ugly* *~ include ../../common.mk + +# Copy ############################################################### + +makechrootpkg.sh.in: %.sh.in: $(devtoolsdir)/%.in + cp $< $@ + +archroot.in: $(devtoolsdir)/mkarchroot.in + cp $< $@ + +# Build ############################################################## + +makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile + @echo "GEN $@" + @cp $*.in $@ + @patch $@ $*.patch || { rm -f -- '$@'; false; } + +makechrootpkg.sh: %: %.ugly Makefile + @echo "GEN $@" + @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; } + $(call indent,$@) || { rm -f -- '$@'; false; } + +archroot: %: %.in Makefile + @echo "GEN $@" + @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; } + @chmod 755 "$@" || { rm -f -- '$@'; false; } diff --git a/src/devtools/lib/makechrootpkg.sh.patch b/src/chroot-tools/makechrootpkg.sh.patch index 505b96a..505b96a 100644 --- a/src/devtools/lib/makechrootpkg.sh.patch +++ b/src/chroot-tools/makechrootpkg.sh.patch diff --git a/src/devtools/.gitignore b/src/devtools/.gitignore index cce9a4c..097fcde 100644 --- a/src/devtools/.gitignore +++ b/src/devtools/.gitignore @@ -1,4 +1,3 @@ * -!*/ !Makefile !.gitignore diff --git a/src/devtools/Makefile b/src/devtools/Makefile index bca9780..6cae230 100644 --- a/src/devtools/Makefile +++ b/src/devtools/Makefile @@ -1,76 +1,16 @@ -topdir = ../.. -include ../../common-devtools.mk +progs = checkpkg find-libdeps finddeps lddd +copy_files = $(addsuffix .in,$(progs)) +install_files = $(DESTDIR)$(bindir)/find-libprovides +include ../../common.mk -###################################################################### - -pkglibexecdir=$(libexecdir)/libretools - -###################################################################### - -copy: \ - archroot.in \ - checkpkg.in \ - find-libdeps.in \ - finddeps.in \ - lddd.in \ - lib/makechrootpkg.sh.in - -archroot.in: $(devtoolsdir)/mkarchroot.in ; cp $< $@ -checkpkg.in: $(devtoolsdir)/checkpkg.in ; cp $< $@ -find-libdeps.in: $(devtoolsdir)/find-libdeps.in ; cp $< $@ -finddeps.in: $(devtoolsdir)/finddeps.in ; cp $< $@ -lddd.in: $(devtoolsdir)/lddd.in ; cp $< $@ -lib/makechrootpkg.sh.in: $(devtoolsdir)/makechrootpkg.in ; cp $< $@ - -###################################################################### - -build: \ - archroot \ - checkpkg \ - find-libdeps \ - finddeps \ - lddd \ - lib/makechrootpkg.sh - -indent = emacs --batch $1 \ - --eval '(setq sh-basic-offset 8)' \ - --eval '(indent-region (point-min) (point-max) nil)' \ - -f save-buffer &>/dev/null +# Build ############################################################## %: %.in Makefile @echo "GEN $@" - @$(edit) <"$<" >"$@" - @chmod 755 "$@" - -lib/makechrootpkg.sh.ugly: %.ugly: %.in %.patch Makefile - @echo "GEN $@" - @cp $*.in $@ - @patch $@ $*.patch - -lib/makechrootpkg.sh: %: %.ugly Makefile - @echo "GEN $@" - @$(edit) <"$<" >"$@" - $(call indent,$@) - -###################################################################### - -install: \ - $(DESTDIR)$(sbindir)/archroot \ - $(DESTDIR)$(bindir)/checkpkg \ - $(DESTDIR)$(bindir)/find-libdeps \ - $(DESTDIR)$(bindir)/find-libprovides \ - $(DESTDIR)$(bindir)/finddeps \ - $(DESTDIR)$(bindir)/lddd \ - $(DESTDIR)$(pkglibexecdir)/makechrootpkg.sh - -$(DESTDIR)$(sbindir)/%: % - install -Dm755 $< $@ - -$(DESTDIR)$(bindir)/%: % - install -Dm755 $< $@ + @$(edit) <"$<" >"$@" || { rm -f -- '$@'; false; } + @chmod 755 "$@" || { rm -f -- '$@'; false; } -$(DESTDIR)$(pkglibexecdir)/%: lib/% - install -Dm644 $< $@ +# Install ############################################################ $(DESTDIR)$(bindir)/find-libprovides: install -d $(@D) diff --git a/src/devtools/lib/.gitignore b/src/devtools/lib/.gitignore deleted file mode 100644 index 9e428f9..0000000 --- a/src/devtools/lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -!*.patch -!*.top diff --git a/src/fullpkg/Makefile b/src/fullpkg/Makefile index 271cc5e..2c76089 100644 --- a/src/fullpkg/Makefile +++ b/src/fullpkg/Makefile @@ -1,3 +1 @@ -libre_execdir=$(bindir) -libre_confdir=$(sysconfdir)/libretools.d include ../../common.mk diff --git a/src/lib/Makefile b/src/lib/Makefile index e0067be..d7b4049 100644 --- a/src/lib/Makefile +++ b/src/lib/Makefile @@ -1,17 +1,12 @@ -include ../../common-devtools.mk - -pkglibexecdir=$(libexecdir)/libretools - -# Copy from devtools ################################################# - -copy: common.sh.in - -common.sh.in: $(devtoolsdir)/lib/common.sh ; cp $< $@ +copy_files = common.sh.in +libexecs = $(filter-out librelib,$(wildcard libre*)) +# include common.sh in libs explicitly, because it might not exist yet +# when the wildcard is performed +libs = $(sort $(wildcard *.sh) common.sh) +include ../../common.mk # Build ############################################################## -build: common.sh - common.sh: %: %.in %.top Makefile @echo "GEN $@" @{ \ @@ -20,28 +15,3 @@ common.sh: %: %.in %.top Makefile echo '_INCLUDE_COMMON_SH=true' && \ cat "$*.in" && \ echo 'fi'; } > "$@" - -# Install ############################################################ - -libexecs = $(filter-out librelib,$(wildcard libre*)) -libs = $(wildcard *.sh) - -# relative path to `/` from $(bindir) -rootdir=$(shell sed -r 's|^/||;s|[^/]+|..|g'<<<$(bindir)) - -install: \ - $(addprefix $(DESTDIR)$(bindir)/,$(libexecs) librelib) \ - $(addprefix $(DESTDIR)$(pkglibexecdir)/,$(libexecs) $(libs)) - -$(DESTDIR)$(bindir)/librelib: librelib - install -Dm755 '$<' '$@' - -$(DESTDIR)$(bindir)/%: % - install -d '$(@D)' - ln -sf '$(rootdir)$(pkglibexecdir)/$(@F)' "$@" - -$(DESTDIR)$(pkglibexecdir)/libre%: libre% - install -Dm755 '$<' '$@' - -$(DESTDIR)$(pkglibexecdir)/%.sh: %.sh - install -Dm644 '$<' '$@' diff --git a/src/librefetch/Makefile b/src/librefetch/Makefile index 271cc5e..2c76089 100644 --- a/src/librefetch/Makefile +++ b/src/librefetch/Makefile @@ -1,3 +1 @@ -libre_execdir=$(bindir) -libre_confdir=$(sysconfdir)/libretools.d include ../../common.mk diff --git a/src/mips64el-tools/Makefile b/src/mips64el-tools/Makefile index 271cc5e..2c76089 100644 --- a/src/mips64el-tools/Makefile +++ b/src/mips64el-tools/Makefile @@ -1,3 +1 @@ -libre_execdir=$(bindir) -libre_confdir=$(sysconfdir)/libretools.d include ../../common.mk diff --git a/src/toru/Makefile b/src/toru/Makefile index 271cc5e..2c76089 100644 --- a/src/toru/Makefile +++ b/src/toru/Makefile @@ -1,3 +1 @@ -libre_execdir=$(bindir) -libre_confdir=$(sysconfdir)/libretools.d include ../../common.mk |