You are not logged in.

#1 2021-12-07 08:01:55

deserts
Member
From: the Orient
Registered: 2021-08-28
Posts: 17

[SOLVED]`Make` has different result from makepkg

I have been working on a submission of one AUR package from upstream libRadtran
I download the tarball manually and execute ./configure and make under the extracted directory, no error occurs.
However, when I build my own PKGBUILD which contains follows:

prepare() {
	cd "$_pkgname-$pkgver"
	patch -p1 -i "$srcdir/../$_pkgname-$pkgver.patch"
}

build() {
	cd "$_pkgname-$pkgver"
	./configure --prefix=/usr
	make
}

There is a certain error:

   compiling uvspec_mpi.c
uvspec_mpi.c: In function ‘main’:
uvspec_mpi.c:36:3: error: format not a string literal and no format arguments [-Werror=format-security]
   36 |   sprintf(infilename, argv[1]);
      |   ^~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [Makefile:387: uvspec_mpi.o] Error 1
make[1]: Leaving directory '/home/jtsung/AUR/libradtran/src/libRadtran-2.0.3/src'
make: *** [Makefile:39: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

The corresponding successful result of manually compiling is:

   compiling uvspec_mpi.c
   linking ../bin/uvspec_mpi
   compiling vac2air.c
   linking ../bin/vac2air

I also notice there is much more warning than of when using makepkg
Could anyone tell me why? thanks!

Last edited by deserts (2021-12-08 02:29:57)


science and engineering on satellite remote sensing of atmospheric environment

Offline

#2 2021-12-07 09:01:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,731

Re: [SOLVED]`Make` has different result from makepkg

Look at your CFLAGS= in /etc/makepkg.conf

Offline

#3 2021-12-07 09:10:14

deserts
Member
From: the Orient
Registered: 2021-08-28
Posts: 17

Re: [SOLVED]`Make` has different result from makepkg

V1del wrote:

Look at your CFLAGS= in /etc/makepkg.conf

Thanks a lot for that, and the error disappear when I remove the -Werror=format-security in the file!
BTW, if another user clone this repository and execute makepkg, will he recieve the same error?
Or, should I add export CFLAGS="-Wno-error" in PKGBUILD build() function?


science and engineering on satellite remote sensing of atmospheric environment

Offline

#4 2021-12-07 09:13:32

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [SOLVED]`Make` has different result from makepkg

BTW, if another user clone this repository and execute makepkg, will he recieve the same error?

Yes. You'll have to add a flag to deactivate it.
https://bugs.archlinux.org/task/70701#comment199445

-Wno-error is a bit too braod.

Offline

#5 2021-12-07 10:32:39

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [SOLVED]`Make` has different result from makepkg

patch -p1 -i "$srcdir/../$_pkgname-$pkgver.patch"

Makepkg gives absolutely no guarantee what folder is above $srcdir.

Everything mentioned in source() array is placed in $srcdir by makepkg, so just use $srcdir/$_pkgname-$pkgver.patch .


P.S. please don't use highlights unless really necessary, they hurt the eyes.
bold and italic are acceptable (atleast until the bbs software we use supports [c] for inline code) .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#6 2021-12-07 13:53:52

deserts
Member
From: the Orient
Registered: 2021-08-28
Posts: 17

Re: [SOLVED]`Make` has different result from makepkg

Lone_Wolf wrote:

so just use $srcdir/$_pkgname-$pkgver.patch .

Thanks for this advice! And the another advice of highlight syntax.


science and engineering on satellite remote sensing of atmospheric environment

Offline

#7 2021-12-07 14:00:01

deserts
Member
From: the Orient
Registered: 2021-08-28
Posts: 17

Re: [SOLVED]`Make` has different result from makepkg

seth wrote:

-Wno-error is a bit too braod.

Absolutely yes, And I'm copying the CFLAG from makepkg.conf to PKGBUILD, Is this OK?


science and engineering on satellite remote sensing of atmospheric environment

Offline

#8 2021-12-07 14:18:16

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [SOLVED]`Make` has different result from makepkg

I'd assume you want to either extend the CFLAGS or clean them up (strip the offending parameter) but still honor the ones provided by the building host.
I'd not just steamroll *your* CFLAGS over the those of the target system (user actually building the AUR)

Offline

#9 2021-12-07 16:48:55

a821
Member
Registered: 2012-10-31
Posts: 381

Re: [SOLVED]`Make` has different result from makepkg

deserts wrote:

There is a certain error:

   compiling uvspec_mpi.c
uvspec_mpi.c: In function ‘main’:
uvspec_mpi.c:36:3: error: format not a string literal and no format arguments [-Werror=format-security]
   36 |   sprintf(infilename, argv[1]);
      |   ^~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [Makefile:387: uvspec_mpi.o] Error 1
make[1]: Leaving directory '/home/jtsung/AUR/libradtran/src/libRadtran-2.0.3/src'
make: *** [Makefile:39: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

FWIW, I do not see the offending line in version 2.0.4: It looks like they fixed it. Maybe try updating??

Offline

#10 2021-12-08 01:36:50

deserts
Member
From: the Orient
Registered: 2021-08-28
Posts: 17

Re: [SOLVED]`Make` has different result from makepkg

a821 wrote:

I do not see the offending line in version 2.0.4

Yes, I tried 2.0.4 also, the problem is that it must make twice in my machine.
My confugure result of netCDF part shows:

  NetCDF  found:        yes 4.8.1
  NetCDF  CFLAGS:       -I/usr/include
  NetCDF  LDFLAGS:      -L/usr/lib 
  NetCDF  LIBS:         -lnetcdf 
  NetCDF  FFLAGS:       -I/usr/include -I/usr/include
  NetCDF  FLIBS:        -lnetcdff 

But when first make, it stops because of the wrong netCDF header file location:

make[1]: *** No rule to make target '/opt/local/include/netcdf.h', needed by 'triangle_surface.o'.  Stop.

I tried to find out why, but only know the location /opt/local/include/netcdf.h is produced by ALL_CFLAGS:

/src/Makefile.in:156:	$(CC) $(CPPFLAGS) $(ALL_CFLAGS) -MM $(SRC_C)  > .depend

When I ignore the make error, and type make the second time, all things seems good and make check passed.
So I choose the 2.0.3 version to be my first try, even if 2.0.3 also have some little problem, but I have fixed thanks to this bbs.
I'm also wondering if you have the same experience or you just make once and succeed?


science and engineering on satellite remote sensing of atmospheric environment

Offline

#11 2021-12-08 20:09:52

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: [SOLVED]`Make` has different result from makepkg

PKGBUILD delete .depends to remove references to /opt/local/include/netcdf.h e.t.c.. patch numerous Makefile.in to use $DESTDIR,  use --no-same-owner when extracting a tar archive in package so files are owned by root

# Maintainer: Jay Tsung <int8@foxmail.com>
pkgname=libradtran
_pkgname=libRadtran
pkgver=2.0.4
pkgrel=1
pkgdesc="library for radiative transfer"
arch=('x86_64')
url="http://www.libradtran.org"
license=('GPL')
depends=('netcdf' 'netcdf-fortran' 'gsl')
makedepends=('python2'
             'gcc-fortran')
optdepends=('perl: run the tests and some of the tools')
source=("http://www.libradtran.org/download/$_pkgname-$pkgver.tar.gz"
         $_pkgname-$pkgver.patch)
sha256sums=('eb840e00f2b59648e77775df83d8ae2337880cec155d145228cd65365e3c816f'
            '4d6bc91511915a2afeb2a11ae4e035a2333c4ee020400bd3033804ba336303dc')

prepare() {
	cd "$_pkgname-$pkgver"
	find -name .depend -delete
	patch -p1 -i ../$_pkgname-$pkgver.patch
}

build() {
	cd "$_pkgname-$pkgver"
	./configure --prefix=/usr
	make
}

package() {
	cd "$_pkgname-$pkgver"
	make DESTDIR="$pkgdir" install
}

libRadtran-2.0.4.patch

diff --git a/GUI/Makefile.in b/GUI/Makefile.in
index 23851ef..f4fbacc 100644
--- a/GUI/Makefile.in
+++ b/GUI/Makefile.in
@@ -30,8 +30,8 @@ check: all
 .PHONY: check
 
 install: all
-	$(MKPATH) $(bindir)
-	$(INSTALL) $(GUIFILES) $(bindir)
+	$(MKPATH) $(DESTDIR)$(bindir)
+	$(INSTALL) $(GUIFILES) $(DESTDIR)$(bindir)
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 .PHONY: install
 
diff --git a/GUI/resources/Makefile.in b/GUI/resources/Makefile.in
index f397857..6d471b9 100644
--- a/GUI/resources/Makefile.in
+++ b/GUI/resources/Makefile.in
@@ -35,9 +35,9 @@ mystic-dist:
 .PHONY: mystic-dist
 
 install: 
-	$(MKPATH) $(datadir)/GUI/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datadir)/GUI/$(THISDIR)
-	tar -xzvf $(HTML_DOC_TAR_FILE) -C $(datadir)/GUI/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datadir)/GUI/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datadir)/GUI/$(THISDIR)
+	bsdtar --no-same-owner -xzvf $(HTML_DOC_TAR_FILE) -C $(DESTDIR)$(datadir)/GUI/$(THISDIR)
 #AK 20100308	$(INSTALL_DATA) $(HTML_DOC_DIR) $(datadir)/GUI/$(THISDIR)
 .PHONY: install
 
