From 6dd86795f9f0ee37a0196b96c2b242fbd6dd0be9 Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Sun, 15 Jun 2025 21:30:12 -0400 Subject: [PATCH] Starting to create distribution build (tarfile ) within Makefile --- Makefile | 4 +++- Makefile.dist | 25 +++++++++++++++++++++++++ lib/Makefile | 2 +- 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 Makefile.dist diff --git a/Makefile b/Makefile index 82df93f..29a8986 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,10 @@ clean : @ - rm -fr $(APPNAME)-* #==================================================================== +#test area Makefile include Makefile.dbg -#test area sub directory +#distribution area Makefile +include Makefile.dist #==================================================================== FEEDPAR = \ diff --git a/Makefile.dist b/Makefile.dist new file mode 100644 index 0000000..6adcbb8 --- /dev/null +++ b/Makefile.dist @@ -0,0 +1,25 @@ +#Makefile with all necessary to build distribution RPM + + +tarfile : clean + @ echo "Making '$(APLV)' tar file" + @ mkdir -p \ + $(APLV)/app \ + $(APLV)/lib \ + $(APLV) + @ date > $(APLV)/$(APLV).build_date + @ cp -a Makefile* $(APLV)/ + @ cp -a app/Makefile $(APLV)/app/Makefile + @ cp -a lib/Makefile $(APLV)/lib/Makefile + @ tar zcf $(APLV).tar.gz $(APLV) + @ echo "'$(APLV)' tar file ready" + + + +#==================================================================== +VERSION = `grep VERSION lib/numver.h | cut -d'"' -f2` +RELEASE = `grep RELEASE lib/numver.h | cut -d'"' -f2` +APPN = mailleur +APPV = $(VERSION).$(RELEASE) +APLV = $(APPN)-$(APPV) +#==================================================================== diff --git a/lib/Makefile b/lib/Makefile index d6e6cce..fc428fd 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -10,7 +10,7 @@ prod : toremake @ echo "library compiled in '$@' mode, now ready" clean : - - rm -fr *.o *.a + - rm -fr *.o *.a *.tar.gz #-------------------------------------------------------------------- #Equivalences -- 2.47.3