2 Commits

Author SHA1 Message Date
Jay Larson
bf59bedc0c Corrected version 2020-08-21 09:02:31 -05:00
Jay Larson
f19b128099 Moved to new slp format 2020-08-21 08:48:07 -05:00
2 changed files with 12 additions and 17 deletions

View File

@@ -8,23 +8,21 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
DEPENDS =
DEPENDS = glibc
ARCH = x86_64
URL = https://www.gnu.org/software/m4/
REPO = dev
BRIEF = macro processor
DESC = GNU M4 is an implementation of the traditional Unix macro processor.
SNAPVER = sr0
SLVER = 2
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SLVER)
MAKE = make
MAKEINST = make install
SNAPHACKS =
include /usr/share/snap/Makefile.snaplinux
include /usr/share/sl/Makefile.snaplinux
$(SRCDIR)/configure: $(ARCHIVE)
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
@@ -42,8 +40,9 @@ $(SRCDIR)/configure: $(ARCHIVE)
@touch $(SRCDIR)/configure
$(SRCDIR)/config.log: $(SRCDIR)/configure
@cd $(SRCDIR) && for patch in `find $(PATCHDIR) -name \*.patch`; do \
patch --verbose -Np0 -i $$patch; \
@cd $(SRCDIR) && \
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
patch --verbose -Np1 -i $$patch; \
done
@cd $(SRCDIR); \
./configure \
@@ -57,8 +56,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu
$(SRCDIR)/src/m4: $(SRCDIR)/config.log
@cd $(SRCDIR); \
$(MAKE)
@cd $(SRCDIR) && make
$(ROOT): $(SRCDIR)/src/m4
@if [ -d $(ROOT) ]; then \
@@ -67,10 +65,7 @@ $(ROOT): $(SRCDIR)/src/m4
mkdir -v $(ROOT); \
fi
@cd $(SRCDIR); \
$(MAKEINST) DESTDIR=$(ROOT)
@$(SNAPHACKS)
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
test: $(ROOT)
@cd $(SRCDIR); \
@@ -78,7 +73,7 @@ test: $(ROOT)
clean:
@rm -rvf $(ROOT) \
$(SNAPINFO) \
$(SLINFO) \
$(MANIFEST) \
$(FILES) \
$(SRCDIR)