diff --git a/data/aerosol/OPAC/Makefile.in b/data/aerosol/OPAC/Makefile.in
index a904eaf..197352f 100644
--- a/data/aerosol/OPAC/Makefile.in
+++ b/data/aerosol/OPAC/Makefile.in
@@ -36,8 +36,8 @@ mystic-dist:
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/aerosol/OPAC
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/aerosol/OPAC
+	$(MKPATH) $(DESTDIR)$(datafiledir)/aerosol/OPAC
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/aerosol/OPAC
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 .PHONY: install
 
diff --git a/data/aerosol/OPAC/optprop/Makefile.in b/data/aerosol/OPAC/optprop/Makefile.in
index 67e90c5..3465e74 100644
--- a/data/aerosol/OPAC/optprop/Makefile.in
+++ b/data/aerosol/OPAC/optprop/Makefile.in
@@ -33,8 +33,8 @@ mystic-dist: all
 
 install: all
 ifeq (@FOUND_OPAC@,yes)
-	$(MKPATH) $(datafiledir)/aerosol/OPAC/optprop
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/aerosol/OPAC/optprop
+	$(MKPATH) $(DESTDIR)$(datafiledir)/aerosol/OPAC/optprop
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/aerosol/OPAC/optprop
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 endif
 .PHONY: install
diff --git a/data/aerosol/OPAC/refractive_indices/Makefile.in b/data/aerosol/OPAC/refractive_indices/Makefile.in
index 1bf242c..03e33c6 100644
--- a/data/aerosol/OPAC/refractive_indices/Makefile.in
+++ b/data/aerosol/OPAC/refractive_indices/Makefile.in
@@ -31,8 +31,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/aerosol/OPAC/refractive_indices
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/aerosol/OPAC/refractive_indices
+	$(MKPATH) $(DESTDIR)$(datafiledir)/aerosol/OPAC/refractive_indices
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/aerosol/OPAC/refractive_indices
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 .PHONY: install
 
diff --git a/data/aerosol/OPAC/standard_aerosol_files/Makefile.in b/data/aerosol/OPAC/standard_aerosol_files/Makefile.in
index b643e10..453378a 100644
--- a/data/aerosol/OPAC/standard_aerosol_files/Makefile.in
+++ b/data/aerosol/OPAC/standard_aerosol_files/Makefile.in
@@ -31,8 +31,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/aerosol/OPAC/standard_aerosol_files
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/aerosol/OPAC/standard_aerosol_files
+	$(MKPATH) $(DESTDIR)$(datafiledir)/aerosol/OPAC/standard_aerosol_files
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/aerosol/OPAC/standard_aerosol_files
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 .PHONY: install
 
diff --git a/data/aerosol/shettle/Makefile.in b/data/aerosol/shettle/Makefile.in
index f460b59..0ed816f 100644
--- a/data/aerosol/shettle/Makefile.in
+++ b/data/aerosol/shettle/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/aerosol/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/aerosol/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/aerosol/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/aerosol/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/albedo/IGBP_map/Makefile.in b/data/albedo/IGBP_map/Makefile.in
index 35673ca..1f05f03 100644
--- a/data/albedo/IGBP_map/Makefile.in
+++ b/data/albedo/IGBP_map/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/albedo/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/albedo/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/albedo/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/albedo/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/albedo/Makefile.in b/data/albedo/Makefile.in
index 6d4bdb2..45526e4 100644
--- a/data/albedo/Makefile.in
+++ b/data/albedo/Makefile.in
@@ -41,8 +41,8 @@ mystic-dist: all
 
 
 install: all
-	$(MKPATH) $(datafiledir)/albedo
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/albedo
+	$(MKPATH) $(DESTDIR)$(datafiledir)/albedo
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/albedo
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 .PHONY: install
 
diff --git a/data/albedo/bowker85/Makefile.in b/data/albedo/bowker85/Makefile.in
index 749d755..2c9f98f 100644
--- a/data/albedo/bowker85/Makefile.in
+++ b/data/albedo/bowker85/Makefile.in
@@ -31,8 +31,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/albedo/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/albedo/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/albedo/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/albedo/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/altitude/Makefile.in b/data/altitude/Makefile.in
index c70d5f8..16ff822 100644
--- a/data/altitude/Makefile.in
+++ b/data/altitude/Makefile.in
@@ -37,8 +37,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/altitude
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/altitude
+	$(MKPATH) $(DESTDIR)$(datafiledir)/altitude
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/altitude
 .PHONY: install
 
 clean:
diff --git a/data/atmmod/Makefile.in b/data/atmmod/Makefile.in
index 91997f5..b09235b 100644
--- a/data/atmmod/Makefile.in
+++ b/data/atmmod/Makefile.in
@@ -32,8 +32,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/cloudprp/input/Makefile.in b/data/cloudprp/input/Makefile.in
index 01aa115..2b4f2c1 100644
--- a/data/cloudprp/input/Makefile.in
+++ b/data/cloudprp/input/Makefile.in
@@ -32,8 +32,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/cloudprp/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/cloudprp/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/cloudprp/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/cloudprp/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/correlated_k/fu/Makefile.in b/data/correlated_k/fu/Makefile.in
index ce97d87..03868bc 100644
--- a/data/correlated_k/fu/Makefile.in
+++ b/data/correlated_k/fu/Makefile.in
@@ -33,8 +33,8 @@ mystic-dist: all
 clean:
 
 install: all
-	$(MKPATH) $(datafiledir)/correlated_k/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/correlated_k/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
 .PHONY: install
 
 mostlyclean: clean
diff --git a/data/correlated_k/kato/Makefile.in b/data/correlated_k/kato/Makefile.in
index cf2fa51..7661f16 100644
--- a/data/correlated_k/kato/Makefile.in
+++ b/data/correlated_k/kato/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/correlated_k/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/correlated_k/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/correlated_k/kato2.hitran96/Makefile.in b/data/correlated_k/kato2.hitran96/Makefile.in
index 4f4e8d3..e0ee41f 100644
--- a/data/correlated_k/kato2.hitran96/Makefile.in
+++ b/data/correlated_k/kato2.hitran96/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/correlated_k/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/correlated_k/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/correlated_k/kato2/Makefile.in b/data/correlated_k/kato2/Makefile.in
index 281ebc5..b49493d 100644
--- a/data/correlated_k/kato2/Makefile.in
+++ b/data/correlated_k/kato2/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/correlated_k/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/correlated_k/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/correlated_k/kato2andwandji/Makefile.in b/data/correlated_k/kato2andwandji/Makefile.in
index ceb9d1f..97d61f0 100644
--- a/data/correlated_k/kato2andwandji/Makefile.in
+++ b/data/correlated_k/kato2andwandji/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/correlated_k/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/correlated_k/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/correlated_k/kratz/Makefile.in b/data/correlated_k/kratz/Makefile.in
index b245615..b4b76ea 100644
--- a/data/correlated_k/kratz/Makefile.in
+++ b/data/correlated_k/kratz/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/correlated_k/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/correlated_k/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/correlated_k/reptran/Makefile.in b/data/correlated_k/reptran/Makefile.in
index d356ec7..8320dd4 100644
--- a/data/correlated_k/reptran/Makefile.in
+++ b/data/correlated_k/reptran/Makefile.in
@@ -31,8 +31,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/correlated_k/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/correlated_k/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/correlated_k/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/crs/Makefile.in b/data/crs/Makefile.in
index c3c16c6..be50c8e 100644
--- a/data/crs/Makefile.in
+++ b/data/crs/Makefile.in
@@ -48,8 +48,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/crs
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/crs
+	$(MKPATH) $(DESTDIR)$(datafiledir)/crs
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/crs
 .PHONY: install
 
 clean:
diff --git a/data/filter/adeos/Makefile.in b/data/filter/adeos/Makefile.in
index e514591..e575428 100644
--- a/data/filter/adeos/Makefile.in
+++ b/data/filter/adeos/Makefile.in
@@ -35,8 +35,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/alos/Makefile.in b/data/filter/alos/Makefile.in
index 1a8e482..ba27e34 100644
--- a/data/filter/alos/Makefile.in
+++ b/data/filter/alos/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/earthcare/Makefile.in b/data/filter/earthcare/Makefile.in
index cca8070..7de05bb 100644
--- a/data/filter/earthcare/Makefile.in
+++ b/data/filter/earthcare/Makefile.in
@@ -32,8 +32,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/envisat/Makefile.in b/data/filter/envisat/Makefile.in
index ba8f9b8..4da03f3 100644
--- a/data/filter/envisat/Makefile.in
+++ b/data/filter/envisat/Makefile.in
@@ -35,8 +35,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/ers/Makefile.in b/data/filter/ers/Makefile.in
index a5e2fc4..f2eafce 100644
--- a/data/filter/ers/Makefile.in
+++ b/data/filter/ers/Makefile.in
@@ -32,8 +32,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/goes/Makefile.in b/data/filter/goes/Makefile.in
index 1ab912f..781785c 100644
--- a/data/filter/goes/Makefile.in
+++ b/data/filter/goes/Makefile.in
@@ -45,8 +45,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/himawari/Makefile.in b/data/filter/himawari/Makefile.in
index e981720..9b1658e 100644
--- a/data/filter/himawari/Makefile.in
+++ b/data/filter/himawari/Makefile.in
@@ -37,8 +37,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/landsat/Makefile.in b/data/filter/landsat/Makefile.in
index db7f44f..f1395f1 100644
--- a/data/filter/landsat/Makefile.in
+++ b/data/filter/landsat/Makefile.in
@@ -40,8 +40,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/modis/Makefile.in b/data/filter/modis/Makefile.in
index 41bb5ee..da51131 100644
--- a/data/filter/modis/Makefile.in
+++ b/data/filter/modis/Makefile.in
@@ -47,8 +47,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/msg/Makefile.in b/data/filter/msg/Makefile.in
index 5b97400..a576e5e 100644
--- a/data/filter/msg/Makefile.in
+++ b/data/filter/msg/Makefile.in
@@ -41,8 +41,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/parasol/Makefile.in b/data/filter/parasol/Makefile.in
index e2ccb2b..de98900 100644
--- a/data/filter/parasol/Makefile.in
+++ b/data/filter/parasol/Makefile.in
@@ -31,8 +31,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/proba/Makefile.in b/data/filter/proba/Makefile.in
index 8951eb7..e16b76f 100644
--- a/data/filter/proba/Makefile.in
+++ b/data/filter/proba/Makefile.in
@@ -72,8 +72,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/sentinel/Makefile.in b/data/filter/sentinel/Makefile.in
index 490eda4..333f37d 100644
--- a/data/filter/sentinel/Makefile.in
+++ b/data/filter/sentinel/Makefile.in
@@ -40,8 +40,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/seosat/Makefile.in b/data/filter/seosat/Makefile.in
index fdca0e3..ba58661 100644
--- a/data/filter/seosat/Makefile.in
+++ b/data/filter/seosat/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/filter/spot/Makefile.in b/data/filter/spot/Makefile.in
index d019536..8d7ac97 100644
--- a/data/filter/spot/Makefile.in
+++ b/data/filter/spot/Makefile.in
@@ -37,8 +37,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/filter/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/filter/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/filter/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/ic/baum/Makefile.in b/data/ic/baum/Makefile.in
index 446775c..3392b3c 100644
--- a/data/ic/baum/Makefile.in
+++ b/data/ic/baum/Makefile.in
@@ -32,8 +32,8 @@ mystic-dist: all
 
 install: all
 ifeq (@FOUND_BAUM@,yes)
-	$(MKPATH) $(datafiledir)/ic/baum
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/ic/baum
+	$(MKPATH) $(DESTDIR)$(datafiledir)/ic/baum
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/ic/baum
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 endif
 .PHONY: install
diff --git a/data/ic/baum_v3.6/Makefile.in b/data/ic/baum_v3.6/Makefile.in
index 4e9eb6f..dfcbd0a 100644
--- a/data/ic/baum_v3.6/Makefile.in
+++ b/data/ic/baum_v3.6/Makefile.in
@@ -31,8 +31,8 @@ mystic-dist: all
 
 install: all
 ifeq (@FOUND_BAUM_V36@,yes)
-	$(MKPATH) $(datafiledir)/ic/baum
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/ic/baum
+	$(MKPATH) $(DESTDIR)$(datafiledir)/ic/baum
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/ic/baum
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 endif
 .PHONY: install
diff --git a/data/ic/fu96/Makefile.in b/data/ic/fu96/Makefile.in
index 89c6813..2a83344 100644
--- a/data/ic/fu96/Makefile.in
+++ b/data/ic/fu96/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install:
-	$(MKPATH) $(datafiledir)/ic/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/ic/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/ic/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/ic/$(THISDIR)
 .PHONY: clean
 
 clean:
diff --git a/data/ic/fu98/Makefile.in b/data/ic/fu98/Makefile.in
index f3cdf6a..cd7e07b 100644
--- a/data/ic/fu98/Makefile.in
+++ b/data/ic/fu98/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install:
-	$(MKPATH) $(datafiledir)/ic/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/ic/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/ic/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/ic/$(THISDIR)
 .PHONY: clean
 
 clean:
diff --git a/data/ic/hey/Makefile.in b/data/ic/hey/Makefile.in
index ed47a80..cbfc550 100644
--- a/data/ic/hey/Makefile.in
+++ b/data/ic/hey/Makefile.in
@@ -32,8 +32,8 @@ mystic-dist: all
 
 install: all
 ifeq (@FOUND_HEY@,yes)
-	$(MKPATH) $(datafiledir)/ic/hey
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/ic/hey
+	$(MKPATH) $(DESTDIR)$(datafiledir)/ic/hey
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/ic/hey
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 endif
 .PHONY: install
diff --git a/data/ic/yang56/Makefile.in b/data/ic/yang56/Makefile.in
index f918bf2..ba555a5 100644
--- a/data/ic/yang56/Makefile.in
+++ b/data/ic/yang56/Makefile.in
@@ -39,8 +39,8 @@ include $(TOPDIR)/Makeconf
 all: 
 
 install:
-	$(MKPATH) $(datafiledir)/ic/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(DATAFILES2) $(datafiledir)/ic/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/ic/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DATAFILES2) $(DESTDIR)$(datafiledir)/ic/$(THISDIR)
 .PHONY: clean
 
 dist: all
diff --git a/data/nca_lookup/Makefile.in b/data/nca_lookup/Makefile.in
index 5607bc0..ef101f6 100644
--- a/data/nca_lookup/Makefile.in
+++ b/data/nca_lookup/Makefile.in
@@ -34,8 +34,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/nca_lookup
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/nca_lookup
+	$(MKPATH) $(DESTDIR)$(datafiledir)/nca_lookup
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/nca_lookup
 .PHONY: install
 
 clean:
diff --git a/data/scripts/Makefile.in b/data/scripts/Makefile.in
index 30800c8..513ea75 100644
--- a/data/scripts/Makefile.in
+++ b/data/scripts/Makefile.in
@@ -30,8 +30,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(datafiledir)/$(THISDIR)
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(datafiledir)/$(THISDIR)
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/data/solar_flux/Makefile.in b/data/solar_flux/Makefile.in
index d5b5883..aef44d7 100644
--- a/data/solar_flux/Makefile.in
+++ b/data/solar_flux/Makefile.in
@@ -33,8 +33,8 @@ dist: all
 .PHONY: dist
 
 install: all
-	$(MKPATH) $(datafiledir)/solar_flux
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/solar_flux
+	$(MKPATH) $(DESTDIR)$(datafiledir)/solar_flux
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/solar_flux
 .PHONY: install
 
 clean:
diff --git a/data/wc/Makefile.in b/data/wc/Makefile.in
index 73936be..30f5510 100644
--- a/data/wc/Makefile.in
+++ b/data/wc/Makefile.in
@@ -36,8 +36,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install:
-	$(MKPATH) $(datafiledir)/wc
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/wc
+	$(MKPATH) $(DESTDIR)$(datafiledir)/wc
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/wc
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 .PHONY: clean
 
diff --git a/data/wc/mie/Makefile.in b/data/wc/mie/Makefile.in
index 521c4d9..17612ef 100644
--- a/data/wc/mie/Makefile.in
+++ b/data/wc/mie/Makefile.in
@@ -32,8 +32,8 @@ mystic-dist: all
 
 install: all
 ifeq (@FOUND_WCMIE@,yes)
-	$(MKPATH) $(datafiledir)/wc/mie
-	$(INSTALL_DATA) $(DATAFILES) $(datafiledir)/wc/mie
+	$(MKPATH) $(DESTDIR)$(datafiledir)/wc/mie
+	$(INSTALL_DATA) $(DATAFILES) $(DESTDIR)$(datafiledir)/wc/mie
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 endif
 .PHONY: install
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 958d3a2..18bfc50 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -122,8 +122,8 @@ libRadtran.pdf: $(LATEX) $(BIBTEX) $(L_LATEX) $(T_LATEX)
 #AK 20100308 We do not want install to depend on all as then the documentation is
 # rebuilt everytime a make install is performed.
 install: 
-	$(MKPATH) $(docdir)
-	$(INSTALL) -m644 libRadtran.pdf $(docdir)
+	$(MKPATH) $(DESTDIR)$(docdir)
+	$(INSTALL) -m644 libRadtran.pdf $(DESTDIR)$(docdir)
 .PHONY: install
 
 uninstall:
diff --git a/examples/GUI/Makefile.in b/examples/GUI/Makefile.in
index b6e5e53..f138518 100644
--- a/examples/GUI/Makefile.in
+++ b/examples/GUI/Makefile.in
@@ -42,8 +42,8 @@ mystic-dist: all
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(examplesdir)/$(THISDIR)
-	$(INSTALL_DATA) $(EXAMPLEFILES) $(examplesdir)/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(examplesdir)/$(THISDIR)
+	$(INSTALL_DATA) $(EXAMPLEFILES) $(DESTDIR)$(examplesdir)/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/examples/Makefile.in b/examples/Makefile.in
index c1a1037..18c2345 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -173,8 +173,8 @@ check: all
 .PHONY: check
 
 install: all
-	$(MKPATH) $(examplesdir)
-	$(INSTALL_DATA) $(EXAMPLEFILES) $(examplesdir)
+	$(MKPATH) $(DESTDIR)$(examplesdir)
+	$(INSTALL_DATA) $(EXAMPLEFILES) $(DESTDIR)$(examplesdir)
 	for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit $$?; done
 .PHONY: install
 
diff --git a/examples/triangular_srfc/Makefile.in b/examples/triangular_srfc/Makefile.in
index 63f4f12..3ee7a6f 100644
--- a/examples/triangular_srfc/Makefile.in
+++ b/examples/triangular_srfc/Makefile.in
@@ -39,8 +39,8 @@ mystic-dist: dist
 .PHONY: mystic-dist
 
 install: all
-	$(MKPATH) $(examplesdir)/$(THISDIR)
-	$(INSTALL_DATA) $(EXAMPLEFILES) $(examplesdir)/$(THISDIR)
+	$(MKPATH) $(DESTDIR)$(examplesdir)/$(THISDIR)
+	$(INSTALL_DATA) $(EXAMPLEFILES) $(DESTDIR)$(examplesdir)/$(THISDIR)
 .PHONY: install
 
 clean:
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 72cca10..662bd80 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -24,9 +24,9 @@ libRadtran.so: libRadtran_c.a libRadtran_f.a
 	$(CC) $(CFLAGS) --shared -o $@ -Wl,$(WHOLE_ARCHIVE) libRadtran_c.a -Wl,$(NO_WHOLE_ARCHIVE)  libRadtran_f.a $(FLIBS) $(LEXLIB) $(LIBNETCDF) $(LIBGSL) $(LIBGMP) $(LIBOPENGL) $(ALL_LDFLAGS) -lm
 
 install: all
-	$(MKPATH) $(libdir)
-	$(INSTALL_DATA) libRadtran.so $(libdir)/libRadtran.so
-	$(INSTALL_DATA) LibRadtranConfig.cmake.install $(libdir)/LibRadtranConfig.cmake
+	$(MKPATH) $(DESTDIR)$(libdir)
+	$(INSTALL_DATA) libRadtran.so $(DESTDIR)$(libdir)/libRadtran.so
+	$(INSTALL_DATA) LibRadtranConfig.cmake.install $(DESTDIR)$(libdir)/LibRadtranConfig.cmake
 .PHONY: install
 
 uninstall:
diff --git a/libsrc_c/Makefile.in b/libsrc_c/Makefile.in
index eef8408..b75ee54 100644
--- a/libsrc_c/Makefile.in
+++ b/libsrc_c/Makefile.in
@@ -158,12 +158,12 @@ $(RADTRAN_C_LIB): $(OBJECTS)
 
 
 install: all
-	$(MKPATH) $(libdir)
-	$(RM) -f $(libdir)/libRadtran_c.a
-	$(INSTALL_DATA) $(RADTRAN_C_LIB) $(libdir)/libRadtran_c.a
-	$(RANLIB) $(libdir)/libRadtran_c.a
-	$(MKPATH) $(includedir)/libRadtran
-	$(INSTALL) -m 644 $(INCLUDES) $(includedir)/libRadtran
+	$(MKPATH) $(DESTDIR)$(libdir)
+	$(RM) -f $(DESTDIR)$(libdir)/libRadtran_c.a
+	$(INSTALL_DATA) $(RADTRAN_C_LIB) $(DESTDIR)$(libdir)/libRadtran_c.a
+	$(RANLIB) $(DESTDIR)$(libdir)/libRadtran_c.a
+	$(MKPATH) $(DESTDIR)$(includedir)/libRadtran
+	$(INSTALL) -m 644 $(INCLUDES) $(DESTDIR)$(includedir)/libRadtran
 .PHONY: install
 
 uninstall:
diff --git a/libsrc_f/Makefile.in b/libsrc_f/Makefile.in
index 50011a3..1c02efa 100644
--- a/libsrc_f/Makefile.in
+++ b/libsrc_f/Makefile.in
@@ -85,12 +85,12 @@ XCC = $(subst -O, , $(CC))
 #	$(XCC) -DSP -o gen-r1mach $(srcdir)/gen-r1mach.c -lm
 
 install: all
-	$(MKPATH) $(libdir)
-	$(RM) -f $(libdir)/libRadtran_f.a
-	$(INSTALL_DATA) $(RADTRAN_F_LIB) $(libdir)/libRadtran_f.a
-	$(RANLIB) $(libdir)/libRadtran_f.a
-	$(MKPATH) $(includedir)/libRadtran
-	$(INSTALL) -m 644 f77-uscore.h $(includedir)/libRadtran
+	$(MKPATH) $(DESTDIR)$(libdir)
+	$(RM) -f $(DESTDIR)$(libdir)/libRadtran_f.a
+	$(INSTALL_DATA) $(RADTRAN_F_LIB) $(DESTDIR)$(libdir)/libRadtran_f.a
+	$(RANLIB) $(DESTDIR)$(libdir)/libRadtran_f.a
+	$(MKPATH) $(DESTDIR)$(includedir)/libRadtran
+	$(INSTALL) -m 644 f77-uscore.h $(DESTDIR)$(includedir)/libRadtran
 .PHONY: install
 
 uninstall:
diff --git a/src/Makefile.in b/src/Makefile.in
index c15d669..55d822a 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -363,8 +363,8 @@ check: all
 .PHONY: check
 
 install:
-	$(MKPATH) $(bindir)
-	$(INSTALL) $(BINARIES) $(bindir)
+	$(MKPATH) $(DESTDIR)$(bindir)
+	$(INSTALL) $(BINARIES) $(DESTDIR)$(bindir)
 .PHONY: install
 
 uninstall:

Offline

#12 2021-12-09 01:02:02

deserts
Member
From: the Orient
Registered: 2021-08-28
Posts: 17

Re: [SOLVED]`Make` has different result from makepkg

loqs wrote:

delete .depends to remove references to /opt/local/include/netcdf.h e.t.c.

I think that's what matters most! Before your reply, I was always thinking about .depend is generated after configure sad
You have done such a huge work! Thanks a lot for help!

[edit] I can't e-mail to you, so could you please cantact me to add you as a co-maintainer?

Last edited by deserts (2021-12-09 01:11:16)


science and engineering on satellite remote sensing of atmospheric environment

Offline

#13 2021-12-10 00:27:13

loqs
Member
Registered: 2014-03-06
Posts: 17,372

Re: [SOLVED]`Make` has different result from makepkg

deserts wrote:
loqs wrote:

delete .depends to remove references to /opt/local/include/netcdf.h e.t.c.

I think that's what matters most! Before your reply, I was always thinking about .depend is generated after configure sad

I thought the same,  it was only after I grepped through the extracted source before building I found the files already existed.

deserts wrote:

[edit] I can't e-mail to you, so could you please cantact me to add you as a co-maintainer?

Thank you for the offer.  I do not want to maintain a package I do not use.  You could add me as a contributor aur@entropy-collector.net

Offline

#14 2021-12-10 01:51:52

deserts
Member
From: the Orient
Registered: 2021-08-28
Posts: 17

Re: [SOLVED]`Make` has different result from makepkg

loqs wrote:

You could add me as a contributor aur@entropy-collector.net

OK, I have add delete .depend and --no-same-owner, since make --prefix is copied from ArchWiki and it just works, so I would like to keep the old style.
Also, I have add you as contributor in the 2.0.4 version.
Thanks for your careful work again.


science and engineering on satellite remote sensing of atmospheric environment

Offline

Board footer

Powered by FluxBB